A queue buffers work between independent rates#
Producers append jobs; consumers receive, process, and acknowledge them. The queue holds durable work according to its retention policy and exposes backlog when production temporarily exceeds processing.
Size workers and measure a spike
10,000 / 100 = 100 workersIf ingress spikes to 25,000/sec while processing remains 10,000/sec, backlog grows by about 15,000 jobs every second. A queue absorbs the burst only until storage, retention, or latency becomes unacceptable.
Track queue depth, oldest-message age, attempt count, processing latency, errors, and worker saturation. Scale from processing cost and backlog age - not depth alone.
- Assuming a queue fixes sustained overload.
- Deleting before side effects succeed.
- Ignoring duplicate delivery and poison jobs.
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- Amazon SQS visibility timeoutAWS Documentation
- RabbitMQ reliability guideRabbitMQ Documentation