Home > Article > Backend Development > Seesion problem with Nignx load balancing mysql cluster load balancing load balancer activemq load balancing
*When using weights or rotation to access the server, the sessions generated by the two visits are not on the same server, causing the session to not be found.
Solution:
1. You can temporarily use the ip_hash policy to bind the user to a certain server
2. Through session replication, server network broadcast (network review pressure is relatively high, as long as a key value in a session changes, session synchronization will be performed)
(1) Set the option to enable session replication in tomcat.xml
(2 ) In our application, set up support for distributed web. memcache/redis, etc.
The above introduces the seesion problems of Nignx load balancing, including load balancing and ign content. I hope it will be helpful to friends who are interested in PHP tutorials.