Normalize Accept-Encoding via HAProxy for optimized Squid hit rate

Posted by Matt Beckman on Server Fault See other posts from Server Fault or by Matt Beckman
Published on 2010-04-05T19:44:33Z Indexed on 2010/04/05 19:53 UTC
Read the original article Hit count: 279

Filed under:
|
|

Our website infrastructure uses HAProxy for load balancing, a Squid cluster for caching, and application data is on an IIS cluster.

We load balance HAProxy by URI to optimize the Squid hit-rate, but we know that Squid is holding different copies of each page based on the Accept-Encoding header passed to it by the browser, and so IE (gzip, deflate) will have a different copy of a cached page than Firefox (gzip,deflate) or Chrome (gzip,deflate,sdch).

We want to normalize the Accept-Encoding headers and I think the best place to do so would be in HAProxy. I'd appreciate it if someone could offer some ideas on how to accomplish this without breaking support for clients without gzip or deflate support.

© Server Fault or respective owner

Related posts about squid

Related posts about haproxy