Backend Engineer
How would you design a system that sends order confirmation emails reliably, even if the email provider is down for a while?
What the interviewer is looking for
- This question tests distributed systems & scalability. Discusses queues, retries, idempotency, caching and failure modes, and reasons about when added complexity is justified.
- Strong answers: Decoupling with a queue or outbox pattern, retries with backoff, idempotency to avoid duplicates, dead letter handling, and monitoring the backlog.
- Likely follow-up: How do you make sure a customer never gets the same email twice?
Another way it may be asked: Customers must always get their order email, but the email service sometimes fails. How would you build this?
A structure to follow: Requirements, sketch, deep-dive, trade-offs
- Step 1
Requirements
Ask who uses it, what it must do, and which qualities matter most: speed, reliability, cost, consistency.
- Step 2
Sketch
Draw the main parts and the path one request takes through them before adding detail.
- Step 3
Deep-dive
Pick the riskiest part (storage, queueing, failure handling) and go deeper there.
- Step 4
Trade-offs
Name what you gave up for each choice, and what you would do first if it needed to grow.
This is guidance on shape, not a script. Use your own real experience and facts; never invent details to fill a gap. See the STAR guide and answer frameworks.
Common slips
- Naming tools before establishing requirements.
- Drawing every box at the same depth instead of going deep where it matters.
- Presenting one design as the only answer, with no trade-offs.
How to practise it
Time yourself: two minutes on requirements, five on the sketch, five on one deep-dive, two on trade-offs.
Related questions
- When would you split a monolith into separate services, and when would you argue against it?
- If you were building an API for a simple to-do app, what endpoints would you create, and how would you handle errors?
- What is a database index, and how would you decide whether a column needs one?
- How do you protect a web application from someone sending malicious input, such as an SQL injection attack?
- Tell me about a time you changed a database schema on a live system. How did you do it without downtime?