TWCS PART 1 - HOW DOES IT WORK AND WHEN SHOULD YOU USE IT ?

In this post we’ll explore a new compaction strategy available in Apache Cassandra. We’ll dig into it’s use cases, limitations, and share our experiences of using it with various production clusters. Time Window Compaction Strategy : how does it work and when should you use it ? Cassandra uses a Log Structured Merge Tree engine, which allows high write throughput by flushing immutable chunks of data, in the form of SSTables, to disk and deferring consistency on the read phase.

TWCS PART 2 - USING BEFORE CASSANDRA 3.0

In our first post about TimeWindowCompactionStrategy, Alex Dejanovski discussed use cases and the reasons for its introduction in 3.0.8 as a replacement for DateTieredCompactionStrategy. In our experience switching production environments storing time series data to TWCS, we have seen the performance of many production systems improve dramatically. The examples Alex gives for making use of TWCS work great for recent versions of Cassandra. However, a significant number of users are still using 2.

UNDERSTANDING THE NUANCE OF COMPACTION IN APACHE CASSANDRA

Compaction in Apache Cassandra isn’t usually the first (or second) topic that gets discussed when it’s time to start optimizing your system. Most of the time we focus on data modeling and query patterns. An incorrect data model can turn a single query into hundreds of queries, resulting in increased latency, decreased throughput, and missed SLAs. If you’re using spinning disks the problem is magnified by time consuming disk seeks.