How do I design distributed systems in Google: Webhooks

Abracadabra
10 min readJun 25, 2024

Refer to the first post for the background of this series.

Problem introduction

Webhook is a mechanism for one software system to notify another system of events. They are widely used in distributed systems for event-driven architectures like payment processing. For example, in online shopping, after user initiates the payment flow, she is directed to 3rd party payment processing vendors like Shopify, Paypal, or a bank; then the payment vendor send the payment to the online store’s backend server. This backend server is called Webhook server, it receives events update and process accordingly.

Let’s design a webhook system that is minimal viable but scales indefinitely.

Define the operation flows

This is the first challenge for any system design: Disambiguate the vague problem statement. One strong strategy is to convert the vaguely described product into a clearly defined operation flow. This will both clarify any functional requirements and set up the framework for the formal technical discussion. Here, let’s assume the agreed upon flows are the following.

Event configuration flow

--

--