Unconditional GETs and 304 from backend servers

Daniel Rodriguez coolbomb at gmail.com
Wed Dec 23 11:50:02 CET 2009


Hi everyone,

We are trying to solve a problem with our varnish implementation. The
code of our web application, uses a "logic" to generate 304 messages
to the requests made to some objects that requires some heavy
processing on the server side. For example, some pages codes will
check if some XML file or database information have changed since the
last request made from the client (Varnish) and return a 304 if its
not necessary to recreate the objects, and save us some process load
on our poor web servers.

The problem that we are currently having is that varnish will only ask
unconditional GETs, so every time that varnish ask the web server for
one of this objects after the age have expired (expecting a 200 and a
full refresh) our servers have to recreate the whole objects (some of
them taking a lot of CPU and time) even if this is not needed (in
normal conditions with conditional GET they will reply 304 with less
CPU usage).

There is a possible solution to this ? maybe a workaround using VCL ?

Thank you all,

Best Regards,



More information about the varnish-misc mailing list