dev · 2026-05-01

Queue throughput capacity calculator

Project SQS / Kafka / RabbitMQ workers needed to handle a target throughput, given message processing time and worker count.

Workers needed
65

Inputs

Peak messages / second250
Avg processing time (ms)180
Target worker utilization %70%
Worker $/month$65

Supporting metrics

Monthly cost$4,225
Messages/worker/sec at target util3.9
Workers needed at 100% target45

About this calculator

Queue capacity — Little's Law applied

Workers handle messages serially in their main loop. Per-worker throughput = 1000 ms/sec ÷ avg processing time. Total throughput = workers × per-worker throughput. Reverse the equation to size your fleet.

The math

per-worker throughput at 100% util = 1000 ÷ avg ms per message
target throughput = 100% throughput × utilization target
workers needed = peak msg/sec ÷ target per-worker throughput

Default scenario: 250 msg/sec peak, 180ms avg, 70% target util:

Why 70% utilization, not 100%

Above 80% utilization, queues grow during normal variance (worker GC pauses, slow upstream, brief network blips). Above 90%, single-worker failure cascades to backlog. 70% target absorbs typical operational variance.

What this calc misses

Autoscaling triggers

Default: scale up at 100 messages/queue depth × current workers, scale down to 70% of peak after 30 minutes idle.

FAQ

What's a realistic worker utilization target?

60-75% for batch workloads. 50-65% for latency-sensitive. 80%+ only if you have aggressive autoscaling that adds capacity in <60 seconds. Above 80% sustained = fragile system.

Should I use one fat worker or many thin workers?

Many thin workers: better fault isolation (1 dies, others handle traffic), faster autoscaling, smaller blast radius. Single fat worker: simpler ops, lower per-instance overhead, less coordination cost. Default many-thin unless you have specific reason (GPU, large in-memory state) for fat.

How do I handle priority queues?

Two patterns: (1) separate queue per priority with dedicated worker pool, (2) single queue with priority field + workers that prefer high-priority. Pattern 1 is simpler, scales independently, easier to reason about. Pattern 2 is more efficient but harder to operate. Most teams pattern 1.