The CAP Theorem is a fundamental rule in distributed systems that helps engineers make tough decisions about reliability and performance.
According to the CAP Theorem, in any distributed system, you can only guarantee two out of three properties: consistency, availability, or partition tolerance.
You can't have all three guarantees at once because networks are unreliable and failures are inevitable.
Engineers work around the CAP Theorem by using compromises like eventual consistency, read replicas, or multi-region databases.