Design Webhook Dispatcher.

Medium
Company: Premium
GoogleAmazon

Imagine we're building a system that dispatches webhooks to various subscribers whenever certain events occur within our core application (e.g., a user signs up, a payment is processed, an order is shipped). Our goal is to design a flexible and robust webhook dispatcher that can handle different types of events, different delivery mechanisms (HTTP, potentially others in the future), and varying subscriber requirements. We aim for a design that is easily extensible, testable, and maintainable as our system evolves.

The core challenge is decoupling the event generation from the webhook delivery process. We want to avoid tightly coupling our application logic with the specifics of how webhooks are sent. We need a mechanism to reliably enqueue webhook delivery requests, handle potential delivery failures, and ensure that webhooks are delivered in a reasonable timeframe.

Requirements

Interview Simulation

Experience a realistic interview conversation. The interviewer will ask clarifying questions,and you'll reveal your understanding of the requirements.

Interviewer

Let's start by understanding the scope. What are the core functionalities this system needs to provide?

💡 Interview Tip

Identify the Actors (Who uses the system?) and their Use Cases (What are they trying to achieve?). Start with the 'Happy Path' scenarios.

Press ⌘ + Enter to submit

Premium Content

View detailed solutions.

UNLOCK PREMIUM