Rules of thumb

Partition < 100MB (softer) to 1GB (hard). Rows per partition ≤ 100k typical. Even distribution across cluster.

Advertisement

Bucketing pattern

Time-series 'sensor_readings by sensor_id + day'. Prevents unbounded growth. Time bucket = day/hour/minute depending on rate.

Advertisement

Composite partition key

PRIMARY KEY ((user_id, region), created_at, event_id)