Posts

Showing posts from October, 2021

Cassandra's Read Path

Image
 Cassandra's Read Path Cassandra is a NoSql database that is designed for heavy writes. So the read path of Cassandra is a little complex. Every node stores its data in immutable sstables. So there can be multiple sstables for one table of data. So in order to read something from Cassandra, we have to search all the sstables which are responsible for that data. So we have multiple components which are useful for optimizing the sstable search. They are: 1. Bloom Filter:   Bloom filter says "Hey! The data you looking for doesn't exist here!" Meaning it helps us to find the correct sstable. But sometimes BF may give false positives(sometimes it says the data is in this sstable but we end up not finding the data.), but never gives false negatives (If BF says data is not there in a particular sstable it'll not be there.) 2. KeyCache: KeyCache stores the byte offset value of particular data which is already viewed. 3. Partition Summary: It is used when the partition ind...