skip to content

part 7 · sources checked 2026-11-20

collection architecture: queues, workers, schedulers, idempotent jobs

This module shows how a collection system turns a request into work that survives a crash, a second delivery, and a slow site.

purpose

A long job cannot run inside its request, thus a queue, a worker loop (the process that runs the jobs), and a scheduler take it. Each of them can fail, deliver a message two times, or put too much load on a site.

With a failure policy for each job class and timers that fit the worst-case job, the system stays correct and polite to each target. You can then say what each design choice costs and what it shows to a site.

objectives

  1. Draw the path of one job from intake to settlement, and name the part that owns each change of state.
  2. Assign a failure policy (acknowledge, retry, or dead-letter) to each job class, and justify it by the error cost.
  3. Design an idempotent handler for at-least-once delivery, and name the stored state that makes a second delivery safe.
  4. Calculate the visibility timeout and the claim ceiling from the worst-case job time.
  5. Explain why a consumer that cannot work must not poll, and name the metric that a receive destroys.
  6. Design a scheduler tick with a limit on each step and a dedupe set. Add a budget gate and a cadence that moves its clock first.
  7. Design a rate limit for each host with a minimum delay, a concurrency cap, and a back-off.
  8. List the traffic patterns that each design decision shows to a site.

lessons

0 of 7 published

a dim title is not yet published

  1. L01 from a script to a system (not yet published)
  2. L02 queue design: job classes, delivery, and failure policy (not yet published)
  3. L03 the worker loop: slots, heartbeats, ceilings, and hand-back (not yet published)
  4. L04 the scheduler: ticks, budgets, cadences, and dedupe (not yet published)
  5. L05 load on the target: rate limits, crawl delay, and back-off (not yet published)
  6. L06 the job ledger, the outbox, and settlement (not yet published)
  7. L07 a load test of a collection system (not yet published)