Skip to content
StackDecode
System Design
6. Distributed Systems FundamentalsAnimated

Distributed State Management

Keeping state consistent across nodes.

The idea

State is replicated, partitioned or externalised so any node can serve a request.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ClientLoad balancerServer AServer BServer CShared store
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

No request depends on memory in a particular server.

step:
1/4
at:
Client
1/11

The green dot is a request moving through the system.

Step by step

  1. 1Decide where state lives
  2. 2Replicate it
  3. 3Choose a consistency model
  4. 4Make nodes stateless where possible

Where it is used

Sessions and shared data.

Watch out for

Shared state is the hardest part to scale.

Related