Queues
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 · 5 steps

    A redelivery after a crash

    One message, two workers, an SQS visibility timeout of 30 seconds. Time runs left to right; drawn to show order, roughly to scale.

    Step 1 of 5

    Send, then store

    The producer sends m1 at 0 s. The queue stores it durably before saying ok.

    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 calls the invoice service and waits for it. On sale days, slow invoicing times out checkout. What do you change?”

      Your move. Pick an approach:

    2. Deep dive 2 of 4

      Interviewer

      “Report jobs take 2 to 8 minutes, and the SQS visibility timeout is still the default 30 seconds. What do you set?”

      Your move. Pick an approach:

    3. Deep dive 3 of 4

      Interviewer

      “OTP SMS messages are arriving late, and the worker fleet isn’t scaling up. Which signal should drive scaling and alerts?”

      Your move. Pick an approach:

    4. Deep dive 4 of 4

      Interviewer

      “A one-hour outage queued 4.32 million messages. The fleet has 560 messages a second of spare capacity. What do you do?”

      Your move. Pick an approach:

    Build-up · 5 steps

    Buffer a flash-sale spike

    A worker fleet processes at most 1,200 messages a second. Normal traffic is 400; a flash sale sends 2,000 a second from minute 5 to minute 15.

    Step 1 of 5

    A normal day

    Arrivals at 400 a second sit well under the fleet’s 1,200, so the queue stays empty.