Commit 353a283a authored by Petter Knudsen's avatar Petter Knudsen

Added documentaiton on the timeouts

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3411 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 654f28d2
......@@ -773,11 +773,11 @@ static const struct parspec parspec[] = {
"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 @@ static const struct parspec parspec[] = {
"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 @@ static const struct parspec parspec[] = {
"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,
......
......@@ -405,6 +405,15 @@ triggered the retrieval.
.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 @@ backend server which delivered the requested document.
.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 @@ The default chunk size used when retrieving documents for which the
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.
......
......@@ -92,6 +92,26 @@ if (req.http.host ~ "^(www\.)?example.com$") {
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 @@ The HTTP protocol version used to talk to the server.
.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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment