using varnish as compression offloader

Oguz Yilmaz oguzyilmazlist at gmail.com
Fri Aug 5 12:24:06 CEST 2011


According to the writings I have read from the list archives, I am
very near to conclude that one can use varnish as gzip offloader at
the front of any other proxy or web server.

Can all of the following cases be implemented using varnish?

If; "Accept Encoding: gzip" request comes, varnish will request the
object with "Accept Encoding: gzip" from the server as well by
default. Server will send the reply as gzipped and Varnish will cache
it as gzipped and also deliver to the client as gzipped.
client - gzip - varnish - gzip - server - gzip - varnish - gzip - client

gzip offloader case:
If; "Accept Encoding: gzip" request comes, varnish can strip this
using VCL and ask to the backend WITHOUT "Accept-Encoding". The server
will sent clear text reply. Varnish will gzip it, cache it in gzip
form and reply to the client as gzipped as asked.
client - gzip - varnish - non gzip - server - non gzip -  varnish -
gzip - client

If; A request without "Accept Encoding" comes varnish can ask to the
backend without "Accept Encoding" by changing the default behavior and
gets in cleat text and convey it to the client as clear text.
client - non gzip - varnish - non gzip - server - non gzip -  varnish
- non gzip - client

If; A request without "Accept Encoding" comes varnish can ask to the
backend with  "Accept Encoding: gzip"(default behavior) and gets
gzipped content cache it as gzipped form. However, sends the data to
the client as clear text.
client - gzip - varnish - gzip - server - gzip -  varnish - non gzip - client


Best Regards,

--
Oguz YILMAZ




More information about the varnish-misc mailing list