liveBook · Manning

PACELC theorem

As explained in Grokking Software Architecture

PACELC is a model of distributed-system tradeoffs that considers latency and consistency during normal operation as well as availability and consistency during a partition.

Distributed systems face tradeoffs both during network trouble and when everything seems fine. PACELC summarizes them: if a Partition occurs, choose between Availability and Consistency; Else, when the network is healthy, choose between Latency and Consistency. section 7.3.5

Use the two parts to frame the decision:

  • During a partition, keep responding and risk temporarily inconsistent data, or preserve consistency and reject some requests. section 7.3.5
  • When the network is healthy, favor faster responses or ensure users see the same data. section 7.3.5 section 7.9

A checkout timeout

If an order service cannot reach payment before its timeout, it can cancel checkout to protect consistency or accept the order and process payment later. That later correction may use compensation in a Saga. section 7.3.5 section 7.3.5

A timeout can make slow communication function like a partition: waiting forever is not an option. Choose behavior deliberately, and plan how to handle temporary inconsistency. section 7.3.5

How Grokking Software Architecture covers it

How deep it goes
Explains both tradeoffs with a checkout scenario and mentions partition mode and compensation.
Examples
Uses an order-payment timeout and an offline ATM with a withdrawal limit to illustrate partition choices.
What you can do after
Evaluate availability, consistency, and latency tradeoffs when choosing how a distributed system responds.
How it connects
Connects CAP theorem tradeoffs with availability, consistency, latency, eventual consistency, and Saga workflows.

Also explained in

Compare how 3 books explain PACELC theorem →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.