Bulkheads
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.

    How fast does one slow dependency fill a 200-thread pool?

      How many permits does the recommendations bulkhead need?

        How much capacity do three compartments leave idle?

          Build-up · 5 steps

          Sink a shared pool, then wall it off

          One food-delivery pod at dinner peak, before and after bulkheads. The thread count never changes; only how much one dependency may hold.

          Step 1 of 5

          A healthy dinner peak

          One pod has 200 worker threads, shared by every endpoint. By Little’s Law, threads in use = rate × latency, so home feed holds 18, the menu 6 and checkout 16.

          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 payments through a blocking HTTP client you don’t fully trust, and must answer within 1.5 s. How do you isolate it?”

            Your move. Pick an approach:

          2. Deep dive 2 of 4

            Interviewer

            “The nightly report has its own thread pool, yet checkout still stalls whenever the report runs. What do you change?”

            Your move. Pick an approach:

          3. Deep dive 3 of 4

            Interviewer

            “At dinner peak a crawler floods your API, and checkout requests wait behind it in the same queue. How do you protect checkout?”

            Your move. Pick an approach:

          4. Deep dive 4 of 4

            Interviewer

            “50 order-api pods call payments through Envoy sidecars. How do you set each sidecar’s max_requests for payments?”

            Your move. Pick an approach: