Posts

Installation Steps

  Cassandra Installation Steps 1.brew install cassandra 2.brew list 3.brew services start cassandra 4.brew services stop cassandra Stable version over here 5.Installed location:   /Users/Sumith/Documents/My_Stuff/Cassandra/software/apache-cassandra-3.11.1 6 cqlsh Where is the cassandra.yml file  /opt/homebrew/etc/cassandra

Apache Cassandra Overview

Image
  Apache Cassandra Overview

Snitches

Image
 

Hinted Handoff

Image
  Hinted Handoff

Gossip Protocol

Image
Gossip In Cassandra Each Node initiates a gossip round every second , it can pick 1-3 nodes to gossip Node do not track which nodes they gossip with prior.   It efficiently and reliably spreads the node metadata through the cluster.   Example Endpoint State:      IP Address: 192.168.1.10      Status: UP      Load 5 GB   Heartbeat State:     Generation=5.     (Timestamp of when node is bootstrapped)       Version= 22 (increment version for every gossip)   Application Status: Status = NORMAL       DC= west   RACK= rack1    

Read Repair Chance

Image
Read Repair Chance When a read request is made with consistency as ALL   Coordinator Node send the data request to nearest node   Coordinator Node send the checksum request from replica node Once it receives the responses it checks all the checksum values. If they are all same as below value 23 If. Values are different as below from replica nodes Coordinator nodes checks the checksum which has the latest timestamp , it discards the data from replica node which has stale data. Coordinator node sends the correct data on the replica node on which data is deleted  

Virtual Nodes in Ring

Virtual Nodes in Cassandra Ring In Apache Cassandra, virtual nodes (vnodes) are a way to divide the token range into smaller pieces and assign multiple token ranges to each node in the cluster.   What are Virtual Nodes (vnodes)? In the traditional Cassandra architecture, each node was responsible for a single, contiguous token range. This made data distribution and rebalancing more difficult when nodes were added or removed from the cluster because large ranges had to be reassigned. With vnodes, instead of assigning a single, large token range to a node, each node is assigned multiple, smaller token ranges. By default, Cassandra assigns 256 virtual nodes per physical node. This allows the total token space to be divided into many smaller chunks that are spread across the cluster. Example:   Instead of Node A owning the token range from zero to 500, Node B owning 500 to 1000, and so on, each node gets assigned multiple, smaller ranges. One node could own small token ranges li...