Push vs pull
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 · 8 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.

    What does polling cost for a million open apps?

      What does pushing the same updates cost instead?

        Where does each feed strategy pay its cost?

          Build-up · 5 steps

          A webhook is a hint; pull the truth

          Payment results reach you as webhooks. Here is how a push you can’t fully trust becomes a reliable flow.

          Step 1 of 5

          The gateway pushes

          When a payment changes, the gateway pushes an event to your HTTPS endpoint. Return 2xx quickly and do the work afterwards.

          4 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 4

            Interviewer

            “Twenty million fans want the live cricket score within seconds. How do you deliver it?”

            Your move. Pick an approach:

          2. Deep dive 2 of 4

            Interviewer

            “Your app learns payment results from a gateway’s webhooks. What makes that reliable?”

            Your move. Pick an approach:

          3. Deep dive 3 of 4

            Interviewer

            “Most accounts have hundreds of followers, but a few have 10 million. How do you build home timelines?”

            Your move. Pick an approach:

          4. Deep dive 4 of 4

            Interviewer

            “50,000 agents poll for config every 60 seconds. You’re about to restart the config service. What do you add first?”

            Your move. Pick an approach: