Key Purpose : Helps to manage and balance incoming traffic/load
Load Balance Algorithms :
- Before Red Hat OpenShift Container Platform 4.10 : Three load-balancing algorithms are available
- source
- roundrobin
- leastconn (Default)
- Starting from Red Hat OpenShift Container Platform 4.10 : Four load-balancing algorithms are available
- source
- roundrobin
- random (Default)
- leastconn
How to customize for a specific route :
- Use route annotations.
- Please find the example as below to set the algorithm to leastconn
Eg: oc annotate --overwrite route/example-route haproxy.router.openshift.io/balance=leastconn
Reference :
- https://www.ibm.com/docs/en/masv-and-l/cd?topic=suite-configuring-haproxy-router
- https://ibm-mas.github.io/mas-performance/mas/manage/bestpractice/#load-balancer
- https://ibm-mas.github.io/mas-performance/mas/ocp/bestpractice/#load-balance-algorithm