What is Cassandra and When to use it ?

What is Cassandra and When to use it ?

Motivation

  • Cassandra is being used at my work , so I thought lets dive deeper into understanding what is cassandra and why we should use it .

What is Caasandra ?

  1. Distributed DBMS which is build to handle large amounts of data across multiple data centers and the cloud.

Features

  1. highly scalable.

  2. Offers high availability.

  3. has no single point of failure.

Some more points

  1. Written in java.

  2. Developed by facebook for inbox search and it was open sourced in 2008 by facebook.

  3. Later in 2009 it became part of apache incubator in 2009.

  4. Since it can handle large amount of data makes it particularly beneficial for major corporations.

What is NoSQL Database ?

  1. also referred as "not only SQL" database is one that stores and retrieves data without storing data in a tabular format.

  2. NoSql Allows for unstructures data This type of database offers

  • Simple design

  • Horizontal scaling.

  • Extensive control over availability.

  • Cassandra is one of the NoSql Db.

Cons of using noSQL Database.

  1. Are just eventually consistent.

  2. Don't Support transactions. :)

Most famous NoSQL Db

  1. Apache Cassandra.

  2. Apache HBase.

  3. MongoDB.

How does Cassandra work ?

  1. Cassandra is peer to peer system.

  2. Its distribution design is modeled n Amazon's DynamoDB and its data model is based on Google 's Big Table.

  3. All nodes in a cluster can accept read and write request as there are no master nodes, Instead all nodes communicate equally.

  4. All data is entered in a commit log to ensure data is not lost

  5. Then data is indexed and written to memtable. There is one active memtable per table.

  6. Cassandra can be easily scaled by simply adding new nodes, there is constant uptime and no need to shut the system down to accommodate more customers or more data.