Cassandra medium
Cassandra uses immutable SSTables. When data is updated or deleted, the old version remains on disk alongside a new version. What are the primary performance impacts during 'Compaction'?
- A Compaction is purely a memory-cpu task and has zero impact on Disk I/O or storage space.
- B Write Amplification and I/O Contention: Merging multiple SSTables into a single new file consumes significant Disk I/O and temporarily requires enough free space to hold two copies of the data.
- C Compaction speeds up writes by clearing the Memtable every 10 seconds.
- D It is only required when the database is using a relational storage engine behind the scenes.
Answer: B. Write Amplification and I/O Contention: Merging multiple SSTables into a single new file consumes significant Disk I/O and temporarily requires enough free space to hold two copies of the data.
Compaction is essential to keep 'Read' performance high (fewer files to scan) and to reclaim space (deleting old versions and tombstones). However, it is an expensive background background task. Systems must be tuned (STCS vs LCS) to balance the cost of 'Merging' vs the speed of 'Querying'.
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?