1

Folks,

I moved one of our SaaS applications off a coyote point hardware load balancer onto a vm running nginx + haproxy with haproxy handling hash persistence.

The problem I'm running into is the app requires session stickiness to a single backend server (whichever takes the original request) but when I make a change to haproxy.cfg and do a service haproxy reload it restarts haproxy as a new process and kills the old process which terminates any existing connections to specific backend servers, meaning any users are immediately logged out of the app.

Here is the haproxy backend configuration for HA-Proxy version 1.5.4 2014/09/02

backend webapp
    balance hdr(X-Real-IP)
        hash-type consistent
        mode http
        server server1 192.168.10.50:8080 check port 8080
        server server2 192.168.10.53:8080 check port 8080
        server server3 192.168.10.55:8080 check port 8080
        server server4 192.168.10.62:8080 check port 8080 backup

This is a big problem for us, in that when I need to perform maintenance to an specific backend server, or add/remove additional servers from the backend pool I cannot do it without impacting client experience of the app.

How can I dynamically make changes to the servers in the backend without terminating existing sessions to the backends I'm not changing if Haproxy won't reload gracefully?

1 Answer 1

2

If you define a peer for the server, even if it is only one and it is the local one, at each soft restart of haproxy, the state should be replicated to the new process.

Documentation

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .