I checked a lot of information. I also thought a lot. Let's summarize it!
Does php use cookies or sessions for high-performance and high-traffic user login authentication?
I. What is the difference between cookie session?
Cookie client;
The session has a server;
Session Security.
II. Difficulties in session distribution.
Memcache may solve this problem. However, if memcache is not used, the problem will be solved.
3. session is not as convenient as cookie in the life cycle.
4. The biggest problem with cookie usage is that the server requires secondary verification. If session verification is used, it is better to use session. The same is true for queries.
If the cookie does not require secondary verification on the server, the efficiency will be greatly improved. It is estimated that discuz is like this.
5. Combine session and cookie. This is further divided into the above points.