NATS Throughput Calculator

July 31, 2026

HomeServerBlog messaging capacity tool

NATS Throughput Calculator

Estimate Core NATS broker traffic, JetStream write amplification, pending message memory, and the minimum replica-aware cluster shape for request reply, fanout, telemetry, and durable streams.

▣ NATS workload presets
⚙ Throughput inputs
Publish rate before fanout, burst multiplier, and JetStream writes.
Adds stream write load, ack traffic, storage pressure, and replica requirements.
Application payload only; the calculator adds protocol and subject overhead.
More subjects add routing metadata and can increase wildcard fanout planning work.
Average delivery fanout. Queue groups usually count as one delivery per message.
Acks and redeliveries are modeled as lightweight control messages.
JetStream file writes and quorum planning scale with replica count.
Consumer or connection backlog used to estimate memory pressure.
Memory mode makes writes fast but keeps retained stream bytes in RAM.
Capacity headroom for reconnect storms, cron bursts, or telemetry spikes.
Broker throughput
0 MB/s
Core delivery traffic
Publish plus fanout bytes after burst headroom.
JetStream write load
0 MB/s
replicated stream writes
Only applies when JetStream is enabled.
Pending memory
0 MB
queue and consumer backlog
Includes message envelope overhead and subscriber fanout.
Replicas needed
1
minimum server nodes
Quorum and capacity estimate for the selected factor.
Effective burst message rate0 msg/sec
Modeled wire bytes per message0 B
Subject routing overhead0%
Delivery fanout multiplier0x
Ack and redelivery traffic0 MB/sec
Storage pressure modeFile
Per replica write rate0 MB/sec
Planning verdictBalanced
Enter your NATS workload to estimate broker, JetStream, pending, and replica pressure.
▦ Live sizing signals
0 MB/s Publish ingress

Raw producer side traffic before subscriber fanout and acknowledgments.

0 MB/s Consumer egress

Modeled delivery traffic across normal subscribers and queue consumers.

0/sec Ack control rate

JetStream consumer acks, batch acks, and redelivery margin if selected.

1 node Cluster floor

Minimum useful server count from replica quorum plus throughput spread.

⇄ NATS spec comparison grid

Core NATS publish

At most once

Fast transient messaging. Broker load is mostly publish ingress plus subscriber delivery fanout.

JetStream stream

Persisted log

Adds write load, consumer state, acks, and storage limits for durable delivery patterns.

Replication factor

R3 quorum

Replicated streams multiply write bytes and need enough servers to hold healthy copies.

Pending backlog

50k msgs

Slow consumers, large payloads, and high fanout turn pending limits into memory planning.

📘 Reference tables
Workload patternTypical NATS modeMain sizing driverCalculator field to watch
Request reply APICore NATS inbox repliesShort payloads and round-trip concurrencyMessage rate, subscribers, burst multiplier
Telemetry fan-inCore or JetStream subject hierarchySubject count and bursty device publishingSubject count, payload bytes, storage mode
Work queueJetStream durable or queue consumerAcks, pending queue depth, redeliveriesAck policy, max pending messages, replicas
Audit streamJetStream file storageWrite bandwidth and retained storage pressureJetStream enabled, replication factor, file storage
Ack policyModeled control trafficBest useThroughput note
No acknowledgments0 extra ack messagesCore NATS transient fanout or fire-and-forget telemetryLowest broker chatter but no durable consumer confirmation
Explicit consumer ackOne ack per delivered JetStream messageDurable workers, audit readers, and at-least-once processingControl traffic rises with consumer delivery count
Ack all batch policyAbout one ack per ten delivered messagesBatch processors that can confirm ordered progressLower ack rate but failure scope covers more messages
Explicit ack with redelivery marginExplicit acks plus redelivery reserveSlow or unreliable workers where NAK and timeout traffic appearsAdds headroom for retries and queue churn
Storage modeWrite behaviorMemory impactHome lab planning note
Core onlyNo persisted stream writePending buffers and client connections dominateGood for service discovery, RPC, and ephemeral events
JetStream memory storageWrites retained in memoryHighest RAM pressure for retained messagesFast but risky on small nodes if payloads are large
JetStream file storageWrites land on disk for each replicaModerate RAM for cache and pending stateWatch SSD write bandwidth and latency under bursts
File with memory cacheDisk persistence plus cache allowanceMiddle ground for read-heavy streamsUseful for dashboards and durable consumers replaying hot data
Cluster shapeReplica fitFault tolerance clueCalculator interpretation
Single nodeR1 onlyNo server fault toleranceFine for small labs and Core NATS experiments
Two nodesR1 or R2Limited quorum behavior for replicated streamsUse mostly for capacity split, not strong durability
Three nodesR3 sweet spotCan keep a majority when one node is downCommon minimum for durable JetStream planning
Five nodesR3 or R5More placement and failure headroomUseful when write load or tenant spread exceeds three nodes
⚠ NATS sizing tips
Tip: size against the burst path. NATS can move small messages very quickly, but reconnect storms, telemetry flushes, and worker catch-up windows are usually what expose disk, memory, or network limits.
Tip: separate fanout from persistence. Core delivery fanout stresses broker egress and slow-consumer buffers, while JetStream persistence stresses replica writes, storage latency, and consumer acknowledgment traffic.

There are three idle servers. There were good intentions. It is a home lab. NATS seem like just the right thing to handle sensor data, route events across containers and keep services talking with as little overhead of a full-fledged message queue. Everything works fine for weeks. You add JetStream to persist some audit logs.

Now one of your nodes are sweating. Disk IO spikes. Your pending memory metrics climbs into the red. More often than not, this isn’t because NATS has failed. It’s because once you’re dealing with replicated streams and durable storage, your throughput calculations changes from simple pub/sub patterns to something much more complexer.

How to Choose Server Size for NATS

Overhead fanout is something most folks grossly undervalue. If you publish one message and four subscribers consumes it, the broker has to write that payload four times to the network stack. Now put JetStream on top of that; those writes go back to disk again.

Plugging in your expected message rate into the calculator above spares you guessing at coefficients and what’s hiding behind bandwidth cost. It makes you consider distinction between total system load and ingress traffic. This is the Burst Multiplier.

The most critical input is rarely the base message rate. The message rate. Outages reconnect devices. Cron jobs flush logs. Concurrent user events fire. In the real world, there isn’t a flat line of telemetry. Size your cluster for an average and peaks will tear it down. Two or three is a healthy burst factor to plan for. This leaves room for the system to breathe when reality hits. People make this mistake: they optimize for steady state, ignoring the storm.

JetStream persistence adds another dimension: each message require a write to disk, in particular when using storage (of any sort). Assuming you are following the normal advice of running with R3 replication, then each write occur on three separate nodes, requiring a quorum. That’s effectively a tripled write requirement, so now you require three times as much throughput from your SSDs just for writes, in addition to whatever else you’re doing with it.

The calculator displays both of these figures. The broker traffic figure represent the original message load, and the extra write figure shows the increased stream write load due to JetStream persistence. To be clear, you still only write once per message; it’s that each one require a write to disk, plus however many more you want to set for replication. So you require sufficient SSD capacity not only to store data, but also to sustain some level of write bandwidth during write bursts, because they will occur.

The other side of memory is also tricky, specifically, pending messages. The pending queue holds all of your messages that are trying to get out, but aren’t yet because their consumer isn’t fast enough, or was disconnected for a while. Setting this one too high on a small server can cause you to swap memory to disk under load, which kills performance more quickly than most things I know of.

Setting reasonable pending limits makes consumers eat data at a rate they can handle. Memory pressure becomes design constraint instead of a runtime crash. That means that the smallest cluster you should make has a specific shape, as well. For example, in order to have an R3 replication factor, there must be at least three healthy nodes to give you quorum. The tool visualizes this and tells you minimum number of nodes needed for each replication strategy. That’s not just about redundancy; it’s about having the system continue to be available if a machine fails unexpectedly or needs to go down for maintenance.

The other thing that matters is what storage mode you pick. There’s fast but volatile memory storage. You lose it all if the power goes down, unless you’ve backed up elsewhere from the broker. And there’s durable file storage that requires careful consideration of how you plan based off disks. Then there are mixed modes which attempt to give you a bit of each world, with your hottest data cached in RAM and your history kept on disk. Every one of those changes the load profile.

The tool lays out the pros and cons nicely in its reference tables, you can then match your durability requirements to your hardware capabilities.

All in all, how much should you size a NATS cluster? It depends. You need to balance performance against safety. A big part of that equation is “headroom.” How many extra messages can you take without choking yourself by buying too little hardware? How many spikes do you expect? You don’t want to buy more than what you need, but you also don’t want to run out of capacity if there is a spike.

Persistence is another consideration; if something happens and the system needs to be restarted, how much of that persistence will survive? If you have too much persistence, you’ll choke the disk subsystem. If you have too little, you’ll lose some data. You want a system which feels like nothing, since it just works. So start conservatively (you can always add nodes later), get a reasonable burst factor, and then use those numbers to determine what kind of hardware to purchase.

The key is knowing your limits so that you would of recognized them when they are reached in production.

NATS Throughput Calculator

Related posts

Leave a Comment