All jobs / Backend developer / Distributed Systems
Backend developer interview question · 5+ years
The interviewer asks: “Recommendations are down. Checkout still needs to work. What do you do?” Strongest answer?
The strongest answer
Graceful degradation: serve checkout without recommendations, cache a last-known list, or hide the module. I don't let a non-critical dependency fail the money path — timeouts, breakers, and a product-agreed fallback.
Why it works
Exactly. Critical vs non-critical is an explicit list. Degrade the garnish; keep the transaction. That's resilience engineering, not a CSS trick.
What a good answer covers
- Classify critical vs optional deps.
- Fail optional; keep the money path.
- Timeouts and fallbacks, agreed with product.
- Don't buffer checkouts in RAM.
Answers that fall short
- Close, but not the strongest: Fail the whole page so we don't show a broken layout.
A blank checkout is a bigger incident than a missing carousel. Isolate the failure. - Weak: Block checkout until recommendations recover so data stays consistent.
Coupling money to a recommender is an accidental distributed monolith. Consistency isn't the issue here. - Red flag: Queue checkouts in memory until recommendations return.
In-memory queues of checkouts are a data-loss and a memory bomb. Don't hold payments hostage.
Who gets asked this
More Distributed Systems questions
- The interviewer asks: “We're adding a search index. Can the API write DB and Elasticsearch in one request?”…
- What happened, and what actually protects the write?
- The interviewer asks: “Active-active in two regions — what's the hard part?” Strongest answer?
- The interviewer asks: “A client retries POST /payments because of a timeout. How do you not charge twice?”…
- The interviewer asks: “A downstream HTTP call timed out. Do you retry?” Strongest answer?
- The interviewer asks: “Your HTTP client has no timeout. What's the risk?” Strongest answer?
- A RabbitMQ consumer acknowledges each message as soon as it arrives and then processes it. Messages go…
- The interviewer asks: “Your queue consumer ran twice for the same message. What do you do?” Strongest answer?