Skip to content

Commit 95bbde1

Browse files
authored
Merge pull request #45265 from jldohmann/OSDOCS-3539
OSDOCS-3539: add maxConnections parameter
2 parents fd04c35 + 03be3bc commit 95bbde1

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

modules/nw-ingress-controller-configuration-parameters.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,19 @@ supports up to `64` threads. If this field is empty, the Ingress Controller uses
216216
217217
* `tunnelTimeout` specifies how long a tunnel connection, including websockets, remains open while the tunnel is idle. If unset, the default timeout is `1h`.
218218
219+
* `maxConnections` specifies the maximum number of simultaneous connections that can be established per HAProxy process. Increasing this value allows each ingress controller pod handle more connections at the cost of additional system resources. Permitted values are `0`, `-1`, any value within the range `2000` and `2000000`, or the field can be left empty.
220+
221+
** If this field is left empty or has the value `0`, the ingress controller will use the default value of `20000`. This value is subject to change in future releases.
222+
223+
** If the field has the value of `-1`, then HAProxy will dynamically compute a maximum value based on the available `ulimits` in the running container. This process results in a large computed value that will incur significant memory usage compared to the current default value of `20000`.
224+
225+
** If the field has a value that is greater than the current operating system limit, the HAProxy process will not start.
226+
227+
** If you choose a discrete value and the router pod is migrated to a new node, it is possible the new node does not have an identical `ulimit` configured. In such cases, the pod fails to start.
228+
229+
** If you have nodes with different `ulimits` configured, and you choose a discrete value, it is recommended to use the value of `-1` for this field so that the maximum number of connections is calculated at runtime.
230+
231+
219232
|`logEmptyRequests`
220233
|`logEmptyRequests` specifies connections for which no request is received and logged. These empty requests come from load balancer health probes or web browser speculative connections (preconnect) and logging these requests can be undesirable. However, these requests can be caused by network errors, in which case logging empty requests can be useful for diagnosing the errors. These requests can be caused by port scans, and logging empty requests can aid in detecting intrusion attempts. Allowed values for this field are `Log` and `Ignore`. The default value is `Log`.
221234

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Modules included in the following assemblies:
2+
//
3+
// * ingress/configure-ingress-operator.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-ingress-setting-max-connections_{context}"]
7+
= Setting the Ingress Controller maximum connections
8+
A cluster administrator can set the maximum number of simultaneous connections for OpenShift router deployments. You can patch an existing Ingress Controller to increase the maximum number of connections.
9+
10+
.Prerequisites
11+
* The following assumes that you already created an Ingress Controller
12+
13+
.Procedure
14+
* Update the Ingress Controller to change the maximum number of connections for HAProxy:
15+
+
16+
[source,terminal]
17+
----
18+
$ oc -n openshift-ingress-operator patch ingresscontroller/default --type=merge -p '{"spec":{"tuningOptions": {"maxConnections": 7500}}}'
19+
----
20+
+
21+
[WARNING]
22+
====
23+
If you set the `spec.tuningOptions.maxConnections` value greater than the current operating system limit, the HAProxy process will not start. See the table in the "Ingress Controller configuration parameters" section for more information about this parameter.
24+
====

networking/ingress-operator.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ include::modules/nw-configuring-router-compression.adoc[leveloffset=+2]
7676
include::modules/nw-customize-ingress-error-pages.adoc[leveloffset=+2]
7777
//include::modules/nw-ingress-select-route.adoc[leveloffset=+2]
7878

79+
include::modules/nw-ingress-setting-max-connections.adoc[leveloffset=+2]
80+
7981
[role="_additional-resources"]
8082
== Additional resources
8183

0 commit comments

Comments
 (0)