Skip to content

Instantly share code, notes, and snippets.

@lxynox
Created June 30, 2019 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lxynox/154174fc3272286a171721a0636f31d6 to your computer and use it in GitHub Desktop.
Save lxynox/154174fc3272286a171721a0636f31d6 to your computer and use it in GitHub Desktop.

Why statelessness

visibility

Every request contains all context necessary to understand it. Therefore, looking at a single request is sufficient to visualize the interaction.

reliability

Since a request stands on its own, failure of one request does not influence others.

scalability

The server does not have to remember the application state, enabling it to serve more requests in a shorter amount of time.

Two states

Application state

  • stored on client
  • short-term

Resource state

  • stored on server
  • long-term

Reference

https://ruben.verborgh.org/blog/2012/08/24/rest-wheres-my-state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment