Home > REST Constraints > Stateless

Stateless

The communication between service consumer (client) and service (server) must be stateless between requests. This means that each request from a service consumer should contain all the necessary information for the service to understand the meaning of the request, and all session state data should then be returned to the service consumer at the end of each request.

Statelessness is one of the primary influences over service contract design in REST-style architecture. It imposes significant restrictions on the kinds of communication allowed between services and their consumers in order to achieve its design goals (Figure 1).

Stateless: Statelessness ensures that each service consumer request can be treated independently by the service.

Figure 1 - Statelessness ensures that each service consumer request can be treated independently by the service.