Keeping Sessions Open after vcl_error

Bruce Rudolph brudolph at admantx.com
Thu Apr 18 18:54:49 CEST 2013


I have Varnish 3.0.3 and it is in an environment that a single session can send hundreds to thousands of requests (and more) as long as the session remains open. There is a hard response threshold that needs to be met. If it is not met the client closes the session and opens another. Excessive timeouts on the requests means many session open and close events which reduces throughput.

I have the following defined in the default.vcl file:

	Added to backend definition:

		.connect_timeout = 0.7s;
		.first_byte_timeout = 4ms;
		.between_bytes_timeout = 4ms;

A timeout will occur after 4ms if no response from the backend is received after the request is forwarded. When a timeout occurs a synthesized response is added to an override of the vcl_error function in the default.vcl file. The synthesized response is supposed to keep the session open. Based on the documentation and from my observations in the environment when an error occurs in Varnish, as in a timeout, it causes a SessionClose. 

Is there a way to keep the session open while sending a synthesized response?

Regards,
Bruce



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20130418/d94c8d04/attachment.html>


More information about the varnish-misc mailing list