Ten Days Per Bucket
Discord's message table used the primary key ((channel_id, bucket), message_id). The partition key pairs the channel with a fixed time bucket; message_id is a snowflake, so rows inside a partition are already in time order. The bucket exists only to bound partition size, because a partition that grows without limit hurts compaction and makes cluster expansion painful. Discord targeted partitions under 100 MB and chose a 10 day bucket.
Take a stored row as roughly 200 bytes and 100 MB as bytes.
More than one option is correct. With a 10 day bucket, which of these channels blows the 100 MB target?
Sign in to answer questions and track your progress
Sign In