Which REST constraint means each request carries all information needed to process it?
Options
- Uniform interface
- Statelessness (Correct option)
- Cacheability
- Layered system
Answer
Statelessness
Why
Stateless: the server does not remember anything about the client between requests. Each request brings everything needed, e.g. an auth token.
Benefit: any server instance can handle any request, so you can add servers behind a load balancer easily.
User data still lives in the database; 'stateless' refers to the server process memory.
Remember
Stateless = every request is self-contained.