Interview practice question
Services disagree about order state
System Design · Distributed Systems · Experienced
The order service says an order is cancelled, while the shipping service shipped it. Events between them are asynchronous. How do you prevent this?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Race between cancel and ship.
- Single owner of order state transitions.
- Shipping checks/reserves state before shipping.
- State machine with versions.
- Compensation if race slips through.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.