Willy Tarreau | 8263b91 | 2011-09-05 01:04:44 +0200 | [diff] [blame] | 1 | 2011/04/20 - List of keep-alive / close options with associated behaviours. |
| 2 | |
| 3 | PK="http-pretend-keepalive", HC="httpclose", SC="http-server-close", |
Willy Tarreau | 8263b91 | 2011-09-05 01:04:44 +0200 | [diff] [blame] | 4 | |
| 5 | 0 = option not set |
| 6 | 1 = option is set |
| 7 | * = option doesn't matter |
| 8 | |
| 9 | Options can be split between frontend and backend, so some of them might have |
| 10 | a meaning only when combined by associating a frontend to a backend. Some forms |
| 11 | are not the normal ones and provide a behaviour compatible with another normal |
Joseph Herlant | 71b4b15 | 2018-11-13 16:55:16 -0800 | [diff] [blame] | 12 | form. Those are considered alternate forms and are marked "(alt)". |
Willy Tarreau | 8263b91 | 2011-09-05 01:04:44 +0200 | [diff] [blame] | 13 | |
Willy Tarreau | 6ba6984 | 2021-06-11 16:01:50 +0200 | [diff] [blame] | 14 | SC HC PK Behaviour |
| 15 | 0 0 X tunnel mode |
| 16 | 0 1 0 passive close, only set headers then tunnel |
| 17 | 0 1 1 forced close with keep-alive announce (alt) |
| 18 | 1 0 0 server close |
| 19 | 1 0 1 server close with keep-alive announce |
| 20 | 1 1 0 forced close (alt) |
| 21 | 1 1 1 forced close with keep-alive announce (alt) |
Willy Tarreau | 8263b91 | 2011-09-05 01:04:44 +0200 | [diff] [blame] | 22 | |
| 23 | At this point this results in 4 distinct effective modes for a request being |
| 24 | processed : |
| 25 | - tunnel mode : Connection header is left untouched and body is ignored |
| 26 | - passive close : Connection header is changed and body is ignored |
| 27 | - server close : Connection header set, body scanned, client-side keep-alive |
| 28 | is made possible regardless of server-side capabilities |
| 29 | - forced close : Connection header set, body scanned, connection closed. |
| 30 | |
| 31 | The "close" modes may be combined with a fake keep-alive announce to the server |
| 32 | in order to workaround buggy servers that disable chunked encoding and content |
| 33 | length announces when the client does not ask for keep-alive. |
| 34 | |
| 35 | Note: "http-pretend-keepalive" alone has no effect. However, if it is set in a |
| 36 | backend while a frontend is in "http-close" mode, then the combination of |
| 37 | both will result in a forced close with keep-alive announces for requests |
| 38 | passing through both. |
| 39 | |