Our understanding of CAP theorem has changed considerebly since its first appearance in 2000. There were a lot of confusion about the "chose-2-out-of-3" concept but Eric Brewer's article in 2012 nicely eliminated these confusions (I guess).

So, CAP theorem is not about being CA or AP or something else. It is simply this: Network partitions may happen all the time. It is unavoidable. And when a network partition happens, the architecture of a distributed database should allow its clients to tune consistency and availability as they wish.

What does this mean? Assume that you replicate a piece of data between 3 nodes (N1, N2, and N3 - so replication factor = 3) in a cluster. And let's say that a network partition happens which seperates N3 from N1 and N2:

So, all of the 3 nodes are operational, but the network between them is problematic right now. In this situation a client might make a read request or a write request to N1, N2 or N3. Based on the consistency choices of this client, the reaction of the cluster may differ:

  • If the client makes a read request to N1, N1 can answer the query right away with its own data. Or N1 can forward the same query to N2 and compares its data with N2's data and returns the most up-to-date one. Here, the reaction of the cluster depends on the consistency choice of the client. Client tunes consistency according to its choices.
  • Client can make a different choice too: It can force N1 to read data from all 3 nodes (i.e. read consistency of ALL in Cassandra terms). In this situation, cluster returns an error and we say that the cluster is not available accodring to the client's choice.
  • Another possibility might be this one: Client might have asked the data to N3. In this situation, N3 only returns its data (read consistency = ONE) or the query fails (read consistency > 1).

I don't know about Mongo but this is how Cassandra works considering the CAP theorem.

