Bitpath

Boss lesson · Unit 02

Pick two, sort of

What a partition forces you to give up

12 exercisesabout 3 min

What you practise

  • A partition forces a choice between answering and being right
  • CP and AP systems by example
  • Consistency models from linearizable to eventual
  • PACELC: latency is the everyday trade

Try a question from this lesson

Pick one

One replica is in Paris, one in Tokyo. The link between them is cut, but each still reaches local users. Tokyo accepts x = 2. A Paris user reads x. What can Paris do?

The ideas

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

CAP, stated properly

When a network partition splits a system, each side must choose.

Stay available: keep answering with what you have, and risk stale or conflicting data. Or stay consistent: refuse requests you cannot answer correctly.

Partitions are not optional, since cables and switches fail. So the real choice is C or A, and only while a partition lasts.

           partition
 [ Paris ]     X     [ Tokyo ]
     |                   |
 answer stale?       took x = 2
 or refuse?

Concept

A scale of consistency

Consistency is not one thing. Strongest is linearizable: the system acts like a single copy, and every read sees the latest completed write.

Weakest is eventual: replicas may disagree for a while, but converge once writes stop.

In between sit promises you have met, such as read-your-writes and monotonic reads. Stronger costs latency and availability.

9 more exercises in the app

  • 4× multiple choice
  • 1× true or false
  • 1× order the lines
  • 1× type the answer
  • 1× fill the blanks
  • 1× match the pairs

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy