Pick the fix
A chat app stores messages with partition key conversation_id only, and old busy conversations get slow. Fix?
Hint 1 of 1
What grows without limit?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Partition by (conversation_id, month) to bound partition size
Correct. Each partition stays a manageable size.
In Cassandra-style stores a partition key's rows all live together, so a busy conversation grows one huge partition. Adding a time bucket like the month caps how big each partition gets.
Why not the others?
- B Add a secondary index on timestamp. Doesn't shrink the partition.
- C Raise the consistency level. Makes reads slower, not smaller.
- D Delete old messages daily. Tombstones add their own read cost.