Interview Q&A / System Design
System Design interview questions
Caching, scaling, databases and classic design problems for beginners.
Prefer rapid revision? Practise System Design short interview answers →
- How do you make a message consumer idempotent?
Record the id of each processed message in the same transaction as its effect, and skip ids already seen. Or design the operation to be naturally repeatable, such as setting a value rather than incrementing it.
IntermediateQuick answer1 min read - How does an idempotency key stop duplicate payments?
The client sends a unique key with each payment request. The server stores the key with the result; if the same key arrives again, it returns the saved result instead of charging again.
IntermediateQuick answer1 min read