Switching backends based on a cookie

Marcus Clyne ngx.eugaia at gmail.com
Sun Jan 31 03:01:12 MSK 2010

> Hi,
> The only option then for sticky sessions is ip_hash, not cookies.

No, it's also possible to direct traffic to particular backend servers using
cookies too.

In fact there are more ways of directing traffic to backends/clusters with
Nginx than there are with HAProxy - in the sense of the number of ways of
choosing a cluster (which could just be one server) - but AFAIK there are
currently fewer ways of hashing / distributing over the servers in a
particular cluster of backends with Nginx than HAProxy (even if you include
the non-core modules).

If you did want high redundancy as well as sticky sessions, though, then
you'd probably want to store your key application data in something like
memcached and get your backend application to quiz that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100131/2025a097/attachment.html>

More information about the nginx mailing list