System Design · Senior · Question 47 of 75
How do you keep the site working if the recommendations service is down?
- ✓Correct answer: Timeout, circuit breaker and a fallback without recommendations
- 2Wait for recommendations forever without showing the page
- 3Return a 500 error for the whole page
Explanation
Non-critical dependencies must not take down the main flow. Render the page, and show the recommendations block from cache, as popular products, or hide it. On the frontend - Suspense and an error boundary around the block, streaming instead of waiting.