Hi,

hope you're doing well.

On Mon, Feb 21, 2022 at 02:20:01PM -0500, george22 wrote:
> Hi
> 
> I've implemented sticky learn for my weblogic application running on 3
> servers using Nginx as the reverse proxy and trying to get an understanding
> of how nginx sticky learn works. 
> 
> The JSESSIONID cookies are of the form <session identifier>!<primary server
> id 1><!secondar server id 2>. 
> 
> I understand that nginx learns from the 'sticky create' to determine which
> upstream server the request should be routed to using lookup cookie. But it
> is not clear from the documentation what happens when the upstream primary
> server is down. Will nginx route to secondary server? Based on my initial
> tests it looks like it does not route to the secondary server. I need
> confirmation if this is expected behavior. What do I need to do to route
> requests to secondary server if primary server is down using sticky learn? 
> 
> 
> upstream app1 {
>         least_conn;
>         zone app1 64k;
>         server srv1.example.com:5111;
>         server srv2.example.com:5111;
>         server srv3.example.com:5111;
>         sticky learn
>            create=$upstream_cookie_JSESSIONID
>            lookup=$cookie_JSESSIONID
>            zone=client-sessions:1m
>            timeout=2h;
>     }

The sticky [1] directive, from the http_upstream module [2], is the part
of the commercial subscription [3], so I'd recommend to send your
questions and concerns to the NGINX Plus support team, [4].

Thank you.

[1] https://nginx.org/en/docs/http/ngx_http_upstream_module.html#sticky
[2] https://nginx.org/en/docs/http/ngx_http_upstream_module.html
[3] https://www.nginx.com/products/
[4] https://www.nginx.com/support

--
Sergey A. Osokin
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-le...@nginx.org

Reply via email to