Gzip issues with Varnish

Denis Brækhus denis at startsiden.no
Wed Apr 25 20:33:25 CEST 2007


One of my developer colleagues has experienced an issue at Aftenposten with regards to gzip and varnish.
I think you are experiencing the same issue we had, that is Varnish doesn't really handle gzipped data from the backend intelligently yet. So you could have the following scenario:

0. Varnish startup
1. Client A (with a gzip capable client) requests object 1
2. Varnish will fetch the object from the backend and pass it on to the client, and store the gzipped object in the cache
3. Client B (with a non gzip capable client) requests object 1
4. Varnish will pass on the gzipped object to the client
5. The client will not be able to interpret the data received, and you get various errors.. 

We "solved" the issue by disabling gzip on the backend until Varnish will handle this properly. For us the sacrifice in bandwidth savings was more than negligible when we take into consideration application server performance.

Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS

More information about the varnish-misc mailing list