Remember that Cassandra was designed with the premise that you're using huge amounts of data so arbitrary queries aren't expected to be scalable no matter the database. Cassandra makes huge tradeoffs to focus on scalability and availability, at the cost of flexibility. So, Cassandra is great when: You know how you're going to query the data You care more about availability/scalability than developer convenience You can 100% replace Mongo with Cassandra. And you can 100% use Cassandra as your primary data store. You just have to be deliberate and design your database. Answer from jjirsa on reddit.com
🌐
Reddit
reddit.com › r/cassandra › is it really possible to replace mongodb with cassandra?
r/cassandra on Reddit: Is it really possible to replace mongodb with cassandra?
April 3, 2023 -

So at work, we no longer can use Mongo because of some licence issues. So we were looking into cassandra.

But more I use it, more it seems like it shouldn't be used as a primary database. Our systems are fairly nascent, so we don't know what all fields we will query with in a table. And given how you can only query with keys in cassandra (or be Okey with secondary indexes), it seems like I will have to keep creating newer tables just to hold mapping between those fields I want to query.

It's just too restrictive for whatever we were doing with mongo.

Are these observations valid? Or can you really use just the cassandra as a primary database?

Discussions

database design - MongoDB vs. Cassandra - Stack Overflow
I am evaluating what might be the best migration option. Currently, I am on a sharded MySQL (horizontal partition), with most of my data stored in JSON blobs. I do not have any complex SQL queries ( More on stackoverflow.com
🌐 stackoverflow.com
MongoDB vs. Redis vs. Cassandra for a fast-write, temporary row storage solution - Stack Overflow
I'm building a system that tracks and verifies ad impressions and clicks. This means that there are a lot of insert commands (about 90/second average, peaking at 250) and some read operations, but ... More on stackoverflow.com
🌐 stackoverflow.com
Cassandra vs MongoDB vs CouchDB vs Redis vs Riak comparison

I feel like there's as many nosql versions as linux distros... Thanks for the find.

More on reddit.com
🌐 r/Database
1
19
January 4, 2011
Comparison: Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase vs Couchbase vs Neo4j vs Hypertable vs ElasticSearch vs Accumulo vs VoltDB vs Scalaris

We are just in a process of deciding for a new software architecture. What are you guys using? I would be very interested if someone could share their own experience

More on reddit.com
🌐 r/bigdata
3
19
May 28, 2014
People also ask

Can I use Cassandra and MongoDB together?
Yes. Many organizations use Cassandra for high-volume ingestion and MongoDB for analytics. Tools like Knowi can connect to both without ETL, enabling unified analytics.
🌐
knowi.com
knowi.com › home › cassandra vs mongodb: real performance data, cost analysis & when to use each
Cassandra vs MongoDB: Performance, Cost and Use Cases (2026)
Is MongoDB good for reads and writes?
Both. MongoDB is optimized for read and write workloads, with the ability to tune your consistency and read preference. It uses secondary indexes on any field to fit your query patterns and offer differentiating features for workload isolations and data governance to fit your needs.
🌐
mongodb.com
mongodb.com › resources › compare › cassandra-vs-mongodb
Cassandra Vs MongoDB Comparison | MongoDB
Is Cassandra available in the cloud?
Yes. Cassandra can be deployed on-premises or in the cloud via providers like AWS, Azure, Google Cloud, or through managed services like DataStax Astra DB.
🌐
knowi.com
knowi.com › home › cassandra vs mongodb: real performance data, cost analysis & when to use each
Cassandra vs MongoDB: Performance, Cost and Use Cases (2026)
🌐
MongoDB
mongodb.com › resources › compare › cassandra-vs-mongodb
Cassandra Vs MongoDB Comparison | MongoDB
Therefore, Cassandra prioritizes write performance by default. Like MongoDB, Cassandra’s performance will be limited by consistency requirements. However, Cassandra’s data is spread across partitions according to the primary key of the data model. For reads to be performant, partitions and the data inside them must meet specific conditions.
🌐
GeeksforGeeks
geeksforgeeks.org › dbms › difference-between-cassandra-and-mongodb
Difference Between Cassandra and MongoDB - GeeksforGeeks
July 15, 2025 - Schema-Free: Unlike traditional relational databases, Cassandra is schema-free, allowing you to store different types of data in the same table without defining a rigid schema. MongoDB is a cross-platform document-oriented and a non relational ...
🌐
Knowi
knowi.com › home › cassandra vs mongodb: real performance data, cost analysis & when to use each
Cassandra vs MongoDB: Performance, Cost and Use Cases (2026)
April 22, 2026 - Cassandra is a wide-column, distributed database optimized for write-heavy workloads and massive IoT/logging/time-series ingestion, capable of handling 1M+ writes/second with high availability. MongoDB is a document-oriented database optimized for read-heavy workloads and flexible analytics, offering a rich query language, native aggregations, and faster dashboard responsiveness.
Find elsewhere
🌐
ScyllaDB
scylladb.com › learn › mongodb-database › apache-cassandra-vs-mongodb
Apache Cassandra vs MongoDB​ | ScyllaDB
March 31, 2026 - MongoDB stores data in a flexible document-based JSON-like data model. It works well for applications with complex querying needs and dynamic schemas with evolving data structures.
🌐
Instaclustr
instaclustr.com › blog › the cap theorem with apache cassandra® and mongodb
Cassandra vs MongoDB: Using CAP Theorem | Instaclustr
September 29, 2025 - MongoDB is classified as a PC+EC system. During normal operations and during partition failures, it emphasizes consistency. Cassandra is a PA+EL system. During a partition failure it favors availability. Under normal operations, Cassandra gives up consistency for lower latency.
🌐
IBM
ibm.com › think › topics › cassandra-vs-mongodb
Cassandra Vs. MongoDB | IBM
November 17, 2025 - The popularity of these two database systems is due in part to their high scalability and availability. Both also have been in use for well over a decade: Cassandra was released as an open source project in 2008; the release of MongoDB occurred the following year.
🌐
Logz.io
logz.io › home › best practices › blog › cassandra vs. mongodb vs. hbase: a comparison of nosql databases
Cassandra vs. MongoDB vs. HBase Databases
September 14, 2025 - Cassandra offers advanced repair processes for read, write, and entropy (data consistency), which makes its cluster highly available and reliable. Owing to its lack of a single point of failure, it can provide a highly available architecture if a quorum of nodes is maintained and the replication factor is tuned accordingly. This also allows for better fault tolerance compared to document stores like MongoDB, which might take up to 40 seconds to recover.
🌐
Integrate.io
integrate.io › home › blog › big data integration › cassandra vs mongodb: everything you need to know
Cassandra vs MongoDB: Everything You Need to Know | Integrate.io
January 30, 2026 - Moreover, every row in Cassandra does not need to have the same columns. The tabular database relies on the primary key to fetch data. MongoDB, on the other hand, is an object-oriented database. It uses BSON (Binary JSON) to store data. MongoDB can support varied object structures, and you can even create nested object structures.
🌐
Yugabyte
yugabyte.com › blog › data-modeling-basics-postgresql-vs-cassandra-vs-mongodb
Data Modeling Basics - PostgreSQL vs. Cassandra vs. MongoDB | YugabyteDB
August 11, 2023 - MongoDB organizes data in Databases (equivalent to Cassandra Keyspace) that have Collections (equivalent to Tables) that have Documents (equivalent to a Row in a Table). As a “schemaless” database, the definition of the schema ahead of time ...
Top answer
1 of 6
603

Lots of reads in every query, fewer regular writes

Both databases perform well on reads where the hot data set fits in memory. Both also emphasize join-less data models (and encourage denormalization instead), and both provide indexes on documents or rows, although MongoDB's indexes are currently more flexible.

Cassandra's storage engine provides constant-time writes no matter how big your data set grows. Writes are more problematic in MongoDB, partly because of the b-tree based storage engine, but more because of the multi-granularity locking it does.

For analytics, MongoDB provides a custom map/reduce implementation; Cassandra provides native Hadoop support, including for Hive (a SQL data warehouse built on Hadoop map/reduce) and Pig (a Hadoop-specific analysis language that many think is a better fit for map/reduce workloads than SQL). Cassandra also supports use of Spark.

Not worried about "massive" scalability

If you're looking at a single server, MongoDB is probably a better fit. For those more concerned about scaling, Cassandra's no-single-point-of-failure architecture will be easier to set up and more reliable. (MongoDB's global write lock tends to become more painful, too.) Cassandra also gives a lot more control over how your replication works, including support for multiple data centers.

More concerned about simple setup, maintenance and code

Both are trivial to set up, with reasonable out-of-the-box defaults for a single server. Cassandra is simpler to set up in a multi-server configuration since there are no special-role nodes to worry about.

If you're presently using JSON blobs, MongoDB is an insanely good match for your use case, given that it uses BSON to store the data. You'll be able to have richer and more queryable data than you would in your present database. This would be the most significant win for Mongo.

2 of 6
148

I've used MongoDB extensively (for the past 6 months), building a hierarchical data management system, and I can vouch for both the ease of setup (install it, run it, use it!) and the speed. As long as you think about indexes carefully, it can absolutely scream along, speed-wise.

I gather that Cassandra, due to its use with large-scale projects like Twitter, has better scaling functionality, although the MongoDB team is working on parity there. I should point out that I've not used Cassandra beyond the trial-run stage, so I can't speak for the detail.

The real swinger for me, when we were assessing NoSQL databases, was the querying - Cassandra is basically just a giant key/value store, and querying is a bit fiddly (at least compared to MongoDB), so for performance you'd have to duplicate quite a lot of data as a sort of manual index. MongoDB, on the other hand, uses a "query by example" model.

For example, say you've got a Collection (MongoDB parlance for the equivalent to a RDMS table) containing Users. MongoDB stores records as Documents, which are basically binary JSON objects. e.g:

{
   FirstName: "John",
   LastName: "Smith",
   Email: "[email protected]",
   Groups: ["Admin", "User", "SuperUser"]
}

If you wanted to find all of the users called Smith who have Admin rights, you'd just create a new document (at the admin console using Javascript, or in production using the language of your choice):

{
   LastName: "Smith",
   Groups: "Admin"
}

...and then run the query. That's it. There are added operators for comparisons, RegEx filtering etc, but it's all pretty simple, and the Wiki-based documentation is pretty good.

🌐
Benchant
benchant.com › blog › mongodb-vs-cassandra
MongoDB vs. Cassandra Performance Studie
In the vanilla configuration, Cassandra shows higher throughput on all 3 different workloads, but MongoDB always shows lower READ latency, with the same setup and similar consistency. Both performance KPIs are of different importance, depending on the IT application!
🌐
Medium
medium.com › @vinciabhinav7 › cassandra-vs-mongo-db-how-to-choose-e2de97a6dc45
Cassandra vs Mongo db ? How to choose ? | by Abhinav Vinci | Medium
May 30, 2024 - MongoDB uses a B-tree-based storage ... writes, potentially slowing down the write performance. Cassandra is preferred for applications requiring high write throughput....
Top answer
1 of 9
32

For a harvesting solution like this, I would recommend a multi-stage approach. Redis is good at real time communication. Redis is designed as an in-memory key/value store and inherits some very nice benefits of being a memory database: O(1) list operations. For as long as there is RAM to use on a server, Redis will not slow down pushing to the end of your lists which is good when you need to insert items at such an extreme rate. Unfortunately, Redis can't operate with data sets larger than the amount of RAM you have (it only writes to disk, reading is for restarting the server or in case of a system crash) and scaling has to be done by you and your application. (A common way is to spread keys across numerous servers, which is implemented by some Redis drivers especially those for Ruby on Rails.) Redis also has support for simple publish/subscribe messenging, which can be useful at times as well.

In this scenario, Redis is "stage one." For each specific type of event you create a list in Redis with a unique name; for example we have "page viewed" and "link clicked." For simplicity we want to make sure the data in each list is the same structure; link clicked may have a user token, link name and URL, while the page viewed may only have the user token and URL. Your first concern is just getting the fact it happened and whatever absolutely neccesary data you need is pushed.

Next we have some simple processing workers that take this frantically inserted information off of Redis' hands, by asking it to take an item off the end of the list and hand it over. The worker can make any adjustments/deduplication/ID lookups needed to properly file the data and hand it off to a more permanent storage site. Fire up as many of these workers as you need to keep Redis' memory load bearable. You could write the workers in anything you wish (Node.js, C#, Java, ...) as long as it has a Redis driver (most web languages do now) and one for your desired storage (SQL, Mongo, etc.)

MongoDB is good at document storage. Unlike Redis it is able to deal with databases larger than RAM and it supports sharding/replication on it's own. An advantage of MongoDB over SQL-based options is that you don't have to have a predetermined schema, you're free to change the way data is stored however you want at any time.

I would, however, suggest Redis or Mongo for the "step one" phase of holding data for processing and use a traditional SQL setup (Postgres or MSSQL, perhaps) to store post-processed data. Tracking client behavior sounds like relational data to me, since you may want to go "Show me everyone who views this page" or "How many pages did this person view on this given day" or "What day had the most viewers in total?". There may be even more complex joins or queries for analytic purposes you come up with, and mature SQL solutions can do a lot of this filtering for you; NoSQL (Mongo or Redis specifically) can't do joins or complex queries across varied sets of data.

2 of 9
22

I currently work for a very large ad network and we write to flat files :)

I'm personally a Mongo fan, but frankly, Redis and Cassandra are unlikely to perform either better or worse. I mean, all you're doing is throwing stuff into memory and then flushing to disk in the background (both Mongo and Redis do this).

If you're looking for blazing fast speed, the other option is to keep several impressions in local memory and then flush them disk every minute or so. Of course, this is basically what Mongo and Redis do for you. Not a real compelling reason to move.

🌐
DEV Community
dev.to › ksolves › cassandra-vs-mongodb-choosing-the-right-nosql-database-1ood
Cassandra vs. MongoDB: Choosing the Right NoSQL Database - DEV Community
October 15, 2024 - Use Case: MongoDB has a great performance in handling multiple query operations and indexing helpful for content and e-commerce. Cassandra is ideal for working with a high write load and handling large amounts of data spread across many regions.
🌐
OneUptime
oneuptime.com › home › blog › mongodb vs cassandra: when to choose each
MongoDB vs Cassandra: When to Choose Each
March 31, 2026 - MongoDB excels at flexible data modeling, rich querying, and developer productivity, making it ideal for general-purpose applications. Cassandra excels at extreme write throughput, linear horizontal scaling, and multi-datacenter active-active ...
🌐
Panoply
blog.panoply.io › home › databases › cassandra vs mongodb performance: a battle of the nosql dbs
Cassandra vs MongoDB Performance: A Battle of the NoSQL DBs
December 28, 2023 - To start with, both database solutions are distributed by design. With Cassandra, your data is stored in non-relational partitions just as you insert them—much like any other NoSQL platform would. MongoDB takes the NoSQL concept a step further by being document-based.
🌐
Besant Technologies
besanttechnologies.com › home › blogs › general › cassandra vs mongodb
Cassandra Vs MongoDB | Difference Between Cassandra and MongoDB
November 21, 2019 - Cassandra Vs MongoDB: Both Cassandra and MongoDB aim at storing data with the different methodologies adopted. Cassandra uses a near similar element to database tables, whereas, MongoDB stores data, using documents.
🌐
Scaler
scaler.com › home › topics › cassandra vs mongodb - top differences you must know
Cassandra Vs MongoDB - Top Differences You Must Know - Scaler Topics
September 4, 2023 - Cassandra excels in scenarios where scalability and fast write performance are paramount. MongoDB, on the other hand, prioritizes consistency and is a solid choice when strict accessibility is crucial. MongoDB’s schema-free document-oriented architecture makes it an ideal choice for projects requiring a richer data model, providing flexibility in organizing data hierarchies.