[VDD15Q3] Move timeouts outside of the backend VCL definition
Dridi Boukelmoune
dridi at varni.sh
Mon Aug 24 11:35:06 CEST 2015
Hi,
We can currently declare up to three timeouts in a backend definition.
--->8-------->8-------->8-------->8-------->8---
backend www {
[...]
.connect_timeout = ...;
.first_byte_timeout = ...;
.between_bytes_timeout = ...;
}
--->8-------->8-------->8-------->8-------->8---
If I have a director for a cluster of similar backends that all share the
same timeout values, I can only repeat them for all declared backends.
And relying on Varnish's defaults only works when you want to share
only one set of timeouts.
Instead, one could imagine doing this:
--->8-------->8-------->8-------->8-------->8---
timeouts www_timeouts {
.connect = ...;
.first_byte = ...;
.between_bytes = ...;
}
backend www1 {
[...]
.timeouts = www_timeouts;
}
backend www2 {
[...]
.timeouts = www_timeouts;
}
backend static {
[...]
.timeouts = {
.connect = ...;
.first_byte = ...;
.between_bytes = ...;
}
}
--->8-------->8-------->8-------->8-------->8---
You can imagine declaring timeouts based on backends locations (eg.
lan vs wan etc) or behaviors (streaming responses vs building them
upfront etc).
Having standalone VCL symbols could also allow a read-only access to
timeouts definitions for VMODs dealing with dynamic backends.
Best Regards,
Dridi
PS. inspired by recent work on probes
More information about the varnish-dev
mailing list