Architectural Breakdown & AnalysisFAANG Aligned
The CAP Theorem proves that during a network partition (P), a distributed system must choose between Availability (A) and Consistency (C).
The PACELC Theorem Extension
PACELC extends CAP by incorporating normal operating conditions when no network partition exists:
- If Partition (P): Choose between Availability (A) vs. Consistency (C).
- Else (E): Choose between Latency (L) vs. Consistency (C).
System Classifications
- PA/EL (DynamoDB, Cassandra): Prioritizes Availability during partitions and low Latency during normal operations. Reads may return stale data briefly.
- PC/EC (Spanner, Relational DBs): Prioritizes Consistency at all times. Will reject writes/reads or wait for global consensus before returning.
NOTE — Financial vs Social Systems
Financial balances require PC/EC (Strong Consistency). Social media likes and view counters leverage PA/EL (Eventual Consistency).
Key Architectural Comparison
| PACELC Model | If Partitioned ($P$) Choose: | Else ($E$) Choose: | Concrete Database Example |
|---|---|---|---|
| PC / EC | Consistency ($C$) over Availability. | Consistency ($C$) over Latency. | Google Cloud Spanner, CockroachDB |
| PC / EL | Consistency ($C$) over Availability. | Latency ($L$) over Consistency. | PostgreSQL / MySQL with Async Read Replicas |
| PA / EL | Availability ($A$) over Consistency. | Latency ($L$) over Consistency. | Apache Cassandra, Amazon DynamoDB, Couchbase |
| PA / EC | Availability ($A$) over Consistency. | Consistency ($C$) over Latency. | VoltDB, BigTable (Tunable configurations) |