O'Reilly logo

OpenShift Cookbook by Shekhar Gulati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring HAProxy to use a different balance algorithm

The HAProxy load balancer can work with several load-balancing algorithms. The configuration used by HAProxy in OpenShift applications uses the leastconn load-balancing algorithm. This algorithm is useful when you have long-lived connections, but is not recommended for short connections. For short connections, as in the case of our application, it is more suitable to use the roundrobin algorithm.

In this recipe, you will learn how to configure HAProxy to use the roundrobin balance algorithm instead of the leastconn algorithm.

Getting ready

To complete this recipe, you will need rhc installed on your machine. This recipe will utilize the application created in the Creating scalable applications ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required