Sharding · Multiple choice

You shard view counts by video_id. One viral video now gets 200,000 writes a second, far more than one shard can take. What is the usual fix?

hard Streaming

Options

Why

More shards do not help: one key always hashes to one shard. Salting the key spreads its writes over N shards, and reads add up N small counters (or a cache holds the total).

Review this in your daily deck All cards in Sharding