Ctrl K
Backend · Senior · System design

The main table in your database has grown to several terabytes, and a single instance can no longer keep up with the writes. How would you design the move to sharding?

~10 min by voice

How to approach it

The interviewer wants to see whether you can make an expensive architectural decision deliberately: exhaust the alternatives first, then choose a shard key from real query patterns, and migrate a live system without downtime or data loss.

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics
Similar questionsDesign a distributed rate limiter for a public API: limits are set per client key, and requests are handled by dozens of gateway instances. SeniorYour service makes synchronous calls to an external service that sometimes responds very slowly or with errors. How do you keep that from taking your service down? Mid-levelYour service calls another service over the network. What problems can come up, and how do you deal with them? JuniorA service saves an order to the database and then publishes an "order created" event to a message broker. What problems can come up here, and how do you solve them? Mid-levelCheckout involves three services, orders, payments and inventory, and each has its own database. How do you keep the data consistent if one of the steps fails? Senior

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~10 min