Conditional balancing

Maxim Dounin mdounin at mdounin.ru
Sun Aug 4 21:47:13 UTC 2013


Hello!

On Sun, Aug 04, 2013 at 03:43:16PM -0500, Nulik Nol wrote:

> I am developing a webmail service where the user's inbox and all
> related session  variables will be loaded to one of many application
> servers which will be behind the balancer (running nginx). So, I need
> nginx to direct all requests of a particular user, to a particular
> application server. How can it be done?
> One way, I think, is to integrate zookeeper into nginx as module, this
> way nginx will communicate with the application daemon and always know
> which appserver is holding user's session and data. But this is a lot
> of work, is there any other solution to do this sort of conditional
> balancing ?

Trivial solution would be to use a cookie to specify backend 
needed, and set the cookie during login.

-- 
Maxim Dounin
http://nginx.org/en/donation.html



More information about the nginx mailing list