title: Varnish cluster and Last-Modified
body: <p>In our setup we have 3 varnish servers in front of a cluster of backend servers. Varnish is load-balancing using round-robin. Resently we started using bundles for css and js. Each generated bundle gets a Last-Modified header from the backend server. We store the bundles for 24 hours.</p>
  
  <p>The problem is, that when varnish retrieves the bundle from a backend server, the Last-Modified is slightly different depending on wich backend server is hit at which time. The result is, that approx. 50% of the browser requests get a 200 response instead of a 302 when asking with a conditional "If-Modified-Since" header.</p>
  
  <p>I'm looking for some suggestions on how to solve this. Manipulating headers leaving the server could be a solution, but somehow it seems wrong. Having one backend server is unfortunately also not an option, due to scalability and deployment issues.</p>