Posts

Showing posts from October, 2015

Soft-removing balancing node from HAProxy

HAProxy is great! It is a simple tool that allows to balance the load across multiple servers and it's pretty easy to setup and configure.

But I have encountered a little bit challenging to handle the upgrade of one of the server node. You see, in the most common configuration, HAProxy is set to just checks for a port on the server, for example the WildlFly port 8080, so, in order to stop receiving requests from clients, you either stop the application server or disable it on HAProxy. Neither of those methods worked for the application I was working on for various reasons that are out of scope of this post.

The solution I have found is pretty simple and it is based on a URL on the application server itself, that HAPRoxy is using to check if the node is available. For example:
http://localhost:8080/console/health Here is an example of HAProxy configuration, that is using this URL for health checking:
global daemon maxconn 4096 user haproxy group haproxy defaults …