Login processing does not work properly after scaling out the web. The current state is looking at the upstream web from the nginx side in two. When logging in, multiple requests to the web are requested separately, resulting in a 302 error. After several trouble shootings, I found out that this was a bug caused by scale out. There seems to be a situation in which some of the multiple api requests that occur during login should be executed on the same web node. Is there a way to solve this? Currently, the login function is restored by temporarily distributing requests to the upstream web in the ip_hash method, but is there a better way?
For reference, memcached is also separate now. The memcached is shared by web and worker. The connection status was checked through memcached’s cli.