Ctrl K
Backend · Senior · System design

Checkout 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?

~10 min by voice

How to approach it

The interviewer checks whether the candidate understands how to keep services consistent without a distributed transaction. What matters is whether they can design a saga that survives failures: with idempotency, reliable command delivery, the right order of steps, and a plan for when a rollback fails.

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. SeniorThe 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? 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-level

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