Mailing List Archive

r3411 - in trunk/varnish-cache: bin/varnishd man
Author: petter
Date: 2008-11-20 12:01:26 +0100 (Thu, 20 Nov 2008)
New Revision: 3411

Modified:
trunk/varnish-cache/bin/varnishd/mgt_param.c
trunk/varnish-cache/bin/varnishd/varnishd.1
trunk/varnish-cache/man/vcl.7so
Log:
Added documentaiton on the timeouts

Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_param.c 2008-11-20 10:19:56 UTC (rev 3410)
+++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2008-11-20 11:01:26 UTC (rev 3411)
@@ -773,11 +773,11 @@
"off", "bool" },
{ "connect_timeout", tweak_timeout_double,
&master.connect_timeout,0, UINT_MAX,
- "Default connection timeout for backend connections. "
+ "Default connection timeout for backend connections. "
"We only try to connect to the backend for this many "
"seconds before giving up. "
- "VCL can override this default value for each backend. "
- "This does not apply to pipe. ",
+ "VCL can override this default value for each backend and "
+ "backend request."
0,
"0.4", "s" },
{ "first_byte_timeout", tweak_timeout_double,
@@ -785,7 +785,8 @@
"Default timeout for receiving first byte from backend. "
"We only wait for this many seconds for the first "
"byte before giving up. A value of 0 means it will never time out. "
- "VCL can override this default value for each backend request.",
+ "VCL can override this default value for each backend and "
+ "backend request. This parameter does not apply to pipe.",
0,
"60", "s" },
{ "between_bytes_timeout", tweak_timeout_double,
@@ -793,7 +794,8 @@
"Default timeout between bytes when receiving data from backend. "
"We only wait for this many seconds between bytes "
"before giving up. A value of 0 means it will never time out. "
- "VCL can override this default value for each backend request.",
+ "VCL can override this default value for each backend request and "
+ "backend request. This parameter does not apply to pipe.",
0,
"60", "s" },
{ "accept_fd_holdoff", tweak_timeout,

Modified: trunk/varnish-cache/bin/varnishd/varnishd.1
===================================================================
--- trunk/varnish-cache/bin/varnishd/varnishd.1 2008-11-20 10:19:56 UTC (rev 3410)
+++ trunk/varnish-cache/bin/varnishd/varnishd.1 2008-11-20 11:01:26 UTC (rev 3411)
@@ -405,6 +405,15 @@
.Pp
The default is
.Dv off .
+.It Va between_bytes_timeout
+Default timeout between bytes when receiving data from backend.
+We only wait for this many seconds between bytes before giving up.
+A value of 0 means it will never time out.
+VCL can override this default value for each backend and backend request.
+This parameter does not apply to pipe.
+.Pp
+The default is
+.Dv 60 seconds
.It Va client_http11
Whether to force the use of HTTP/1.1 when responding to client
requests, or just use the same protocol version as that used by the
@@ -412,6 +421,13 @@
.Pp
The default is
.Dv off .
+.It Va connect_timeout
+Default connection timeout for backend connections.
+We only try to connect to the backend for this many seconds before giving up.
+VCL can override this default value for each backend and backend request.
+.Pp
+The default is
+.Dv 0.4 seconds
.It Va default_ttl
The default time-to-live assigned to objects if neither the backend
nor the configuration assign one.
@@ -427,6 +443,15 @@
backend server does not specify a content length.
.Pp
The default is 128 kilobytes.
+.It Va first_byte_timeout
+Default timeout for receiving first byte from backend.
+We only wait for this many seconds for the first byte before giving up.
+A value of 0 means it will never time out.
+VCL can override this default value for each backend and backend request.
+This parameter does not apply to pipe.
+.Pp
+The default is
+.Dv 60 seconds
.It Va group
The name of an unprivileged group to which the child process should
switch before it starts accepting connections.

Modified: trunk/varnish-cache/man/vcl.7so
===================================================================
--- trunk/varnish-cache/man/vcl.7so 2008-11-20 10:19:56 UTC (rev 3410)
+++ trunk/varnish-cache/man/vcl.7so 2008-11-20 11:01:26 UTC (rev 3411)
@@ -92,6 +92,26 @@
set req.backend = www;
}
.Ed
+.Pp
+The timeout parameters can be overridden in the backend declaration.
+The timeout parameters are
+.Fa .connect_timeout
+for the time to wait for a backend connection,
+.Fa .first_byte_timeout
+for the time to wait for the first byte from the backend and
+.Fa .between_bytes_timeout
+for time to wait between each received byte.
+.Pp
+These can be set in the declaration like this:
+.Bd -literal -offset 4n
+backend www {
+ .host = "www.example.com";
+ .port = "http";
+ .connect_timeout = 1s;
+ .first_byte_timeout = 5s;
+ .between_bytes_timeout = 2s;
+}
+.Ed
.Ss Directors
Directors choose from different backends based on health status and a
per-director algorithm.
@@ -516,6 +536,14 @@
.It Va bereq.http. Ns Ar header
The corresponding HTTP
.Ar header .
+.It Va bereq.connect_timeout
+The time in seconds to wait for a backend connection.
+.It Va bereq.first_byte_timeout
+The time in seconds to wait for the first byte from the backend.
+Not available in pipe mode.
+.It Va bereq.between_bytes_timeout
+The time in seconds to wait between each received byte from the backend.
+Not available in pipe mode.
.El
.Pp
The following variables are available after the requested object has