0% found this document useful (0 votes)
5 views7 pages

What Is The CAP Theorem

The CAP theorem, proposed by Eric Brewer, states that in a distributed data store, only two of the three guarantees—Consistency, Availability, and Partition Tolerance—can be achieved simultaneously. It is crucial for understanding the design and limitations of distributed systems, particularly in scenarios involving network failures. Real-world applications often prioritize different combinations of these guarantees based on specific needs, such as banking systems favoring consistency and social media platforms prioritizing availability.

Uploaded by

missiona.carla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views7 pages

What Is The CAP Theorem

The CAP theorem, proposed by Eric Brewer, states that in a distributed data store, only two of the three guarantees—Consistency, Availability, and Partition Tolerance—can be achieved simultaneously. It is crucial for understanding the design and limitations of distributed systems, particularly in scenarios involving network failures. Real-world applications often prioritize different combinations of these guarantees based on specific needs, such as banking systems favoring consistency and social media platforms prioritizing availability.

Uploaded by

missiona.carla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Log In Join For Free

🔥 50% Off on Everything. 82% Off on 'All 00 18 : 08 : 50


: HOURS Buy Now
Courses' bundle. DAYS MINUTES SECONDS

What is the CAP theorem?

Free Coding Questions Catalog


Boost your coding skills with our essential coding questions catalog. Take a step towards a
better tech career now!

Get Free
Email
Catalog

CAP theorem, formulated by Eric Brewer, states that in a distributed data store, only
two out of the following three guarantees can be achieved at the same time:

1. Consistency: Every read from the database gets the latest (or most recent) write or
an error. In our party analogy, this is like ensuring that every guest hears the latest
song being played, no matter which hall they're in.

2. Availability: Every request (read/write) receives a response, without the guarantee


that it contains the most recent write. In the party context, this means that everyone
gets into a hall and hears a song, but it might not be the latest one playing in other
halls.

3. Partition Tolerance: The system continues to operate despite an arbitrary number of


messages being
We use dropped
cookies (or delayed)
to provide byan
you with theoptimal
network betweenand
experience nodes. If one of our
relevant
communication.
party halls loses connection to the others, Learn morein that hall still goes on.
the party

Got it!
Consistency Availability
All users see the System continues
RDBMS
same data at the to function even
same time with node failures
Not
possible

BigTable, Dynamo,
Cassandra,
HBase
CouchDB

Partition tolerance
System continues to function
even if the communication
fails between nodes

Why Is It Important?

In distributed systems (like databases spread across multiple locations or servers),


network failures happen. The CAP theorem guides the design and understanding of
these systems, helping to balance trade-offs between consistency and availability
when partitions (network failures) occur.

Real-World Implications:

1. CP (Consistency + Partition Tolerance): Ideal for systems where accuracy is crucial,


like banking systems. If a partition happens, the system might choose to refuse
transactions until consistency can be guaranteed.

2. AP (Availability + Partition Tolerance): Great for systems where service availability


is crucial,
Weanduse it's okaytotoprovide
cookies serve slightly
you withstale data. Social
an optimal media
experience platforms
and relevant often
follow this model. communication. Learn more

3. CA (Consistency + Availability): This is not a realistic choice for distributed systems


since partition tolerance is a must-have in any networked system. However,
traditional RDBMS (Relational Database Management Systems) often fit into this
category in non-distributed setups.

CAP in the Real World:

In practice, modern distributed systems often make trade-offs based on the current
situation. For instance, they might normally prioritize consistency and availability, but in
the event of a network partition, they might temporarily sacrifice consistency to
maintain availability.

The CAP theorem is a key principle in understanding the limitations and design choices
of distributed systems. It reminds us that in the world of distributed data, trade-offs are
inevitable, and perfect solutions don't always exist.

TAGS to read mode on CAP theorem: CAP vs. PACELC


Want

System Design Interview System Design Fundamentals CAP Theorem

CONTRIBUTOR

Design Gurus Team

GET YOUR FREE


We use cookies to provide
CodingyouQuestions
with an optimal experience and relevant
Catalog
communication. Learn more
Boost your coding skills with our essential coding questions catalog.

Take a step towards a better tech career now!

Full Name

Email

Sign me up for weekly newsletter

Get Free Catalog

Explore Answers
We use cookies to provide you with an optimal experience and relevant
communication. Learn more

What incentives do Coinbase employees get?


Is recursion ever faster than looping?

How to crack an interview for a software developer?

Related Courses

Grokking the Coding Interview: Patterns for Coding Questions

Grokking the Coding Interview Patterns in Java, Python, JS, C++, C#, and Go. The most comprehensive
course with 476 Lessons.

Preview

We use cookies to provide you with an optimal experience and relevant


communication. Learn more
Grokking Modern AI Fundamentals

Master the fundamentals of AI today to lead the tech revolution of tomorrow.

Preview

Grokking Data Structures & Algorithms for Coding Interviews

Unlock Coding Interview Success: Dive Deep into Data Structures and Algorithms.

Preview

One-Stop Portal For Tech Inter views.

ABOUT US SOCIAL

Our Team Facebook

Careers We use cookies to provide you with Linkedin


an optimal experience and relevant
Contact Us
communication. Learn more
Twitter

Become Affiliate Youtube


Become Contributor

LEGAL RESOURCES

Privacy Policy Blog

Cookie Policy Knowledge Base

Terms of Ser vice Blind 75

Company Guides

Answers Hub

Newsletter

Copyright © 2025 Design Gurus, LLC. All rights reser ved.

We use cookies to provide you with an optimal experience and relevant


communication. Learn more

You might also like