资 源 简 介
DEPRECATED
see https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/overview
This project has been forked and will no longer be updated. See https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/overview for updates.
Old Description
When dealing with several backend servers, it"s sometimes useful that one client (browser) is always served by the same backend server (for session persistance for example).
Using a persistance by IP (with the ip_hash upstream module) is maybe not a good idea because there could be situations where a lot of different browsers are coming with the same IP address (behind proxies) and the load balancing system won"t be fair.
Using a cookie to track the upstream server makes each browser unique.
When the sticky module can"t apply, it switchs back to the classic Round Robin or returns a "Bad Gateway" (depending on the no_fallback flag).
Sticky module can"t apply when