Cassandra hard
Why would a performance engineer recommend Leveled Compaction Strategy (LCS) over Size-Tiered (STCS) for a read-heavy workload with a high percentage of 'Read-Modify-Write' cycles?
- A LCS reduces write amplification to near-zero, making it ideal for high-throughput SATA drives.
- B LCS guarantees that 90% of reads are satisfied by a single SSTable lookup (at most one SSTable per level contains the key), significantly reducing the IOPS required for reads.
- C LCS disables the use of Bloom Filters, saving significant JVM heap space.
- D LCS is specifically designed to work only with spinning hard drives (HDD) by optimizing platter rotation.
Answer: B. LCS guarantees that 90% of reads are satisfied by a single SSTable lookup (at most one SSTable per level contains the key), significantly reducing the IOPS required for reads.
LCS proactively merges SSTables into fixed-size levels where keys do not overlap. This provides 'Deterministic' read performance. The trade-off is higher 'Write Amplification', as data is copied multiple times as it moves from Level 0 to Level 4, making it less ideal for extremely high-velocity write workloads.
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?