当前位置:网站首页>Web Caching Technology

Web Caching Technology

2022-06-22 23:26:00 Know the origin and know the destination

cookie and session

Cookie: A mechanism for the client to save user information
Session:( Session control ) The server side stores a data structure , Used to track the status of users ,session Object stores the properties and configuration information required for a specific user session . This data can be saved in the cluster 、 database 、 In file .

Session Maintain user login status process :

The user submits the login form ,request

The server verifies the user name and password

After passing, the user information is stored in redis in ,key by session_id

server Back to respone Medium set-cookie The field contains the session_id,client Deposit upon receipt cookie in ,

client When sending a request to the server again , Will add your own... In the request header cookie Information ,server After receiving it, extract it and send it to redis Found in session, Complete business operations .

( More pictures will be added next time )

sticky and non-sticky

sticky: viscosity
non-sticky: Non viscous

原网站

版权声明
本文为[Know the origin and know the destination]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206222103118848.html