Cassandra hard
When Cassandra searches for a key in an SSTable, it uses the 'Partition Summary'. What is the specific role of the Summary compared to the 'Partition Index'?
- A The Summary is stored on disk and the Index is stored in the JVM heap.
- B The Summary is a sampling of the Index (e.g., every 128th key) kept in-memory; it provides the offset range to scan in the physical on-disk 'Partition Index' file.
- C The Summary is used only for writes, while the Index is used only for reads.
- D The Summary is a copy of the Bloom Filter used to double-check results.
Answer: B. The Summary is a sampling of the Index (e.g., every 128th key) kept in-memory; it provides the offset range to scan in the physical on-disk 'Partition Index' file.
The full Index of a large SSTable is too big for RAM. The 'Partition Summary' is a compact, in-memory Map that points to locations in the Index file. This allows Cassandra to jump directly to a small section of the disk index, minimizing sequential scanning. The sampling rate is configurable via `index_interval`.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- In a Cassandra Keyspace, what does a 'Replication Factor of 3' specifically guarantee for your data redundancy?
- Unlike a Leader-Follower architecture (like MySQL or Redis), how does Cassandra maintain high availability within its node cluster?
- Cassandra Query Language (CQL) looks similar to SQL. What is a fundamental SQL feature that CQL does NOT support to ensure distributed performance?
- What is the critical architectural function of the 'Partition Key' in a Cassandra table?
- Apache Cassandra is fundamentally designed as which architectural category of NoSQL database?
- An extreme financial trading application requires 'Batch' sync for the Commit Log. What is the fundamental throughput limitation introduced by this setting?