Range or hash

Scale 09

Choose

A log table takes 16,000 events/s, all stamped now. A report reads one account's events from the last hour 200 times/s. Choose how to split four 1-vCPU shards. Keep CPU use below 70 percent and both p99 times below 100 ms.

Goals

Not tested yet

99 of 100 requests finish faster than this.99 of 100 requests finish faster than this.The share of requests that fail or get no answer.How busy the busiest CPU is. Keep room for spikes.What the servers and services cost each month.
Choose a design
Split by time range
Split by a hash of the event ID
Split by account hash, ordered by time