Answer from burak ibrahim sevindi on Stack Overflow
🌐
Instaclustr
instaclustr.com › blog › the cap theorem with apache cassandra® and mongodb
Cassandra vs MongoDB: Using CAP Theorem | Instaclustr
September 29, 2025 - According to the CAP theorem, MongoDB is a CP system and Cassandra is an AP system.
🌐
Medium
bikas-katwal.medium.com › mongodb-vs-cassandra-vs-rdbms-where-do-they-stand-in-the-cap-theorem-1bae779a7a15
What is the CAP Theorem? MongoDB vs Cassandra vs RDBMS, where do they stand in the CAP theorem? | by Bikas Katwal | Medium
May 13, 2020 - In Summary, Cassandra is always available but once we start tweaking it to make more consistent, we lose availability. The below table summarizes where each DB with a different set of configurations sits on the CAP theorem. The table is set up for: - MongoDB with 5 nodes - Cassandra with a replication factor of 5 - single-node RDBMS server
🌐
Medium
medium.com › @hash_include › cap-theorem-in-action-how-mongodb-cassandra-and-rdbms-handle-trade-offs-ed976ad7f417
CAP Theorem in Action: How MongoDB, Cassandra, and RDBMS Handle Trade-offs | by Ishan Garg` | Medium
March 30, 2025 - Cassandra is categorized as an AP (Available & Partition-Tolerant) system under the CAP theorem because it prioritizes Availability (A) and Partition Tolerance (P) over Consistency ©.
Top answer
1 of 4
2

Our understanding of CAP theorem has changed considerebly since its first appearance in 2000. There were a lot of confusion about the "chose-2-out-of-3" concept but Eric Brewer's article in 2012 nicely eliminated these confusions (I guess).

So, CAP theorem is not about being CA or AP or something else. It is simply this: Network partitions may happen all the time. It is unavoidable. And when a network partition happens, the architecture of a distributed database should allow its clients to tune consistency and availability as they wish.

What does this mean? Assume that you replicate a piece of data between 3 nodes (N1, N2, and N3 - so replication factor = 3) in a cluster. And let's say that a network partition happens which seperates N3 from N1 and N2:

So, all of the 3 nodes are operational, but the network between them is problematic right now. In this situation a client might make a read request or a write request to N1, N2 or N3. Based on the consistency choices of this client, the reaction of the cluster may differ:

  • If the client makes a read request to N1, N1 can answer the query right away with its own data. Or N1 can forward the same query to N2 and compares its data with N2's data and returns the most up-to-date one. Here, the reaction of the cluster depends on the consistency choice of the client. Client tunes consistency according to its choices.
  • Client can make a different choice too: It can force N1 to read data from all 3 nodes (i.e. read consistency of ALL in Cassandra terms). In this situation, cluster returns an error and we say that the cluster is not available accodring to the client's choice.
  • Another possibility might be this one: Client might have asked the data to N3. In this situation, N3 only returns its data (read consistency = ONE) or the query fails (read consistency > 1).

I don't know about Mongo but this is how Cassandra works considering the CAP theorem.

2 of 4
1

Cassandra uses tunable consistency, that you can control it when writing and/or reading data by using different consistency levels. For example, if you use QUORUM for both writes & reads, then you get strong consistency, although availability may suffer.

P.S. I can't say about Mongo though...

🌐
IBM
ibm.com › think › topics › cassandra-vs-mongodb
Apache Cassandra vs. MongoDB
November 17, 2025 - The CAP theorem dictates that a distributed system can deliver only two of three desired characteristics. Apache Cassandra is generally categorized as an “AP” database, delivering high performance primarily on availability and partition ...
🌐
IBM
ibm.com › think › topics › cap-theorem
What Is the CAP Theorem? | IBM
December 24, 2025 - However, unlike MongoDB, Cassandra ... Relative to the CAP theorem, Cassandra is an AP database—it delivers availability and partition tolerance but can't deliver consistency all the time....
Top answer
1 of 1
5

C stands for eventual consistent. Correct ?

Consistency in the CAP theorem is referring to strong consistency where every read receives the most recent write or an error. By default MongoDB drivers direct all reads & writes to the primary of a replica set, which is strongly consistent.

The CAP theorem asserts that a distributed system must choose between consistency and availability in the event of a network partition. MongoDB's replica set approach uses a single primary for write consistency (CP), while Cassandra's replication strategy favours write availability (AP). Strong consistency is not possible with a network partition because there could be a conflict if both sides of the partition update the same data. To maintain write availability AP database systems need a solution for conflict resolution, which is a separate consideration from eventual consistency.

However, CAP is a simplification of real-world behaviour: MongoDB and Cassandra both have tunable levels of consistency for reads and writes. For example: MongoDB has write concerns to determine the level of acknowledgement required for write operations, read preferences for routing requests to members of a replica set, and read concerns to control the recency, consistency, and isolation properties of data read from replica set and sharded deployments.

Eric Brewer, author of the CAP Theorem, revisited this in 2012 with a more nuanced take: CAP Twelve Years Later: How the "Rules" Have Changed.

  1. Till master is re-elected, write requests need to wait and system is not available

There are no writes without a primary, but replica sets still have read availability. MongoDB 3.6 added a Retryable Writes feature which helps applications better handle replica set elections and transient network errors.

  1. Once the previous node(node crashed in step 2) comes back, writes pending from that node are written back to slaves.

If the primary in a MongoDB replica set becomes unavailable, the remaining members of the replica set will elect a new primary if there is an eligible secondary and a quorum of voting members. In your example, the voting majority would be 2/3 members of your replica set. Any writes accepted by a former primary that were not written to a majority of replica set members will be rolled back (saved to disk) so the former primary resumes syncing from a state consistent with the history of the current primary.

🌐
Scaler
scaler.com › home › topics › where do mongodb stand on cap theorem?
Cap Theorem| Where Do MongoDB Stand on Cap Theorem? - Scaler Topics
January 28, 2024 - Cassandra's distributed architecture ensures strong consistency even during network partitions. It achieves this through a peer-to-peer model, where all nodes participate in read and write operations, and hinted handoff allows writes to be temporarily stored until partitions are resolved. Q. What is the CAP theorem in the context of MongoDB?
Find elsewhere
🌐
DevCon5
devcon5.ch › en › blog › 2024 › 02 › 02 › cap_db
The CAP Theorem and Its Implications for Postgres, MongoDB, Kafka, Cassandra
February 2, 2024 - The CAP theorem is a fundamental principle in the realm of distributed systems, stating that a distributed database system can guarantee only two out of the following three properties at the same time: Consistency (C), Availability (A), and Partition Tolerance (P). This theorem has profound implications for the architecture and selection of database systems in software development. This article focuses on Postgres, MongoDB, Kafka, and Cassandra, and how each of these systems addresses the challenges posed by the CAP theorem.
🌐
DZone
dzone.com › data engineering › databases › how to choose the right database among cassandra, mongodb, and mysql for your applications
How to Choose the Right Database Among Cassandra, MongoDB, and MySQL for Your Applications
April 25, 2019 - A theorem that describes how the laws of physics dictate that a distributed system MUST make a tradeoff among desirable characteristics.CAP stands for Consistency, Availability, and Partition tolerance.
🌐
Analytics Vidhya
analyticsvidhya.com › home › a beginner’s guide to cap theorem for data engineering
CAP Theorem and Distributed Database Systems for Data Engineering
April 5, 2024 - NoSQL databases frequently give up one of these characteristics in order to obtain the others; Cassandra prioritizes availability and partition tolerance, whereas MongoDB prioritizes consistency.
🌐
LinkedIn
linkedin.com › pulse › real-comparison-nosql-databases-hbase-cassandra-mongodb-sahu
A Real Comparison Of NoSQL Databases HBase, Cassandra & MongoDB
March 9, 2018 - HBASE provides CP (Consistency and Partition Tolerance) while Cassandra provides AP(Availability and Partition Tolerance). ... HBase provides CP(Consistency, Partition Tolerance) form CAP theorem. There seems to be a typo in the article. Please correct it. ... "MongoDB maintains the most valuable features of relational databases: strong consistency," Not really...
🌐
Medium
roshancloudarchitect.me › the-cap-theorem-navigating-the-trade-offs-in-distributed-systems-and-database-choices-57a505be4a24
The CAP Theorem: Navigating the Trade-offs in Distributed Systems and Database Choices | by RoshanGavandi | Medium
September 14, 2024 - By comparing SQL master-slave replication (CA) and Cassandra (AP), you can see how different database architectures align with different aspects of the CAP theorem based on the system’s needs. In this case, a system using MongoDB with a focus on Consistency and Partition Tolerance (CP) works ...
🌐
ScyllaDB
scylladb.com › glossary › cap-theorem
What is CAP Theorem? Definition & FAQs | ScyllaDB
November 5, 2025 - In contrast to MongoDB, Apache Cassandra is an open source NoSQL database with a peer-to-peer architecture and potentially multiple points of failure. CAP theorem in Cassandra reveals an AP database: Cassandra offers availability and partition ...
🌐
Ippon
blog.ippon.tech › use-cassandra-mongodb-hbase-accumulo-mysql
When to use Cassandra, MongoDB, HBase, Accumulo and MySQL
January 29, 2024 - Using the Cap Theorem is one way to, based on the availability needs or consistency needs of the client, decide if a Big Data solution or if a relational database is needed. Other choices to make are between a relational database like MySQL, column oriented databases like HBase, Accumulo or Cassandra, or document oriented like MongoDB...
🌐
Airbyte
airbyte.com › data integration platform › data engineering resources › cassandra vs. mongodb: navigating the nosql landscape
Cassandra vs. MongoDB: Navigating the NoSQL Landscape | Airbyte
August 29, 2025 - Cassandra uses a wide-column store model. Data is organized into tables with rows and columns. Tables have a predefined schema, yet each row may contain different columns. The wide-column model excels in sparse data scenarios and supports efficient range queries when properly partitioned. Tunable consistency levels through read preferences and write concerns. Defaults to CAP-theorem CP (Consistency & Partition Tolerance).
🌐
The Knowledge Academy
theknowledgeacademy.com › blog › cassandra-vs-mongodb
Cassandra vs MongoDB: Key differences
January 1, 2009 - However, this comes at the expense of strong consistency, as different nodes may temporarily have slightly inconsistent data until the system converges. MongoDB follows the CP (Consistency and Partition Tolerance) side of the CAP theorem.