The PHP server session is stored as a file. when the user's access volume is too large, the session persistence problem will occur. the following two solutions are available, you can refer to the PHP server session to store files. when the user's traffic is too large, there will be a lot of session files, and when the server is added horizontally, the session files cannot be synchronized, session persistence issues.
There are two solutions:
1. use NFS or Samba file sharing to share session files on a single server to solve the problem of session non-synchronization during server load balancer. (However, the efficiency issue cannot be solved. if there are tens of thousands of session files, the query will be slow)
2. session is stored in the database. other servers can share the database server to solve the session problem. at the same time, the database also solves the file efficiency problem. Databases can be scaled horizontally to solve both speed and volume issues.