Theory of Intelligence
BACKEND ENGINEERING•Databases Concurrency And Caching•Scaling Data•3.3 CAP & Consistency

3.3.1 CAP Theorem

Subtopics: CAP Theorem, Eventual Consistency and Leader Election.

3.3.1 CAP Theorem

If two datacenters cannot talk, a CP system refuses some writes; an AP system accepts them and reconciles later.

Why it matters

It is the vocabulary for “why is this database like this?” It is not an excuse to skip backups.

How it is used

Postgres primary + failover is mostly CP. Dynamo-style stores lean AP with conflict rules. Choose per use case (ledger vs likes).

Discuss theoretical concepts, mathematical formulas, and architectural foundations.

Supports inline code with `backticks`
No comments yet. Be the first to start the discussion!