Cassandra Basics

Based on Google BigTable + Amazon DynamoDB incubated at FaceBook –> shared with Apache
Distributed, High Performance, Scalable, Fault tolerant
Fast for Read-only
Peer-to-peer distributed system, all nodes are the same
Data is partitioned among all nodes in the Cluster
Data is replicated to ensure fault tolerant
Read/Write anywhere
Uses Gossip protocol, each node communicates with each other approx every 1 sec to determine what’s up/down, activities in the cluster
DML – first written to commit log, ensure data durability > then written to a memory table memtable … once memtable is full > written to an SStable on disk (sorted strings)
Data is stored in row-oriented, column structure design
Key space = Database
Column Family = Table
Can have a PK in a column family
Benefits
Big data capable > PB
Linear performance when new nodes are added
No single point of failure, read/write anywhere
Data replication – transparently handled, multi-data center capable
No need for caching software, since peer-to-peer
Tunable data consistency – depending on use case.  Can set to force to confirm all nodes write a operation.  Any, One, Quoram, Local_Quoran, Each_Quoram, All
Column Family Schema
Handles structured, semi or unstructured
No offline for schema changes
Can have PK and secondary indexes
Very strong compression capability, using Google’s Snappy compression.  About 80%, no performance penatly
CQL – Cassandra Query Language
Similar to SQL
Create Objects via DDL, Core DML, and Select
Cassandra users:
Netflix, Twitter, Cisco, …
Download & Install Cassandra
To install Cassandra:
Pre-req: JDK 1.8 (add JAVA_HOME and add to path in /etc/profile, Python 2.7 (http://thecpaneladmin.com/how-to-upgrade-python-on-centos/)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s