Web Cache overview
The Web Cache application subscribes to all port 80 traffic. Each client request is forwarded to Squid-cache running on the local appliance. If the cache has the content stored locally, we transmit the response directly to the client, allowing all the other nodes and services to act on the content as required, and life is grand. That's called a cache hit, and it's really pretty simple.
The real magic kicks in when handling a cache miss. In this case, we can't allow Squid to go grab the content and hand it directly to the client like it normally would. We need the response to pass through all of the other apps and services. So we got a little creative with the Squid setup by configuring all external content to come from a peer cache. That peer cache is actually another thread within our Web Cache app. When Squid connects back to us for a cache miss, we allow the original request to continue outbound as it normally would and we intercept the response from the external server. This allows us to push a copy of the content into Squid while also returning it to the client at the same time.
Follow
Comments
0 comments
Please sign in to leave a comment.