Skip to main content
Calcimator

MQTT Broker Sizing Calculator

Broker capacity from topic count and message rate.

About this calculator

This calculator estimates the compute, memory, and bandwidth an MQTT broker needs to sustain your workload. Ingest throughput is simply connected clients times messages-per-minute-per-client, converted to messages per second. Bandwidth then layers on protocol overhead — roughly 25 bytes of MQTT framing plus a 29-byte TLS record header per message — and applies a QoS multiplier: QoS 0 (fire-and-forget) counts once, QoS 1 (at-least-once) doubles traffic for the PUBACK round trip, and QoS 2 (exactly-once) quadruples it for the PUBREC/PUBREL/PUBCOMP handshake. Delivery throughput (as opposed to ingest) accounts for fan-out: the calculator estimates an average subscriber count per published message from total subscriptions divided by topic count, capped at the total client count, since a message can't fan out to more clients than exist.

RAM is estimated from roughly 3 KB per persistent session, 64 bytes per subscription entry, retained-message storage, and — for QoS 1/2 — a 5-second in-flight message buffer. Recommended CPU cores assumes a well-tuned broker can push about 50,000 delivered messages per second per core, which is a reasonable ballpark for modern brokers like EMQX or VerneMQ but varies with hardware, TLS termination overhead, and persistence settings. Because fan-out is an average derived from subscription density rather than your actual topic-to-subscriber mapping, a workload with a few very "hot" topics will see real broker load spike well above what this estimate predicts.

Inputs

Results

Ingest msg/sec

166.67

Delivery msg/sec1,667
Bandwidth (Mbps)0.49
Est. RAM (MB)33
CPU cores needed1
Avg fan-out ratio10
How to Use This Calculator
  1. Enter the number of concurrent MQTT client connections (devices + apps).
  2. Set the average publish rate per client (messages/min) and payload size in bytes.
  3. Enter the number of unique topics and average subscriptions per client.
  4. Select QoS level (0, 1, or 2) and enter the number of retained messages.
  5. Review Ingest msg/sec, Estimated RAM (MB), and CPU cores needed to right-size your broker.

How the result changes with Connected clients

Connected clientsIngest msg/sec
5,00083.33
7,500125
15,000250
25,000416.67

What each input means

Connected clients
Number of concurrent MQTT client connections (devices + apps).
Messages/min/client
Average publish rate per client per minute.
Avg payload (bytes)
Average MQTT message payload size in bytes.
Unique topics
Total unique MQTT topics in the topic tree.
Subscriptions/client
Average number of topic subscriptions per client.
QoS level (0/1/2)
MQTT QoS: 0 = fire-and-forget, 1 = at-least-once, 2 = exactly-once.
Retained messages
Number of retained messages stored on the broker.

What each result means

Ingest msg/sec
Total messages per second arriving at the broker.
Delivery msg/sec
Total messages per second delivered (including fan-out to subscribers).
Bandwidth (Mbps)
Network bandwidth needed for all MQTT traffic (both directions).
Est. RAM (MB)
Estimated broker RAM for sessions, subscriptions, retained msgs, and QoS queues.
CPU cores needed
Recommended CPU cores (~50K delivery msg/sec per core).
Avg fan-out ratio
Average number of subscribers receiving each published message.

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    4 parameters
    Connected clients = 10000, Messages/min/client = 1, Avg payload (bytes) = 128, Unique topics = 5000 = 7 input(s) provided
  2. Calculate Ingest msg/sec
    Ingest msg/sec = (connectedClients * msgPerMinPerClient) / 60
    166.67 = 166.67
  3. Calculate Delivery msg/sec
    Delivery msg/sec = totalMsgPerSec * min(avgFanOut, connectedClients)
    1667 = 1667
  4. Calculate Bandwidth
    Bandwidth = (bandwidthBytesPerSec * 8) / (1000 * 1000)
    0.49 = 0.49

Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Why does moving from QoS 0 to QoS 2 quadruple my bandwidth instead of just adding acknowledgments?

QoS 0 (fire-and-forget) counts each publish once. QoS 1 (at-least-once) doubles effective traffic because every publish requires a PUBACK response. QoS 2 (exactly-once) quadruples it because it needs the full four-message handshake — PUBLISH, PUBREC, PUBREL, PUBCOMP — to guarantee exactly-once delivery. The calculator applies this multiplier directly to your ingest rate before computing bandwidth.

How is average fan-out calculated, and why is it capped at the connected client count?

Fan-out is estimated as total subscriptions (clients times average subscriptions per client) divided by topic count — essentially, how many subscribers on average share each topic. It's capped at the total client count because a single published message can never physically be delivered to more clients than exist in the deployment, no matter how the subscription math works out.

What's included in the per-message overhead the calculator adds to my payload?

Every message gets roughly 25 bytes of MQTT framing (fixed header, topic name, and packet ID) plus a 29-byte TLS record header, for about 54 bytes of overhead on top of your stated average payload. On a deployment with many small payloads, like a 4-byte temperature reading, this overhead can dominate total bandwidth rather than being a rounding error.

Why might my real broker need more CPU cores than recommended here?

The 50,000-delivered-messages-per-second-per-core benchmark assumes a well-tuned broker like EMQX or VerneMQ under typical conditions. Real throughput varies with hardware, whether TLS termination happens on the broker itself, and persistence settings — a broker doing heavy disk-backed QoS 1/2 persistence or terminating TLS in software will need more cores than this estimate suggests.

Why does the RAM estimate include a QoS message buffer only for QoS 1 and 2?

QoS 0 messages are fire-and-forget with no retry, so the broker doesn't need to hold them in memory after delivery. QoS 1 and 2 require store-and-forward semantics to guarantee delivery, so the calculator adds a buffer sized for roughly 5 seconds of in-flight messages at your effective message rate and payload size — this buffer is skipped entirely when QoS is set to 0.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Technology & Computing.