Long-running jobs
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 · 9 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 workers for 0.5 exports a second, averaging 2 minutes?

      How much polling traffic do 30,000 open jobs cause?

        How fast does a 5-million-invoice export run as chunks?

          600 jobs are queued. How many slots drain them in 5 minutes?

            Build-up · 6 steps

            Follow one export through the job system

            The GST export from submit to download. Each step adds one piece, and says what it protects against.

            Step 1 of 6

            Accept in milliseconds

            The API validates, stores a job row keyed by the idempotency key and returns 202 with a status URL. A retried submit finds the same row.

            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

              “Exports can take 10 minutes, behind API Gateway’s 29-second limit. What does POST /exports do?”

              Your move. Pick an approach:

            2. Deep dive 2 of 4

              Interviewer

              “SQS hides a received message for 30 seconds by default, but exports take 10 minutes. How do you set the lease?”

              Your move. Pick an approach:

            3. Deep dive 3 of 4

              Interviewer

              “The 10-minute export crashes at 90%, and its retry starts again from zero. What do you add?”

              Your move. Pick an approach:

            4. Deep dive 4 of 4

              Interviewer

              “On deadline night, one seller submits 2,000 re-exports and everyone else’s report waits an hour. What do you change?”

              Your move. Pick an approach: