cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Stein <>
Subject Re: Cassandra vs MongoDB
Date Wed, 28 Jul 2010 10:58:40 GMT
If you are looking to store web logs and then do ad hoc queries you
might/should be using Hadoop (depending on how big your logs are)

While MongoDB has MapReduce (built in) it is there to simulate SQL GROUP BY
and not for large scale analytics by any means.

MongoDB uses a global read/write lock per operation. general and
index-assisted reads are ultra-fast in mongo, but a bigger map/reduce or
group call will block other requests until complete, possibly causing
traffic to back up. because of that global lock, *all writes block*, too.

Cassandra is much more durable but from an architecture perspective keystore
vs document store could be weighed (on smaller traffic systems that do not
need higher level big data scale & durability)

If you have lots of data then MongoDB will eventually become a consistent

Here is a nice article on MongoDB in a larger scale of implementation with
some conclusions which also talks about Cassandra, Redis & CouchDB.

MongoDB has made a lot of improvements over time but Cassandra is
*VERY*active also and continues to deliver great features and not
driven by a
corporation but rather the community.

MongoDB is backed and started by a company for them to make money using the
open source modal instead of Cassandra which started to solve a difficult
problem at facebook and then supported completely open source and THEN
having a company later pop up (Riptano) to support it making their money
using the open source modal... I say this to express the drives of the 2
servers & open source projects/communities are different.

You might see Google trends for MongoDB going up because folks jump into
because of the marketing and then have issues and try to find solutions =8^)

Now, I am not bashing MongoDB by an sorts it is a good database (so is
MySQL) but it is all about use cases AND the implementation/use/load.  Apply
the right solution to the problem it fits in all respects!

For logs (speaking with my architect hat on) I see no reason why you would
want to hold that in a document structure but at the same time you might not
have that many logs so you can get a lot of benefit from MongoDB M/R and
such....But honestly if it is less than 1TB you might be fine JUST using

It is all relative.

Lastly, and back to Hadoop, Cassandra has a nice implementation so that when
you load your data into Cassandra you can pull it out to MapReduce it

Joe Stein
Twitter: @allthingshadoop

On Tue, Jul 27, 2010 at 4:05 PM, Mark <> wrote:

> On 7/27/10 12:42 PM, Dave Gardner wrote:
>> There are quite a few differences. Ultimately it depends on your use
>> case! For example Mongo has a limit on the maximum "document" size of
>> 4MB, whereas with Cassandra you are not really limited to the volume
>> of data/columns per-row (I think there maybe a limit of 2GB perhaps;
>> basically none)
>> Another point re: search volumes is that mongo has been actively
>> promoting over the last few months. I recently attended an excellent
>> conference day in London which was very cheap; tickets probably didn't
>> cover the costs. I guess this is part of their strategy. Eg: encourage
>> adoption.
>> Dave
>> On Tuesday, July 27, 2010, Jonathan Shook<>  wrote:
>>> Also, google trends is only a measure of what terms people are
>>> searching for. To equate this directly to growth would be misleading.
>>>  Tue, Jul 27, 2010 at 12:27 PM, Drew Dahlke<>
>>>  wrote:
>>>> There's a good post on stackoverflow comparing the two
>>>> It seems to me that both projects have pretty vibrant communities behind
>>>> them.
>>>> On Tue, Jul 27, 2010 at 11:14 AM, Mark<>
>>>>  wrote:
>>>>> Can someone quickly explain the differences between the two? Other than
>>>>> the
>>>>> fact that MongoDB supports ad-hoc querying I don't know whats
>>>>> different. It
>>>>> also appears (using google trends) that MongoDB seems to be growing
>>>>> while
>>>>> Cassandra is dying off. Is this the case?
>>>>> Thanks for the help
>> Well my initial use case would be to store our search logs and perform
> some ad-hoc querying which I know is a win for Mongo. However I don't think
> I fully understand how to build indexes in Cassandra so maybe its just an
> issue of ignorance. I know going forward though we would be expanding it to
> house our per item translations.


View raw message