Pages

CAP theorem


Here's the CAP theorem in a nutshell:


In distributed systems, you can fully guarantee only two of these three things:

  • Consistency (C): Everyone sees the same data at the same time.
  • Availability (A): The system always responds to requests.
  • Partition Tolerance (P): The system keeps working even if parts become disconnected.

You have to choose two:

  • CA: Great for consistent data (like banking).
  • CP: Ideal for reliable systems (like safety controls).
  • AP: Perfect for high uptime (like social media).

The CAP theorem helps you make smart trade-offs when designing distributed systems.

Inspired from : Lesson 149 - Caching and CAP Theorem by Mark Richards

References for the CAP Theorem:


No comments:

Post a Comment