Cassandra vs MongoDB

Posted By : Lokesh Kumar | 26-Feb-2018

Cassandra and MongoDB are both "NoSQL" databases, however actually they are altogether different. They have altogether different qualities and offers – so any correlation must be a nuanced one. How about we begin with starting prerequisites… Neither of these databases replaces RDBMS, nor are they "ACID" databases. So If you have a value-based workload where standardization and consistency are the essential necessities, neither of these databases will work for you. You are in an ideal situation staying with conventional social databases like MySQL, PostGres, Oracle and so forth. Since we have social databases off the beaten path, how about we consider the real contrasts amongst Cassandra and MongoDB that will enable you to settle on the choice. In this post, I am not going to talk about particular highlights but rather will call attention to some abnormal state vital contrasts to enable you to settle on your decision.

 

1. Expressive Object Model 

MongoDB bolsters a rich and expressive object model. Objects can have properties and objects can be settled in each other (for various levels). This model is exceptionally "object-situated" and can without much of a stretch speak to any object structure in your space. You can likewise file the property of any object at any level of the progression – this is strikingly effective! Cassandra, then again, offers a genuinely customary table structure with lines and segments. Information is more organized and every segment has a particular sort which can be indicated amid creation.

Decision: If your concern area needs a rich information model then MongoDB is a superior fit for you.

 

2. Secondary Indexes 

Secondary indexes are a top of the line build in MongoDB. This makes it simple to record any property of an object put away in MongoDB regardless of whether it is settled. This makes it extremely simple to inquiry in view of these secondary indexes. Cassandra has just quick help for secondary indexes. Secondary indexes are likewise restricted to single segments and correspondence correlations. In the event that you are for the most part going to inquiry by the essential key then Cassandra will function admirably for you.

Decision: If your application needs secondary indexes and needs adaptability in the inquiry model then MongoDB is a superior fit for you.


3. High Availability 

MongoDB underpins a "single master" model. This implies you have a master node and various slave nodes. On the off chance that the master goes down, one of the slaves is chosen as master. This procedure happens naturally yet it requires investment, as a rule 10-40 seconds. Amid this season of new pioneer decision, your reproduction set is down and can't take composes. This works for most applications at the end of the day relies upon your requirements. Cassandra bolsters a "multiple master" model. The passing of a single node does not influence the capacity of the group to take composes – so you can accomplish 100% uptime for composes.

Decision: If you require 100% uptime Cassandra is a superior fit for you.

 

4. Compose Scalability 

MongoDB with its "single master" model can take composes just on the essential. The secondary servers must be utilized for peruses. So basically on the off chance that you have three node reproduction set, just the master is taking composes and the other two nodes are utilized for peruses. This extraordinarily constrains compose adaptability. You can convey multiple shards however basically just 1/3 of your information nodes can take composes. Cassandra with its "multiple master" model can take composes on any server. Basically your compose adaptability is constrained by the quantity of servers you have in the group. The more servers you have in the group, the better it will scale.

Decision: If compose scalability is your thing, Cassandra is a superior fit for you.

So this is all about the Cassandra and MongoDB.

About Author

Author Image
Lokesh Kumar

Lokesh is a Software Developer having experience in Core Java, Hibernate, Struts, MongoDB. His interest includes playing chess,cricket,badminton.

Request for Proposal

Name is required

Comment is required

Sending message..