Skip to content
StackDecode
System Design
12. Reliability and Fault ToleranceAnimated

Replication

Keeping copies of data on several nodes.

The idea

Copies improve durability, availability and read capacity.

Watch it work

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

App serversPrimary (writes)Replica 1 (read…Replica 2 (read…
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Step one: add indexes and cache.

step:
1/4
at:
App servers
1/7

The green dot is a request moving through the system.

Step by step

  1. 1Write to the primary
  2. 2Ship changes to copies
  3. 3Serve reads from copies
  4. 4Promote a copy if needed

Where it is used

Databases and storage.

Watch out for

Lag and consistency issues.

Related