[PATCH] Initial backend health

Ken Brownfield kb+varnish at slide.com
Tue Jun 23 22:21:20 CEST 2009

On Jun 18, 2009, at 11:20 PM, Ken Brownfield wrote:
> [...]
> The attached patch creates a backend flag to change the initial  
> health of backends upon varnishd startup:
> backend foo {
> 	.initial_health = 1;
> }
> [...]
> TODO: I should probably add "-p initial_health=1", as it fits the  
> defaults like between_bytes_timeout.

After looking at this for an hour or two, there's no way to tell  
whether the backend variable has been specifically set to 0, instead  
of defaulting to 0.  At least without reworking how the be structs  
work (adding an initialization step that sets them to defaults  
provided by params).  AFAICT.

The following are identical in behavior, and therefore params can't  
be /conditionally/ overridden:

	.initial_health = 0;
#	.initial_health = 0;

So you can't do "-p initial_health=1" and then set ".initial_health=0".

So it's an either/or proposition.  I like the per-backend setting  
myself, but if the general opinion is that a global param is better, I  
can create a different patch.


More information about the varnish-misc mailing list