Skip to content
StackDecode
System Design
5. Advanced Database ArchitectureAnimated

Distributed Databases

Databases spread across many machines.

The idea

Data is partitioned and replicated across nodes, with a protocol for consistency and failure handling.

Watch it work

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

Node 1Node 2Node 3Node 4Node 5
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Independent machines coordinate only by passing messages.

step:
1/4
at:
Node 1
1/8

The green dot is a request moving through the system.

Step by step

  1. 1Partition data
  2. 2Replicate partitions
  3. 3Route requests
  4. 4Coordinate on writes

Where it is used

Global or very large systems.

Watch out for

Network partitions force trade-offs (CAP).

Related