What does stateless design mean in REST?
Answer
Stateless design means the server does not store any client session state between requests. Every request from the client must contain all the information needed to understand and process it — the server cannot rely on knowing what the client did in a previous request. Authentication tokens (JWT or API keys) are sent with every request in the Authorization header rather than stored in server-side sessions. This constraint has significant benefits: the server can scale horizontally easily (any server can handle any request since no session affinity is needed), fault tolerance improves (a server restart does not invalidate sessions), and load balancers can distribute requests freely. The tradeoff is larger request payloads since the client must repeatedly send credentials.
More REST API Design Questions
View all →- Beginner What is REST and what are its six architectural constraints?
- Beginner What are the main HTTP methods used in REST APIs and what do they do?
- Beginner What is idempotency and which HTTP methods are idempotent?
- Beginner What are the most important HTTP status codes in REST APIs?
- Beginner What are REST resource naming conventions?