*** Welcome to piglix ***

Stateless server


In computing, a stateless protocol is a in which no information is retained by either sender or receiver. The sender transmits a packet to the receiver and does not expect an acknowledgment of receipt. A UDP connection-oriented session is a stateless connection because neither systems maintains information about the session during its life.... A stateless protocol does not require the server to retain session information or status about each communications partner for the duration of multiple requests. In contrast, a protocol that requires keeping of the internal state on the server is known as a stateful protocol. In contrast, a TCP connection-oriented session is a 'stateful' connection because both systems maintain information about the session itself during its life...

Examples of stateless protocols include the (IP), which is the foundation for the Internet, and the (HTTP), which is the foundation of data communication for the World Wide Web.

The stateless design simplifies the server design because there is no need to dynamically allocate storage to deal with conversations in progress. If a client session dies in mid-transaction, no part of the system needs to be responsible for cleaning up the present state of the server. 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.

An example of a stateless protocol is HTTP, meaning that each request message can be understood in isolation.

Contrast this with a traditional server that conducts an interactive session with the user. During the session, a user is provided a means to be authenticated and set various variables (working directory, transfer mode), all stored on the server as part of the user's state.

There can be complex interactions between stateful and stateless protocols among different protocol layers. For example, HTTP is an example of a stateless protocol layered on top of , a stateful protocol, which is layered on top of , another stateless protocol, which is routed on a network that employs BGP, another stateful protocol, to direct the IP packets riding on the network.

This stacking of layers continues even above HTTP. 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.


...
Wikipedia

...