Skip to main content

Dev & engineering · free calculator

Queue throughput capacity calculator

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

Workers needed

Show the work

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

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:

  • Per-worker at 100%: 5.56 msg/sec
  • Per-worker at 70%: 3.89 msg/sec
  • Workers needed: 65 for steady-state at peak

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

  • Burstiness: peak msg/sec is the WRONG number if peaks are bursty. Use 99th percentile of 5-minute averages, not absolute peak.
  • Worker startup time: autoscaling reactive; if workers take 90s to start, peak is over before scaling helps. Pre-warm or scale on lagging indicator (queue depth).
  • Message size: large messages pull through bandwidth, not just CPU. Verify network throughput.
  • Dependency latency: if processing calls a 200ms downstream API, the bottleneck is the API, not your workers.

Autoscaling triggers

  • Queue depth > N: scale up. Threshold = (workers × N seconds) — protects against backlog growth
  • Avg latency > 2x normal: scale up immediately
  • Queue depth = 0 for 10 minutes: scale down to floor

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

Export

CSVPrintable PDFEmbedNot sure which calc you need? Ask →

Related calculators

Keep the math moving