Skip to content

Conversation

@frobware
Copy link
Contributor

@frobware frobware commented Apr 6, 2022

This enhancement proposes a new field be added to the
IngressController API to allow the maximum number of simultaneous
connections (i.e., maxconn) be configurable by cluster
administrators.

@openshift-ci openshift-ci bot requested review from dtantsur and jwforres April 6, 2022 16:51
frobware added a commit to frobware/api that referenced this pull request Apr 6, 2022
Adds a new field to the IngressController API to allow the maximum
number of simultaneous connections (i.e., maxconn) be configurable by
cluster administrators:

openshift/enhancements#1084
frobware added a commit to frobware/api that referenced this pull request Apr 6, 2022
Adds a new field to the IngressController API to allow the maximum
number of simultaneous connections (i.e., maxconn) be configurable by
cluster administrators:

openshift/enhancements#1084

HAProxy builds its data structures ahead of time. If you specify a
large value for `spec.tuningOptions.maxConnections` then that memory
is allocated up-front when the process starts. It is never released.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was curious and I confirmed this as well. 500 backend leastconn config with 20,000 maxconn was about ~280mB. Increased to 500,000 maxconn and it spiked to 366mB.

Copy link
Contributor

@gcs278 gcs278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me. I think we discussed this quite a bit so I'm on board with everything you documented here. The "-1" for maxConn auto feels a bit awkward as a end-user, but I see your rational for a more strongly typed parameter. I'll yield to others
that know these datatypes better.

frobware added a commit to frobware/api that referenced this pull request Apr 12, 2022
Adds a new field to the IngressController API to allow the maximum
number of simultaneous connections (i.e., maxconn) be configurable by
cluster administrators:

openshift/enhancements#1084
frobware added a commit to frobware/api that referenced this pull request Apr 14, 2022
Adds a new field to the IngressController API to allow the maximum
number of simultaneous connections (i.e., maxconn) be configurable by
cluster administrators:

openshift/enhancements#1084
Comment on lines 60 to 61
queued clients will time out; 20000 is likely too small a value for
the majority of deployments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any data to substantiate the "likely too small" statement?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None. I will remove the comment as it is subjective.

Comment on lines 167 to 169
To do this, the administrator can configure
`spec.nodePlacement.nodeSelector` with labels that match the intended
node, as well as configuring `spec.tuningOptions.maxConnections`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The administrator will probably also want to increase nbthread.

Comment on lines 173 to 175
within the container when HAProxy starts. The nature of HAProxy's
dynamic computation also takes into consideration what is configured
in `haproxy.config` at that time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nature of HAProxy's
dynamic computation also takes into consideration what is configured
in haproxy.config at that time.

Can you elaborate on this point a little?

router deployment roll out the new pods.

```sh
$ oc patch ingresscontroller/default --type=merge --patch '{"spec":{"tuningOptions":{"maxConnections":-1}}}' -n openshift-ingress-operator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope curious administrators will use a test ingresscontroller and not the default one.

Comment on lines 277 to 278
2. If you want an exact value then set a value that is improbably
large, heed the warning and the suggested fix, then configure a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused by the wording here. Is the "improbably large" value the one that the user actual wants to set? Is heeding the warning and suggested fix the same step as configuring the tuned profile?

frobware added a commit to frobware/api that referenced this pull request Apr 19, 2022
Adds a new field to the IngressController API to allow the maximum
number of simultaneous connections (i.e., maxconn) be configurable by
cluster administrators:

openshift/enhancements#1084
frobware added a commit to frobware/api that referenced this pull request Apr 21, 2022
Adds a new field to the IngressController API to allow the maximum
number of simultaneous connections (i.e., maxconn) be configurable by
cluster administrators:

openshift/enhancements#1084
frobware added a commit to frobware/api that referenced this pull request Apr 25, 2022
Adds a new field to the IngressController API to allow the maximum
number of simultaneous connections (i.e., maxconn) be configurable by
cluster administrators:

openshift/enhancements#1084
frobware added a commit to frobware/api that referenced this pull request Apr 27, 2022
Adds a new field to the IngressController API to allow the maximum
number of simultaneous connections (i.e., maxconn) be configurable by
cluster administrators:

openshift/enhancements#1084
frobware added a commit to frobware/api that referenced this pull request Apr 27, 2022
Adds a new field to the IngressController API to allow the maximum
number of simultaneous connections (i.e., maxconn) be configurable by
cluster administrators:

openshift/enhancements#1084
@frobware frobware force-pushed the haproxy-max-connections branch from 459ab3f to d5f8bf1 Compare April 27, 2022 12:57
frobware added a commit to frobware/api that referenced this pull request Apr 28, 2022
Adds a new field to the IngressController API to allow the maximum
number of simultaneous connections (i.e., maxconn) be configurable by
cluster administrators:

openshift/enhancements#1084
frobware and others added 6 commits April 28, 2022 13:19
This enhancement proposes a new field be added to the
IngressController API to allow the maximum number of simultaneous
connections (i.e., `maxconn`) be configurable by cluster
administrators.
@frobware frobware force-pushed the haproxy-max-connections branch 2 times, most recently from d558dd7 to 5cf782d Compare April 28, 2022 19:21
@frobware frobware force-pushed the haproxy-max-connections branch from 5cf782d to dec25f2 Compare April 29, 2022 10:21
@frobware
Copy link
Contributor Author

@Miciah I addressed your feedback. Please could you take another look.

@Miciah
Copy link
Contributor

Miciah commented May 9, 2022

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 9, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 9, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miciah

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 9, 2022
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@Miciah
Copy link
Contributor

Miciah commented May 9, 2022

The linter has a new requirement:

 enhancements/ingress/haproxy-max-connections-tuning.md missing "### Workflow Description" 

This requirement is redundant because you already have detailed use-cases, and the requirement wasn't there when the PR was posted, so I'll try to override it.

/override ci/prow/markdownlint

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 9, 2022

@Miciah: Overrode contexts on behalf of Miciah: ci/prow/markdownlint

Details

In response to this:

The linter has a new requirement:

enhancements/ingress/haproxy-max-connections-tuning.md missing "### Workflow Description" 

This requirement is redundant because you already have detailed use-cases, and the requirement wasn't there when the PR was posted, so I'll try to override it.

/override ci/prow/markdownlint

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 9, 2022

@frobware: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 1193f96 into openshift:master May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants