使用 Leveled Compaction 的低 TTL,我应该减少 gc_grace_seconds 以提高读取性能而不影响删除复制吗?

Low TTL with Leveled Compaction, should I reduce gc_grace_seconds to improve read performance without impacting delete replication?

Leveled Compaction 的低 TTL,我应该减少 gc_grace_seconds 以提高读取性能吗?

场景: Cassandra Table 缓存外部数据库值 - 读取性能需要良好(小于 100 毫秒) TTL = 行级 4 小时 功能完整 table 每 6 小时刷新一次(删除然后延迟加载) 如果我将 gc_grace_seconds 保持在 10 天 的默认值,我可能有 60 行,每个活动行都有墓碑。这会影响读取性能。还是不行?

是否减少 gc_grace_seconds 说 1 天 是一个足够安全的值以允许跨节点删除复制?鉴于即使某个节点因某些问题而超出层级,它也应该在不到一天的时间内恢复。这会提高读取性能吗?

I can potentially have 60 rows with tombstones for every live row. This will affect read performance. Or not?

是的,它肯定会影响你的读取性能。在 data/tombstone 比率为 1:60 时,您将要求 Cassandra 为每个好行清除 60 次删除。如果你有很多记录,它可能会表现得非常糟糕。

Is reducing gc_grace_seconds to say 1 day a safe enough value to allow delete replication across nodes? Given that even if a node is out of tier for some issue, it should be brought back in less than a day. Will this improve read performance?

这应该会显着提高您的读取性能。但缺点是,如果您有一个节点从集群中退出,那么您只有 1 天的时间在它不知道删除之前将其重新加入。但即使你错过了它,你也应该能够通过 运行 宁 nodetool repair 让你的节点恢复到一致的状态。否则,您将 运行 可能面临 deleted data re-appearing 的风险。