Cassandra Interview Questions and Answers
Experienced / Expert level questions & answers
Ques 1. What is a secondary index in Cassandra?
A secondary index in Cassandra allows querying on columns other than the primary key. However, the use of secondary indexes should be carefully considered due to potential performance implications.
Ques 2. How does Cassandra handle data distribution across nodes?
Cassandra uses a consistent hashing algorithm to distribute data across nodes in the cluster. This ensures a uniform distribution of data and facilitates efficient data retrieval.
Ques 3. What are the different compaction strategies in Cassandra?
Cassandra supports several compaction strategies, including SizeTieredCompactionStrategy, LeveledCompactionStrategy, and TimeWindowCompactionStrategy. Each strategy has its own advantages and is suited for specific use cases.
Ques 4. Explain the concept of tombstones in Cassandra.
Tombstones in Cassandra are markers used to represent deleted data. They are necessary for eventual consistency and are used during the process of data cleanup and compaction.
Ques 5. What is a lightweight transaction in Cassandra?
A lightweight transaction in Cassandra is a form of conditional update that ensures atomicity and isolation. It allows for conditional updates based on the current state of the data.
Most helpful rated by users: