Stateful or stateless

  1. 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.
  2. 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.
  3. 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.
  4. 一个communications protocol是stateful的,是表明这个protocol的结构是基于session的;也就是说,statefulness是一个protocol内在的本质上的一个特点。而HTTP中的session就不是HTTP本身的结构特点。
  5. 在某种程度下,对于communication protocols而言,可以认为stateless的概念和connectionless的概念是一一对应的。
  6. stateful和stateless既可以描述communicaitons protocols,也可以用来描述一个server,它们的含义是相同的。

猜你喜欢

转载自blog.csdn.net/wwwpcstarcomcn/article/details/38064511
今日推荐