DEV Community

Cover image for When should I use Cassandra?
Neeraj Kumar
Neeraj Kumar

Posted on

When should I use Cassandra?

Cassandra is a distributed database that takes all the burden of scale from you. I found 5 main advantages of Cassandra :

  1. Linearly scalable: If you need more storage, just add extra nodes to the cluster.
  2. Tune-able consistency: You can set the consistency level at the query level, ranging from you being ok with acknowledgment from single node for any operation, to you demanding acknowledgment from all nodes.
  3. It supports replication, and setting up replication factor is quite simple.
  4. Auto detecting failures using gossip protocol.
  5. Supports topology at datacenter and even at rack level.

There are many other advantages which I have touched upon in the video. I have also covered how we started from single node databases => replicas => shards => Cassandra

Use Cases/ Applications of Cassandra
Cassandra can be used for different type of applications. Following is a list of use cases where Cassandra should be preferred:

Messaging
Cassandra is a great database which can handle a big amount of data. So it is preferred for the companies that provide Mobile phones and messaging services. These companies have a huge amount of data, so Cassandra is best for them.

Handle high speed Applications

Cassandra can handle the high speed data so it is a great database for the applications where data is coming at very high speed from different devices or sensors.

Product Catalogs and retail apps
Cassandra is used by many retailers for durable shopping cart protection and fast product catalog input and output.

Social Media Analytics and recommendation engine

Cassandra is a great database for many online companies and social media providers for analysis and recommendation to their customers.

Important Points of Cassandra
1.Cassandra is a column-oriented database.
2.Cassandra is scalable, consistent, and fault-tolerant.
3.Cassandra's distribution design is based on Amazon's Dynamo and its data model on Google's Bigtable.
4.Cassandra is created at Facebook. It is totally different from relational database management systems.
5.Cassandra follows a Dynamo-style replication model with no single point of failure, but adds a more powerful "column family" data model.
6.Cassandra is being used by some of the biggest companies like Facebook, Twitter, Cisco, Rackspace, ebay, Twitter, Netflix, and more.

Features of Cassandra

High Scalability
Cassandra is highly scalable which facilitates you to add more hardware to attach more customers and more data as per requirement.

Rigid Architecture
Cassandra has not a single point of failure and it is continuously available for business-critical applications that cannot afford a failure.

Fast Linear-scale Performance
Cassandra is linearly scalable. It increases your throughput because it facilitates you to increase the number of nodes in the cluster. Therefore it maintains a quick response time.

Fault tolerant
Cassandra is fault tolerant. Suppose, there are 4 nodes in a cluster, here each node has a copy of same data. If one node is no longer serving then other three nodes can served as per request.

Flexible Data Storage
Cassandra supports all possible data formats like structured, semi-structured, and unstructured. It facilitates you to make changes to your data structures according to your need.

Easy Data Distribution
Data distribution in Cassandra is very easy because it provides the flexibility to distribute data where you need by replicating data across multiple data centers.

Transaction Support
Cassandra supports properties like Atomicity, Consistency, Isolation, and Durability (ACID)

Fast writes
Cassandra was designed to run on cheap commodity hardware. It performs blazingly fast writes and can store hundreds of terabytes of data, without sacrificing the read efficiency.

Top comments (0)