All Questions
Api Gateway hard

Your API is receiving a large stream of data from a fast client, but the backend worker is processing it very slowly. How can the API Gateway use 'TCP Backpressure' to prevent its own memory from being exhausted by the buffering?

  1. A By automatically dumping the excess data to a local `/tmp` file on the Gateway's disk.
  2. B By stopping the internal 'read' calls on the client's socket. This causes the Gateway's OS-level receive buffer to fill up, which eventually signals a 'Zero Window' to the client's TCP stack, forcing the client to slow down.
  3. C By sending an 'ICMP Redirect' packet to the client to tell them to find a different Gateway.
  4. D TCP Backpressure is a myth; you must implement an SQS queue at the Gateway level to handle flow control.

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

Get the app

Related questions