Welcome! Log In Create A New Profile

Advanced

Re: least_conn method session issue

Maxim Dounin
October 21, 2022 06:38PM
Hello!

On Fri, Oct 21, 2022 at 06:04:00PM -0400, Dr_tux wrote:

> I use least_conn in Nginx (reverse proxy), but when I open the application's
> dashboard, it logs out. It doesn't do this in ip_hash method. What should I
> do for this? I m stuck in this situation, I can use least_conn on AWS and it
> 's working properly.

Is your application's dashboard able to maintain user session
across different backend servers? Symptoms suggests it probably
doesn't, so you have to either configure your backend to ensure
session sharing between servers[1], or use some forms user-aware
balancing such as ip_hash or hash.

[1] For example, in PHP there are standard ways to store sessions
across multiple servers, such as memcached, see
https://www.php.net/manual/en/memcached.sessions.php for details.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

least_conn method session issue

Dr_tux October 21, 2022 06:04PM

Re: least_conn method session issue

Maxim Dounin October 21, 2022 06:38PM

Re: least_conn method session issue

Dr_tux October 22, 2022 01:09AM

Re: least_conn method session issue

Dr_tux October 22, 2022 01:17AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 194
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