blob: 5f1c9d98f941bfcece97343edfe2d32abcd9bf82 [file] [log] [blame]
Willy Tarreau8263b912011-09-05 01:04:44 +020012011/04/20 - List of keep-alive / close options with associated behaviours.
2
3PK="http-pretend-keepalive", HC="httpclose", SC="http-server-close",
4FC = "forceclose".
5
60 = option not set
71 = option is set
8* = option doesn't matter
9
10Options can be split between frontend and backend, so some of them might have
11a meaning only when combined by associating a frontend to a backend. Some forms
12are not the normal ones and provide a behaviour compatible with another normal
Joseph Herlant71b4b152018-11-13 16:55:16 -080013form. Those are considered alternate forms and are marked "(alt)".
Willy Tarreau8263b912011-09-05 01:04:44 +020014
15FC SC HC PK Behaviour
16 0 0 0 X tunnel mode
17 0 0 1 0 passive close, only set headers then tunnel
18 0 0 1 1 forced close with keep-alive announce (alt)
19 0 1 0 0 server close
20 0 1 0 1 server close with keep-alive announce
21 0 1 1 0 forced close (alt)
22 0 1 1 1 forced close with keep-alive announce (alt)
23 1 * * 0 forced close
24 1 * * 1 forced close with keep-alive announce
25
26At this point this results in 4 distinct effective modes for a request being
27processed :
28 - tunnel mode : Connection header is left untouched and body is ignored
29 - passive close : Connection header is changed and body is ignored
30 - server close : Connection header set, body scanned, client-side keep-alive
31 is made possible regardless of server-side capabilities
32 - forced close : Connection header set, body scanned, connection closed.
33
34The "close" modes may be combined with a fake keep-alive announce to the server
35in order to workaround buggy servers that disable chunked encoding and content
36length announces when the client does not ask for keep-alive.
37
38Note: "http-pretend-keepalive" alone has no effect. However, if it is set in a
39 backend while a frontend is in "http-close" mode, then the combination of
40 both will result in a forced close with keep-alive announces for requests
41 passing through both.
42
43It is also worth noting that "option httpclose" alone has become useless since
441.4, because "option forceclose" does the right thing, while the former only
45pretends to do the right thing. Both options might get merged in the future.
46