Engrain by ByteRush

SD.08.04 Senior

Replication, sharding and consistency

Comes up in: Backend design

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • leader-follower replication
  • read replicas and lag
  • sharding keys and hot spots
  • CAP and PACELC in plain words
  • eventual vs strong consistency
  • consistent hashing

Words you will know

replicationshardingeventual consistencyconsistent hashing

What you will practise

  • pick a shard key for 3 apps

Interview questions this answers

  • Explain the CAP theorem in simple terms.
  • What is sharding and what problems does it create?