Inconsistency between HEAD and GET request handling


#1

Hi, I’m seeing some unexpected behavior when it comes to the caching of HEAD requests. GETs for the same URL come back cached every time as expected, but HEADs will occasionally come back with a MISS. We’re using shielding and it really only seems to occur whenever we end up going to a shield node directly. I’m logging the fastly_info.state variable and the misses come back as just plain MISS values, while the hits are always HIT-CLUSTER. Is there something different in the way that HEAD requests vs GET requests are cached that might be causing this?

Thanks!

  • Ray

#2

Hi rayd-

Yes, we have a distributed storage architecture in our POPs and we don’t cluster the HEAD requests.

Use GET requests if you are trying to determine cacheability. i.e. something like:
curl -svo /dev/null http://www.example.com


#3

Ah, thanks for the quick response and explanation peter!


#4

As an update to this, HEAD requests now cluster, so these should now reflect proper behavior.

–Peter