Upstream "Sticky Connections?"

Jérôme Loyet jerome at loyet.net
Wed Jul 18 14:01:39 UTC 2012


2012/7/18 mevans336 <nginx-forum at nginx.us>
>
> Hello Everyone,
>
> We are currently using Nginx 1.2.1 to terminate SSL and to load balance
> between two JBoss servers.
>
> Here is my upstream block:
>
>
> upstream jboss_servers {
> ip_hash;
> server 192.168.1.100:8080;
> server 192.168.1.101:8080;
> }
>
> The issue we're having is such -- When a user is connected to Nginx,
> Nginx will proxy the connection to one of the two backend servers, for
> example 192.168.1.100. If we take that server offline (by stopping
> JBoss) the user is directed to the 192.168.1.101 server and their
> session is broken, requiring them to login again. We understand and
> accept this.
>
> However, when server 192.168.1.100 is brought back online, Nginx is then
> redirecting their session back to that server, breaking their session
> and requiring them to login yet again.
>
> Is there a directive I can use to prevent this behavior? I've seen this
> referred to in other places as sticky sessions, does Nginx support a
> similar method?
>


you can look at this module: http://code.google.com/p/nginx-sticky-module/



More information about the nginx mailing list