Overview#Stateless (or Immutable) systems or protocols do NOT maintain state and prior knowledge (data) does NOT affect the processing of the current data.
Stateless systems are not dependent on any single instance of the server. This implies a loss of a server has no effect as long as there are more than one instances available.Immutable) within Information Technology and Software development are easy to:
- elasticity: To scale up, just add more copies. To scale down, instruct instances to terminate once they have completed their current task.
- Repair: To 'repair' a failed instance of a component, simply terminate it as gracefully as possible and spin up a replacement.
- Roll-back: If you have a bad deployment, stateless components are much easier to roll back, since you can terminate them and launch instances of the old version instead.
- Load-Balance across: When components are stateless, load balancing is much simpler since any instance can handle any request. Load balancing across stateful components is much harder, since the state of the user's session typically resides on the instance, forcing that instance to handle all requests from a given user.