Search code examples
cassandracqlcqlshscylla

Which compaction strategy to use for both read/write intensive program using scylla db


I have a program intensively read and write (same amount of read and write, for write, 4/5 update and 1/5 insert). Is SizedTired compaction better than Leveled one?

Also most of data have TTL 7 days and others are 1 day. In this case, is Time Window strategy preferred?


Solution

  • Timewindow isn't a good fit since you have updates which make it less ideal. Sizetier performs the best with the cost of more volume usage. Check the table for compaction algorithm selection here: https://www.scylladb.com/webinar/on-demand-webinar-best-practices-for-data-modeling/

    Usually STCS is the best default