Php load balancing. Session can be shared in the local area network, but not in the external network.

1. First of all, session is the
2 where the database is stored, the server is all connected to the same database, and the same project is accessed
3. The main purpose is to solve problems, not to mention useless

.

Thank you, the project is in a hurry, please help me!


session_handler related functions are posted. By default, files are saved. You save the database to prove that there are modifications here


first of all, session is not recommended to save the database, it will be slow.

session is dependent on cookie. If the domain names of the public network and the private network are the same or inconsistent, cross-domain will occur. If the cookie is not shared after the cross-domain, then you need to log in again even if the account is unified. The question is, is this it?


session is not good at storing db, so it is appropriate to put redis as a cache. After all, it has a high reading frequency and is temporary

.
Menu