[go: nahoru, domu]

Stateless protocol: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
{{short description|A communication protocol in which the receiver doesmust not retain any session state from previous requests.}}
 
A '''stateless protocol''' is a [[communication protocol]] in which the receiver doesmust not retain any [[Session (computer science)|session]] state from previous requests. The sender transfers relevant session state to the receiver in such a way that every request can be understood in isolation, that is without [[reference]] to session state from previous requests retained by the receiver.<ref>{{cite thesis |last=Fielding |first=Roy Thomas |date=2000 |title=Architectural Styles and the Design of Network-based Software Architectures |type=Doctoral dissertation |publisher=University of California, Irvine |oclc=45706361 |url=https://www.ics.uci.edu/~fielding/pubs/dissertation/net_arch_styles.htm |section-url=https://www.ics.uci.edu/~fielding/pubs/dissertation/net_arch_styles.htm#sec_3_4_3 |section=3.4.3 Client-Stateless-Server (CSS) |access-date=2021-05-18}}</ref>
 
In contrast, a '''stateful protocol''' is a communication protocol thatin requireswhich the receiver tomay retain session state from previous requests.
 
In [[computer network]]s, examples of stateless protocols include the [[Internet Protocol]] (IP), which is the foundation for the [[Internet]], and the [[Hypertext Transfer Protocol]] (HTTP), which is the foundation of the [[World Wide Web]]. Examples of stateful protocols include the [[Transmission Control Protocol]] (TCP) and the [[File Transfer Protocol]] (FTP).
 
Stateless protocols improve the properties of visibility, reliability, and scalability. Visibility is improved because a monitoring system does not have to look beyond a single request in order to determine its full nature. Reliability is improved because it eases the task of recovering from partial failures. Scalability is improved because not having to store session state between requests allows the [[Server (computing)|server]] to quickly free resources and further simplifies implementation.
Stateless protocols are ideal in high volume applications, increasing performance by removing [[Server (computing)|server]] load caused by retention of session state. A disadvantage of statelessness is that it may require including session state in every request, and this extra information will need to be interpreted by the server.
 
The disadvantage of stateless protocols is that they may decrease network performance by increasing the repetitive data sent in a series of requests, since that data cannot be left on the server and reused.
 
== Examples ==