One of the amazing aspects of Fastly infrastructure is how many opportunities are built in for us to get a cache HIT on a cacheable object. Shielding is a popular feature customers can add to their services to increase their Cache Hit Ratio. But, even without shielding, the infrastructure inside a POP is also set up to help you out.
Each POP is essentially a bundle of servers that work together to handle your request. In the case of a cache MISS, your request will be routed through 2 of these servers, which I will henceforth refer to as cache nodes.
When a POP receives your request, it will be randomly assigned to a cache node, the delivery node. That cache node will check to see if it has the object in cache. If it doesn’t, it sends the request to another cache node, the fetching node. The fetching node is determined based on some magic mathematical calculations involving the return on your vcl_hash. This means, any delivery node that handles a request for the same object will point to the same fetch node.
Here’s what this means for you, the customer. WITHOUT request clustering, in a 64 node POP, each of our 64 cache nodes would have to make a separate request to your origin to retrieve any particular object. WITH request clustering, each POP only has to make one request to your origin. Each of the other nodes in the POP will check with the fetching node to see if it has the object before going back to origin.
Please sign in to leave a comment.