You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ingress-controller-router-timeout.adoc
+35-16Lines changed: 35 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,23 +12,42 @@ To manage connection durations and optimize performance of your Ingress Controll
12
12
.Configuring a router timeout
13
13
`TimeUnits` are represented by a number followed by the unit: `us`*(microseconds), `ms` (milliseconds, default), `s` (seconds), `m` (minutes), `h` *(hours), `d` (days).
14
14
15
-
The regular expression is: [1-9][0-9]*(`us`|`ms`|`s`|`m`|`h`|`d`)
15
+
The regular expression is: [1-9][0-9]*(`us`|`ms`|`s`|`m`|`h`|`d`).
16
16
17
17
.Router timeout variables
18
-
[cols="3*", options="header"]
18
+
[cols="2,1,2a", options="header"]
19
19
|===
20
-
|Variable | Default |Description
21
-
|`ROUTER_BACKEND_CHECK_INTERVAL` |`5000ms` |Length of time between subsequent liveness checks on back ends.
22
-
|`ROUTER_CLIENT_FIN_TIMEOUT` |`1s` |Controls the TCP FIN timeout period for the client connecting to the route. If the FIN sent to close the connection does not answer within the given time, HAProxy closes the connection. This is harmless if set to a low value and uses fewer resources on the router.
23
-
|`ROUTER_DEFAULT_CLIENT_TIMEOUT` |`30s` |Length of time that a client has to acknowledge or send data.
24
-
|`ROUTER_DEFAULT_CONNECT_TIMEOUT` |`5s` |The maximum connection time.
25
-
|`ROUTER_DEFAULT_SERVER_FIN_TIMEOUT` |`1s` |Controls the TCP FIN timeout from the router to the pod backing the route.
26
-
|`ROUTER_DEFAULT_SERVER_TIMEOUT` |`30s` |Length of time that a server has to acknowledge or send data.
27
-
|`ROUTER_DEFAULT_TUNNEL_TIMEOUT` |`1h` |Length of time for TCP or WebSocket connections to remain open. This timeout period resets whenever HAProxy reloads.
28
-
|`ROUTER_SLOWLORIS_HTTP_KEEPALIVE` |`300s` |Set the maximum time to wait for a new HTTP request to appear. If this is set too low, it can cause problems with browsers and applications not expecting a small `keepalive` value.
20
+
|Variable | Default | Description
21
+
| `ROUTER_BACKEND_CHECK_INTERVAL` | `5000ms` | Length of time between subsequent liveness checks on back ends.
22
+
| `ROUTER_CLIENT_FIN_TIMEOUT` | `1s` | Controls the TCP FIN timeout period for the client connecting to the route. If the FIN sent to close the connection does not answer within the given time, HAProxy closes the connection. This is harmless if set to a low value and uses fewer resources on the router.
23
+
| `ROUTER_DEFAULT_CLIENT_TIMEOUT` | `30s` | Length of time that a client has to acknowledge or send data.
24
+
| `ROUTER_DEFAULT_CONNECT_TIMEOUT` | `5s` | The maximum connection time.
25
+
| `ROUTER_DEFAULT_SERVER_FIN_TIMEOUT` | `1s` | Controls the TCP FIN timeout from the router to the pod backing the route.
26
+
| `ROUTER_DEFAULT_SERVER_TIMEOUT` | `30s` | Length of time that a server has to acknowledge or send data.
27
+
| `ROUTER_DEFAULT_TUNNEL_TIMEOUT` | `1h` | Length of time for TCP or WebSocket connections to remain open. This timeout period resets whenever HAProxy reloads.
28
+
| `ROUTER_SLOWLORIS_HTTP_KEEPALIVE` | `300s` | Set the maximum time to wait for a new HTTP request to appear. If this is set too low, it can cause problems with browsers and applications not expecting a small `keepalive` value.
29
+
29
30
Some effective timeout values can be the sum of certain variables, rather than the specific expected timeout. For example, `ROUTER_SLOWLORIS_HTTP_KEEPALIVE` adjusts `timeout http-keep-alive`. It is set to `300s` by default, but HAProxy also waits on `tcp-request inspect-delay`, which is set to `5s`. In this case, the overall timeout would be `300s` plus `5s`.
30
-
|`ROUTER_SLOWLORIS_TIMEOUT` |`10s` |Length of time the transmission of an HTTP request can take.
31
-
|`RELOAD_INTERVAL` |`5s` |Allows the minimum frequency for the router to reload and accept new changes.
32
-
|`ROUTER_METRICS_HAPROXY_TIMEOUT` |`5s` |Timeout for the gathering of HAProxy metrics.
33
-
===
34
-
---
31
+
| `ROUTER_SLOWLORIS_TIMEOUT` | `10s` | Length of time the transmission of an HTTP request can take.
32
+
| `RELOAD_INTERVAL` | `5s` | Allows the minimum frequency for the router to reload and accept new changes.
33
+
| `ROUTER_METRICS_HAPROXY_TIMEOUT` | `5s` | Timeout for the gathering of HAProxy metrics.
34
+
35
+
|===
36
+
37
+
.A route setting custom timeout
38
+
[source,yaml]
39
+
----
40
+
apiVersion: route.openshift.io/v1
41
+
kind: Route
42
+
metadata:
43
+
annotations:
44
+
haproxy.router.openshift.io/timeout: 5500ms <1>
45
+
...
46
+
----
47
+
<1> Specifies the new timeout with HAProxy supported units (`us`, `ms`, `s`, `m`, `h`, `d`). If the unit is not provided, `ms` is the default.
48
+
49
+
[NOTE]
50
+
====
51
+
Setting a server-side timeout value for passthrough routes too low can cause
52
+
WebSocket connections to timeout frequently on that route.
0 commit comments