All Questions
Api Gateway medium

Your Gateway is performing 'Request Aggregation' for 4 services. If 3 services respond in 100ms but the 'Promotions' service times out after 2 seconds, what is the best architectural response?

  1. A Wait up to 30 seconds for the Promotions service to ensure the data is 100% complete.
  2. B Return a 504 Gateway Timeout error for the entire request so the user knows something is wrong.
  3. C Return a 'Partial Response': Send the critical data (User, Orders, Cart) and a null or error indicator for the failed Promotions section.
  4. D Automatically restart the Promotions service and wait for it to come back online before answering the user.

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

Get the app

Related questions