Hello,

I'm testing HAProxy's cookie based persistence feature(s) and I have a question. Currently I have 2 test servers set up behind HAProxy. They use a JSESSIONID cookie like many java application servers.

In haproxy.cfg I have these persistence settings:

server server1 127.0.0.1:9443    ssl verify none check cookie server1
    server server2 172.28.128.3:9443 ssl verify none check cookie server2

    cookie JSESSIONID prefix

This works as expected. HAProxy adds the prefix to the cookie and this enables "sticky" sessions.

When I put, for example, server1 into maintenance, HAProxy routes server1 clients to server2. I can see this in the HAProxy logs with termination flags "--DN". When I put server1 back in service, it routes server1 clients back to server1, because the cookie has not changed (flag "--VN").

But what if I had a server3? When I put server1 in maint, will server1 clients be randomly routed to server2 & 3 on each request? Or are they somehow temporarily persisted to server 2 or 3 until server1 becomes available again?

Thank you,
Colin Ingarfield

Reply via email to