Persistence + Round robin
grzegorz.nosek at gmail.com
Thu Sep 25 12:55:53 MSD 2008
On Thu, Sep 25, 2008 at 03:43:24AM -0500, Brian Moschel wrote:
> While your proposed solution provides a clever way to stick requests to the
> same node, it doesn't provide a way to fulfill the first part of my
> requirement: dispatching the first 100 requests with Referer=
> www.somedomain.com to nodeA and the next 100 to nodeB. UPSTREAM_FAIR looks
> great but it doesn't fill this need.
No, not really. upstream_fair won't help you there, it's just a totally
awesome load balancer module (j/k). I can't see a way to do this in pure
nginx right now. But you might use some tricks on your application
servers, e.g. nodeA sticks the session to nodeB when appropriate (and e.g.
transfers the user's session data to nodeB somehow).
Anyway, I think you'll have to write _some_ code, either in your application,
or in nginx.
More information about the nginx