All Questions
Api Design hard

Your e-commerce API depends on a Recommendations service. During Black Friday, Recommendations service is overloaded and timing out. What should the main API do?

  1. A Implement a fail-fast strategy that returns a 503 Service Unavailable error to the user immediately to prevent the accumulation of high-latency requests in the server's thread pool.
  2. B Adopt a 'Graceful Degradation' policy by serving the core product data while hiding the non-critical recommendations section or replacing it with a cached set of generic items.
  3. C Establish an aggressive retry-on-timeout policy for the Recommendations service to ensure that every user eventually receives a personalized response during periods of peak load.
  4. D Switch the entire application to 'Maintenance Mode' until the backend services can be horizontally scaled to handle the current surge in Black Friday traffic successfully.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions