Bug 2017708 - Too many haproxy processes in default-router pod causing high load average after upgrade from v4.8.3 to v4.8.10
Summary: Too many haproxy processes in default-router pod causing high load average af...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.8
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.8.z
Assignee: Andrew McDermott
QA Contact: Arvind iyengar
Depends On: 2015829
TreeView+ depends on / blocked
Reported: 2021-10-27 09:56 UTC by Andrew McDermott
Modified: 2022-08-04 22:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
Prior to 4.8 the default balancing algorithm was "leastconn". The default was changed to "random" in OpenShift 4.8.0 for non-passthrough routes. Switching to "random" significantly increases memory consumption for each and every HAProxy process and the cumulative memory usage can be significant particularly if you have a lot of websocket connections. To mitigate this significant memory consumption the default balancing algorithm has now been reverted to "leastconn" for OpenShift 4.8 and 4.9. Once we have a solution that does not incur such significant memory requirements we would default to "random" again, but that would be for a future OpenShift release (i.e., 4.10 or later). You can check the default setting via: $ oc get deployment -n openshift-ingress router-default -o yaml | grep -A 2 ROUTER_LOAD_BALANCE_ALGORITHM - name: ROUTER_LOAD_BALANCE_ALGORITHM value: leastconn The "random" option is still available but each and every route that would benefit from this algorithmic choice will now have to explicitly request that by setting the following annotation on a per-route basis: $ oc annotate -n <NAMESPACE> route/<ROUTE-NAME> "haproxy.router.openshift.io/balance=random"
Clone Of:
Last Closed: 2021-11-11 20:12:09 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift cluster-ingress-operator pull 670 0 None Merged [release-4.8] Bug 2017708: Change default balancing algorithm to "leastconn" 2021-11-10 13:42:24 UTC
Red Hat Product Errata RHBA-2021:4109 0 None None None 2021-11-11 20:12:25 UTC

Comment 3 Hongan Li 2021-10-29 08:55:16 UTC
verified with 4.8.0-0.nightly-2021-10-28-175240 and passed.

sh-4.4$ env | grep BALANCE

backend be_secure:openshift-console:console
  mode http
  option redispatch
  option forwardfor
  balance leastconn

backend be_edge_http:openshift-console:downloads
  mode http
  option redispatch
  option forwardfor
  balance leastconn

Comment 6 errata-xmlrpc 2021-11-11 20:12:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.8.19 bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.