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
- Draw the path of one job from intake to settlement, and name the part that owns each change of state.
- Assign a failure policy (acknowledge, retry, or dead-letter) to each job class, and justify it by the error cost.
- Design an idempotent handler for at-least-once delivery, and name the stored state that makes a second delivery safe.
- Calculate the visibility timeout and the claim ceiling from the worst-case job time.
- Explain why a consumer that cannot work must not poll, and name the metric that a receive destroys.
- 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.
- Design a rate limit for each host with a minimum delay, a concurrency cap, and a back-off.
- List the traffic patterns that each design decision shows to a site.
lessons
0 of 7 published
a dim title is not yet published
- L01 from a script to a system (not yet published)
- L02 queue design: job classes, delivery, and failure policy (not yet published)
- L03 the worker loop: slots, heartbeats, ceilings, and hand-back (not yet published)
- L04 the scheduler: ticks, budgets, cadences, and dedupe (not yet published)
- L05 load on the target: rate limits, crawl delay, and back-off (not yet published)
- L06 the job ledger, the outbox, and settlement (not yet published)
- L07 a load test of a collection system (not yet published)