One Seller, One Shard
Easy · system design problem
Traffic doubles and 15% of all writes go to one viral seller, whose listings live in one chunk range. Doubling the shards is nowhere near enough.
The listings service is write-heavy (80% writes) on a 3-shard MongoDB cluster sharded by seller. At T+20s a creator’s sale goes viral: traffic doubles for the rest of the day and 15% of all requests hit that seller’s chunk range, which lives on one shard. MongoDB’s balancer can add shards online. Writes cannot be cached.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.