Pub/sub
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 · 6 min

    Go deeper

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

    Build-up · 4 steps

    Two subscribers miss five minutes

    A publisher keeps sending while two subscribers restart from 10:00 to 10:05. One subscription is ephemeral, the other durable.

    Step 1 of 4

    The publisher keeps going

    The publisher sends m1 to m6 over eight minutes. It neither knows nor cares who is listening.

    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

      “Checkout must tell the kitchen, rider, SMS, loyalty, fraud and analytics services about every order. How do you wire it?”

      Your move. Pick an approach:

    2. Deep dive 2 of 4

      Interviewer

      “A high-volume, bursty analytics consumer joins the order-events topic. Should the broker push to it, or should it pull?”

      Your move. Pick an approach:

    3. Deep dive 3 of 4

      Interviewer

      “Six subscribers react to OrderPlaced at 5,000 events a second. Should the event carry just the order ID?”

      Your move. Pick an approach:

    4. Deep dive 4 of 4

      Interviewer

      “A chat app wants one Pub/Sub subscription per user to deliver messages. Good idea?”

      Your move. Pick an approach:

    Build-up · 5 steps

    Kafka, pub/sub across groups

    One orders topic with four partitions, read by two consumer groups.

    Step 1 of 5

    One topic, four partitions

    Records keyed by order ID land in partitions P0 to P3. Reading doesn’t delete anything.