We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
2 system design questions lean on this idea. Each walks through the full answer.
System Design Masterclass · Messaging Event Systems
Free preview: the first 2 parts of this 7-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Messaging Event Systems
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
You've applied for a job. You have two options for finding out whether you got it:
Option A: Call the company every hour and ask "Did you make a decision yet?" This is polling.
Option B: Give them your phone number and say "Call me when you've decided." This is a webhook.
Webhooks flip the communication model entirely. Instead of the client repeatedly asking the server "did anything happen?", the server reaches out and tells you when something happens. No wasted requests. No delays. The moment an event occurs, you know about it.
Stripe uses webhooks to tell your server when a payment succeeds. GitHub uses webhooks to notify your pipeline when code is pushed. Shopify, Twilio, Slack, PayPal, virtually every modern API uses webhooks as the primary way to deliver events.
If you've ever integrated with a third-party API, you've almost certainly dealt with webhooks. And if you haven't yet, you will.
A webhook is just an POST request sent from one server to another when an event occurs. That's it. No special protocol, no persistent connections, no fancy handshakes.
The setup:
The efficiency here: your server does zero work until an event actually happens. No polling, no open connections, no wasted . You just sit there waiting for HTTP requests to arrive.