All Questions
Api Design medium

Your API sends webhooks to customers' endpoints. If their server is down, the webhook is lost. How do you make webhooks reliable?

  1. A Implement an asynchronous delivery queue with exponential backoff retries and provide an events API to let clients query for missed notifications.
  2. B Switch from HTTP to a connection-oriented protocol like raw TCP or WebSocket to maintain a persistent link between the sender and every client endpoint.
  3. C Use a Fire-and-Forget pattern where the sender ignores HTTP error status codes, assuming the client or intermediate proxies will eventually resolve the delivery.
  4. D Require clients to implement a Distributed Lock on their webhook endpoint to ensure that only a single, confirmed delivery can occur at any given time.

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

Get the app

Related questions