Senior Track Roadmap

System Design: PACELC theorem

This course covers the PACELC theorem, which extends CAP with an else case: without a partition, a system chooses between latency and consistency. The lessons apply it to a single-node Rails application that has no partitions but makes seven else-case decisions through its caches. They cover the four classes PA/EL, PA/EC, PC/EL and PC/EC, and key-based versus time-based caching. Later lessons show where consistency costs latency, three ways to measure staleness, and how to choose a staleness budget as a product decision. It ends with a coding challenge.

What you'll learn

  • ✓The PACELC statement and why the else case applies to nearly every request
  • ✓The four classes and why a path through a system has a class
  • ✓When to use key-based caching and when to use time-based caching
  • ✓Where consistency costs latency, and who waits for it
  • ✓Three ways to measure staleness, from reading the config to comparing cached and fresh values
  • ✓Four questions for setting a staleness budget as a product decision
Free preview · Lesson 1 4 min read

The else case

CAP describes what happens during a network partition. PACELC adds the sentence CAP is missing: and the rest of the time.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...