Welcome! Log In Create A New Profile

Advanced

Re: server persistance using sticky cookie

Sergey A. Osokin
February 24, 2021 07:58AM
Hi,

since this module is a third-party module, I'd recommend to take a
look on GitHub, there are many forks of this module are available
there.

--
Sergey Osokin

On Tue, Feb 23, 2021 at 09:54:00PM -0500, mondji wrote:
> Hi,
> I have setup this module
> https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/src/master/ to
> have an upstream server persistance using cookies,
> I compiled nginx 1.18.0 with this module suscessfully.
>
> Here is my loadbalancer configuration:
>
> /etc/nginx/conf.d/loadbalance.conf
>
> proxy_cache_path /path/to_cache/dir keys_zone=backcache:10m;
>
> upstream backendServers {
> server IP1:81;
> server IP2:81;
> sticky name=mysticky expire=10860 path=/;
> }
>
>
> server {
> listen IP3:80;
> server_name example.com;
>
> location / {
> return 301 https://$server_name$request_uri;
> }
> }
>
> server {
> listen IP3:443 ssl;
> server_name example.com;
>
> location / {
> proxy_pass https://backendServers;
> proxy_http_version 1.1;
> proxy_set_header Upgrade $http_upgrade;
> proxy_set_header Connection $connection_upgrade;
> ...
> }
> }
>
> backend servers are running iis linked with coldfusion (tomcat).
> The sticky seems not working: when I stop a web site on server 1, nginx
> continue to send requests to that
> server. The loadbalance occures only when I clear the browser cache, or
> reboot server 1.
> The cookie is set (name, expiration,...) but nginx is "sticked" to the down
> server.
>
> Is someone here who has tested thi s module
> (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/src/master/)
> with recente nginx version
> If yes, is it working ? ciuld you share your experience ?
>
> Thanks
>
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,290835,290835#msg-290835
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

server persistance using sticky cookie

mondji February 23, 2021 09:54PM

Re: server persistance using sticky cookie

Sergey A. Osokin February 24, 2021 07:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 264
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready