CloudCostCompare
JA

このページはまだ日本語で提供されていないため、以下の本文は英語です。 英語のページを開く

ガイド

MQTT broker cost: managed IoT service or your own server

Rohit Athaide · 2026年11月4日 公開

Short answer: MQTT is the protocol most IoT devices use to publish readings. You can use a managed IoT gateway from a cloud, billed per message, or run a broker such as Mosquitto or EMQX on your own virtual machine, billed per hour. The managed gateway is cheaper at small scale. A self-run broker can win at very large message volumes, if you count the staff time honestly.

Key points

  • Managed gateways scale with traffic and cost little when quiet.
  • A broker on a VM costs the same at ten messages or ten million, until it runs out of capacity.
  • A self-run broker needs several servers, a load balancer, certificates and monitoring.
  • Cut messages before changing platform.
  • Break-even depends on message rate, message size and team cost.

What are the two billing shapes?

Option You pay for
Managed gateway (IoT Hub, IoT Core) Messages, connection time, and sometimes rules or device registry operations. See how IoT platform pricing works
Broker on a VM Server hours, disk, network and your time to run it

What does a self-run broker need?

  • Servers for availability, usually at least two in different zones.
  • A load balancer for device connections.
  • TLS certificates and device authentication.
  • Monitoring, patching and upgrades.
  • A plan for scaling and for losing a node.

These are the things a managed gateway includes. Count your time for them.

What does a worked example look like?

Made-up round numbers to show the method, not real prices. Devices send readings of 1 KB each.

Item Calculation (made up) Managed gateway Own broker (2 VMs + balancer)
100 devices, 1 message per 10 s 100 x 259,200 = 25.9 million messages 25.9 x 1.00 = 25.92 2 x 730 x 0.10 + 20 = 166 + staff
1,000 devices, 1 message per 10 s 259.2 million messages 259.20 166 + staff
10,000 devices, 1 message per 10 s 2.59 billion messages 2,592 about 330 (4 larger VMs) + staff
10,000 devices, 1 message per 60 s 432 million messages 432 about 330 + staff

Staff time: if the self-run option needs 0.2 of an engineer at 6,000 a month, add 1,200. Then at 1,000 devices the broker costs 1,366 against 259 and loses; at 10,000 devices every 10 seconds it costs about 1,530 against 2,592 and wins; but batching to one message per minute brings the managed bill down to 432, below the broker. Reporting interval and batching move the answer far more than the platform choice.

Where does the break-even tend to sit?

At small scale, the managed gateway is cheaper in money and staff time. At very large message volumes, per-message charges add up and a broker cluster can cost less in cloud bills, but needs engineers to run it. The break-even depends on message rate, message size and team cost, so work it out with your numbers.

Why cut the managed bill first?

Before you change platform, reduce messages: batch readings, send on change and lengthen intervals. See message size and batching. A tenfold cut in messages moves the break-even far out.

Which mistakes are common?

  • Comparing the broker VM price with the gateway price and ignoring staff time.
  • Running one broker node to save money, then losing data when it fails.
  • Sending every reading as its own message.
  • Not testing the broker with real connection counts.

Decision checklist

  • How many devices, how often, how large?
  • Can batching cut the message count?
  • Do we have staff to run a broker around the clock?
  • What does an hour of lost data cost?

Next steps

The Industry 4.0 estimator prices managed gateways for your device count and reporting interval on four clouds. Price a virtual machine of the right size from the VM compare page to set against it. For the two main gateways, see Azure IoT Hub vs AWS IoT Core.

Frequently asked questions

What is an MQTT broker?

The server that receives messages published by devices over the MQTT protocol and delivers them to subscribers. Managed IoT gateways include one, and you can also run your own such as Mosquitto or EMQX.

Is a self-hosted MQTT broker cheaper?

At very large message volumes the cloud bill can be lower, but you add servers for availability, load balancing, certificates, monitoring and staff time. At small scale the managed gateway is usually cheaper overall.

How many messages can one broker handle?

It depends on the broker, message size, connection count and machine size. Test with your own pattern before you rely on a figure.

How can I lower my managed IoT bill first?

Batch readings, send on change and lengthen reporting intervals. A tenfold cut in messages moves the break-even far out.

Which clouds charge per message?

Azure IoT Hub and AWS IoT Core bill by messages in size blocks, plus related charges. Oracle's IoT platform bills by compute hours. See the platform pricing guide.