Apache ETags and Clustered Webservers

This one’s as much for my own memory as for everyone else, I’ve already used it at two companies and had to rediscover it at each…

If you have a number of load balanced apache servers serving the same site and you use ETags to help reduce the number of page requests make sure that the generated ETag doesn’t consult the file inode; these will hardly ever be the same across servers - unless you build from a gold image - and will cause the client to download the page again each time it hits a different server.

And a bonus tip: make sure they use ntp and the clocks are synced, time differences make the ETag hashes differ.