# PACELC Theorem

> A conceptual representation that extends the CAP theorem with the trade-off a healthy network still forces, between latency and consistency.

Record: `architecture:pacelc-theorem`
Kind: model
Layer: [Causality Core](https://banes-lab.com/records/layer/causality-core.md)
Severity: contextual
Scope: distributed state, consistency, latency
Canonical: https://banes-lab.com/ontology#architecture-pacelc-theorem

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [CAP Theorem](https://banes-lab.com/records/architecture/cap-theorem.md) and before [Design by Contract](https://banes-lab.com/records/architecture/design-by-contract.md).

## Repair

- Refactored by: Decide else-branch latency-vs-consistency per read class (PACELC)
- Detected by: tail latency driven by synchronous cross-region consistency during normal operation
- Violated by: consistency treated as free when the network is healthy, ignoring the latency it costs
- Measured by: latency-vs-staleness tradeoff per read class
- Enforced by: distributed-systems review

## Requires

- [CAP Theorem](https://banes-lab.com/records/architecture/cap-theorem.md)

## Reinforces

- [CAP Theorem](https://banes-lab.com/records/architecture/cap-theorem.md)
- [Latency](https://banes-lab.com/records/architecture/latency.md)

## Enables

- [Latency-Consistency Trade-off When Healthy](https://banes-lab.com/records/lexicon/latency-consistency-trade-off-when-healthy.md)

## Conflicts with

- [Consistency Assumed Free When Healthy](https://banes-lab.com/records/lexicon/consistency-assumed-free-when-healthy.md)

## In tension with

- [Throughput](https://banes-lab.com/records/architecture/throughput.md)

## Tensions

- [PACELC Theorem / Throughput](https://banes-lab.com/records/tension/pacelc-theorem-throughput.md)

## Severity

- [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)

## Category

- [Causality / Ordering / Distributed Time](https://banes-lab.com/records/architecture-category/causality-ordering-distributed-time.md)

## Linked from

- [Causality / Ordering / Distributed Time](https://banes-lab.com/ontology/principles/architecture-category-causality-ordering-distributed-time.md)
- [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- [Causality / Ordering / Distributed Time](https://banes-lab.com/ontology/lexicon/lexicon-category-causality-ordering-distributed-time.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The resolutions](https://banes-lab.com/ontology/schema/the-resolutions.md)
