- HTTP is an example of a stateless protocol layered on top of TCP, a stateful protocol, which is layered on top of IP, another stateless protocol, which is routed on a network that employs BGP, another stateful protocol, to direct the IP packets riding on the network.
- As a work-around for the lack of a session layer in HTTP, HTTP servers implement various session management methods, typically utilizing a unique identifier in a cookie or parameter that allows the server to track requests originating from the same client, and effectively creating a stateful protocol on top of HTTP.
- A disadvantage of statelessness is that it may be necessary to include additional information in every request, and this extra information will need to be interpreted by the server.
- 一个communications protocol是stateful的,是表明这个protocol的结构是基于session的;也就是说,statefulness是一个protocol内在的、本质上的一个特点。而HTTP中的session就不是HTTP本身的结构特点。
- 在某种程度下,对于communication protocols而言,可以认为stateless的概念和connectionless的概念是一一对应的。
- stateful和stateless既可以描述communicaitons protocols,也可以用来描述一个server,它们的含义是相同的。
Stateful or stateless
猜你喜欢
转载自blog.csdn.net/wwwpcstarcomcn/article/details/38064511
今日推荐
周排行