当前位置:网站首页>Distributed solution - distributed session consistency problem

Distributed solution - distributed session consistency problem

2022-07-05 12:32:00 vx-Yang_ Gaige

Distributed Session Consistency issues

What is? Session

Session Is the client and server communication session technology , Such as browser login 、 Record the whole browsing session information

Session Realization principle

After the client sends the request to the server ,Session Create on the server side , return Sessionid Save the client browser locally , When the next request is sent , Pass... In the request header sessionId Get the corresponding from the server Sesison

Session common problem

Session Make sure it's there ?

answer : On the server

Close the browser Session Will it fail

answer : It won't go away

Related codes

@SpringBootApplication
@RestController
public class TestSessionController {

	//  establish session  conversation 
	@RequestMapping("/createSession")
	public String createSession(HttpServletRequest request, String
原网站

版权声明
本文为[vx-Yang_ Gaige]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140529032020.html