Webhooks
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Layer 3 · Go deeper · 10 min

    Go deeper

    Size it, build it, then make the calls an interviewer will push you on.

    Back of the envelope

    Size it up

    Tap through each step of the arithmetic.

    How many webhook deliveries a second at the peak?

      How many attempts a day, counting retries, and how much log?

        How many requests are in flight at the peak?

          How many worker pods carry 31k concurrent requests?

            Build-up · 6 steps

            Build the high-level design

            One functional requirement at a time, ending with a design that works before any scaling.

            Step 1 of 6

            Register endpoints

            The endpoint service accepts HTTPS URLs with public hosts, generates a 32-byte secret it shows once, and enables the endpoint only after a signed test ping gets a 2xx.

            6 interview moments

            You’re the candidate

            The interviewer pushes on the hard parts. Pick an approach and see how it holds up.

            1. Deep dive 1 of 6

              Interviewer

              “The payment lives in the payments database, its event in Kafka. How do you never lose an event between them?”

              Your move. Pick an approach:

            2. Deep dive 2 of 6

              Interviewer

              “You deliver to 60,000 endpoints, and at any moment hundreds are slow or down. How do you stop one from delaying everyone else?”

              Your move. Pick an approach:

            3. Deep dive 3 of 6

              Interviewer

              “About 260 deliveries fail every second. How do you retry them for three days without storms or lost state?”

              Your move. Pick an approach:

            4. Deep dive 4 of 6

              Interviewer

              “Anyone on the internet can POST JSON to a merchant’s webhook URL. How does the merchant know it’s really you?”

              Your move. Pick an approach:

            5. Deep dive 5 of 6

              Interviewer

              “Merchants type in any URL, and your workers call it from inside your data centre. How do you stop SSRF?”

              Your move. Pick an approach:

            6. Deep dive 6 of 6

              Interviewer

              “830 million attempts a day, kept 30 days, read as “failed attempts for one endpoint, newest first.” Where do they live?”

              Your move. Pick an approach:

            Build-up · 9 steps

            Follow one captured payment

            The hot path runs from the payments database to the merchant’s URL. Everything that waits, retries, dead letters, logs and replays, sits beside it.

            Step 1 of 9

            Commit

            The payments service writes the payment row and an outbox row in one transaction. A CDC relay tails the log and publishes the event to events, keyed by merchant.