Busy front end
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.

    How many uploads a second fill an 8-vCPU pod?

      When do long exports exhaust a 200-thread pool?

        How much memory do in-flight 400 MB exports hold?

          How many worker vCPUs for 20 uploads a second?

            Build-up · 6 steps

            Move the photo work off the request path

            One upload endpoint from busy to fixed. Each step moves a piece of work away from the pods that serve login, and says what it costs.

            Step 1 of 6

            Resize in the handler

            The handler decodes a 12-megapixel photo and writes three sizes, 400 ms of CPU on the pods that serve login. Twenty a second need 138% of them.

            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

              “Login p99 triples during the 11 am menu-photo rush. Ops proposes doubling the web pods. What do you do?”

              Your move. Pick an approach:

            2. Deep dive 2 of 4

              Interviewer

              “A GST report takes 90 seconds to build. The team moves it into a function behind API Gateway. Done?”

              Your move. Pick an approach:

            3. Deep dive 3 of 4

              Interviewer

              “Sellers post 50 MB catalogues to a Node.js import endpoint, and p99 jumps on every route at once. What do you change?”

              Your move. Pick an approach:

            4. Deep dive 4 of 4

              Interviewer

              “Login hashes passwords with scrypt, slow on purpose. Should that move to a queue too?”

              Your move. Pick an approach: