Stateless (or Immutable) systems or protocols do NOT maintain state and prior knowledge (data) does NOT affect the processing of the current data.

Stateless protocol does not require the server to retain sessionData or status about each communications partner for the duration of multiple requests.

In contrast, to a stateful protocol or system.

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.

Stateless systems may not have any Cache or data Store

Be Smart with State#

Stateless components, (that is they are 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.

More Information#

There might be more information for this subject on one of the following: