Varnish Dirty Caching

Anton Stonor stonorn at giraffen.dk
Thu Jul 5 08:44:34 CEST 2007


Poul-Henning Kamp wrote:

> The critical question is how we define "backend is down" and how
> fast and efficient we can detect it.
> 
> Ideas for how to express it in VCL are very welcome.

Maybe naive:

# First, we setup decide how to "sniff" that a backend is down
#
# options_ping: Send a HTTP OPTIONS (Perlbal does that)
# timeout: 	If the backend does not answer within x seconds, it is
#          	probably down
# icp: 		Abuse the protocol. (Squid + Zope does that)
backend.down_protocol = options_ping | timeout | icp

# What is the timeout limit?
backend.timeout = 30

# How long time should the backend be marked as "down" before we try
# again?
backend.retry_after = 300


# And then just use it

if(backend.down)....



/Anton Stonor



More information about the varnish-misc mailing list