Service Times

Table A-11 shows the mean and median service times for different types of requests. The type is taken directly from the fourth field of Squid’s access.log file. The three-digit number following the slash is the HTTP status code. Here I show only 200 (OK) and 304 (Not Modified) replies.

Table A-11. Mean and Median Service Times by Cache Result (IRCache Data)

TypeMean (sec)Median (sec)
TCP_REFRESH_HIT/2005.1650.281
TCP_MISS/2004.5900.466
TCP_REFRESH_MISS/2004.0910.468
TCP_CLIENT_REFRESH_MISS/2001.8890.215
TCP_HIT/2001.8190.050
TCP_MISS/3041.1510.294
TCP_REFRESH_HIT/3041.1070.219
TCP_IMS_HIT/3040.1020.042

The string before the slash indicates how the cache handled the request. TCP_MISS means the object wasn’t found in the cache at all. TCP_HIT indicates an unvalidated cache hit. TCP_IMS_HIT occurs when Squid receives an If-modified-since request and returns a 304 (Not Modified) reply immediately because the response is fresh according to the local configuration. TCP_CLIENT_REFRESH_MISS means that the user-agent sent the no-cache directive. TCP_REFRESH_HIT occurs when Squid validates its cached response and learns that the object hasn’t changed. If the client’s request includes an If-modified-since header, Squid returns the 304 message. Otherwise, it sends the entire object, and the status is 200. Finally, TCP_REFRESH_MISS means Squid sent a validation request to the origin server, and the cached object was out-of-date.

This data is derived from the second field of Squid’s access.log ...

Get Web Caching now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.