The problem of nginx redirecting load session

the server does redirect rewrite (. *) http://ip:xxxx/ points to the load server.
there is no redirection before, but ip_hash is used to solve the session problem.
upstream aa {
ip_hash;
server ip1:xxxx;
server ip2:xxxx;
}
both hash $http_x_forwarded_for; and hash $cookie_jsessionid;
have not achieved the load effect. How do I configure them?

Jun.09,2021

if the backend is Spring, consider using redis to save the session, so that the session can be saved across nodes.
by the way, why did you change from ip_hash to rewrite?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35210-2bf79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35210-2bf79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?