Noisy neighbours
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 · 7 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.

    1,000 units, four tenants want 1,550. What does enterprise tenant D get?

      How hard does one export hit the database through a shared cache?

        How long do other sellers’ OTPs wait behind one festive SMS blast?

          Build-up · 6 steps

          From one FIFO queue to fair turns

          W’s 2-million-job Diwali export, first in one shared queue, then in per-tenant queues behind a fair scheduler. Same 200 workers throughout.

          Step 1 of 6

          One shared queue, arrival order

          Every seller’s jobs share one queue. 200 workers each finish 20 jobs a second, 4,000 in all, comfortably above the other sellers’ 1,500. Capacity decides whether anyone suffers; fairness decides who.

          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

            “A seller’s “Export all orders” fans out into 2 million jobs on your shared queue. How do you schedule background work?”

            200 workers finish 4,000 jobs a second; the other sellers need 1,500.

            Your move. Pick an approach:

          2. Deep dive 2 of 4

            Interviewer

            “A tenant may send 100 report requests a second, each taking 50 ms. Then the database slows. What protects your threads and connections?”

            Your move. Pick an approach:

          3. Deep dive 3 of 4

            Interviewer

            “Mid-sale, a zone is lost and the system is over capacity. Requests keep coming. What do you drop first?”

            Your move. Pick an approach:

          4. Deep dive 4 of 4

            Interviewer

            “An enterprise tenant is a fifth of its shard’s load. Its limits fire every day, though it pays well. What do you do?”

            Your move. Pick an approach: