Time-window compaction strategy (TWCS) groups SSTables containing time-series data by time window. When a window expires, Scylla compacts the SSTables in that window together. This organizes compaction around the age of data rather than its size or level. section 8.4.1 section 8.5
TWCS fits into Scylla’s broader compaction model:
- Compaction combines SSTables and removes obsolete data when the necessary versions are included together. section 8.4.1
- Unlike size-tiered compaction, which groups SSTables by size, TWCS groups them by time window. section 8.4.1
- Unlike leveled compaction, which organizes SSTables into levels, TWCS waits for a time window to elapse before compacting that window’s data. section 8.4.1 section 8.5
Figure 8.18 TWCS is only used with time series data, dividing the data into windows and compacting it together when the window expires.
The figure illustrates TWCS dividing time-series data into windows and compacting each window after it expires. section 8.4.1
