On 11/19/2013 11:39 PM, Baptiste wrote:
On Wed, Nov 20, 2013 at 3:52 AM, Ritchie Iu <[email protected]> wrote:
Hi,

I've recently started to use HAProxy and I was able to get it running with a
couple of servers using cookies for sticky sessions.

My question is, if I want to shutdown a server for maintenance, is there any
way to redirect sessions with cookies tied with that server to another
server? I'm hoping that users could still remain logged on and not notice
the server shutdown.

Thank you for the help,
Ritchie

Hi Richie,

Application session resiliance means you can share the application
session between the application servers.
Sharing the application sessions between application servers is not a
problem the load-balancer can fix.
You have to store the application session in a SQL database, a NFS
share or better, if you have a huge traffic, in a NoSQL database.

Baptiste
Hi Baptiste,

Thank you for your response. It does make sense to store the application session into a database so that other servers can find it.

So I was wondering, is there any way to direct traffic to a specific server? I know this kind of defeats the purpose of using a load balancer but here is my use case: If I am bringing down my servers one by one for maintenance, I wouldn't want one session to go from one server shutting down to another server that's about to be shut down, and so on. If directing traffic was possible, I could have sessions go to a server that has already been updated and restarted.

Thanks,
Ritchie

Reply via email to