Skip to the guide

CAP and PACELC

IntermediateConcept3 pages

CAP says what a replicated system must give up when the network splits it in two. PACELC adds the trade-off it makes the rest of the time, when nothing is broken. Interviewers ask about CAP to see whether you can turn it into a decision per feature, with what the user sees, instead of a label stuck on a database.

Two ticket booths

A stadium sells seats from two ticket booths at opposite gates. They share one seating plan and phone each other after every sale. One evening the phone line goes dead. A fan at the north gate wants seat 14C. The north booth has two choices:

  • Stop selling until the line is back. No seat is sold twice, but fans are turned away.
  • Keep selling from its own copy of the plan. Fans are served, but the south booth may sell 14C too, and someone sorts it out later.