Varnish caching 503 error pages

pub crawler at
Tue Feb 2 22:37:17 CET 2010

Thought I'd ask the list before I went on a voyage with this one.

Sometime our backend app servers gets overloaded and go into
protection mode whereby they sends out 503 errors until they recover.

Varnish is in front of the app servers and when this happens the 503
ends up as a cached item in Varnish.

Here's output to show such:

HTTP/1.1 503 Service Unavailable
Keep-Alive: timeout=30
Content-Type: text/html
Content-Language: en-US
Content-Length: 122
Date: Tue, 02 Feb 2010 21:34:15 GMT
X-Varnish: 655791101 655790499
Age: 97
Via: 1.1 varnish
Connection: keep-alive
X-Served-By: atom3302
X-Cache: HIT
X-Cache-Hits: 13

What is the best way to explicitly refuse caching of 503 errors by Varnish?


More information about the varnish-misc mailing list