IoT and Embedded Development

Cloud-Managed vs Self-Hosted MQTT Broker: Which Is Right for Your IoT Architecture?

Bilal Azhar
Bilal Azhar September 4, 2026 - 8 mins read
Cloud-Managed vs Self-Hosted MQTT Broker: Which Is Right for Your IoT Architecture?

Every IoT deployment needs a message broker sitting between devices and applications. For most, that means an MQTT broker.

The protocol choice is usually settled quickly. The harder decision is who actually runs the broker itself.

Cloud-managed and self-hosted brokers solve the same problem differently. Each comes with real tradeoffs in cost, control, and operational burden.

Neither option is objectively better across every deployment. The right pick depends heavily on scale, team size, and how much infrastructure work a team wants to own.

What Is an MQTT Broker?

An MQTT broker is the server that routes messages between IoT devices and the applications that consume them. Devices publish messages; the broker delivers them to subscribers.

That publish-subscribe pattern is what makes MQTT lightweight. Devices never need to know who else is listening, only what topic to publish to.

Without a broker, every device would need a direct connection to every other system. That approach falls apart fast past a handful of devices.

The broker itself becomes a critical piece of infrastructure. If it goes down, every connected device loses its way to communicate.

What Makes the MQTT Protocol Different

The MQTT protocol was built for constrained devices on unreliable networks. That origin still shapes every design decision in the spec today.

Publish-Subscribe vs Request-Response

A request-response protocol, like HTTP, needs both sides online and connected at the same moment. MQTT does not share that requirement.

A device can publish a message and disconnect immediately after. The broker holds the topic open, ready for whoever subscribes next.

That decoupling is what makes MQTT forgiving of the patchy connectivity common in real IoT deployments. Devices reconnect on their own schedule.

Why MQTT Won Out for Constrained Devices

MQTT’s message headers are tiny compared to heavier protocols. That matters enormously on a battery-powered sensor with limited bandwidth.

The OASIS MQTT Version 5.0 standard formalizes this lightweight design, including the quality-of-service levels that govern delivery guarantees.

Reading the spec directly, rather than relying on vendor summaries alone, catches real edge cases. Documentation sometimes simplifies details that matter under load.

AWS IoT Core: A Cloud-Managed Broker Example

AWS IoT Core is one of the most widely deployed cloud-managed brokers in production today. It handles connections, authentication, and message routing as a fully managed service.

How AWS IoT Core Handles Device Identity and Rules

Every device connecting to AWS IoT Core authenticates with its own certificate. That per-device identity makes revoking a single compromised device simple.

Rules within the service route incoming messages to storage, analytics, or other AWS services automatically. No separate integration layer needs to be built and maintained.

That built-in routing removes a meaningful chunk of custom integration work. Teams can focus on the application layer instead of message plumbing.

Case Study: Running 200,000+ Devices on AWS IoT Core

DPL’s smart community platform for iApartments connects more than 200,000 IoT devices through AWS IoT Core across residential properties.

That platform ingests continuous sensor data at scale. Keeping per-device cost predictable matters enormously once a fleet reaches six figures like that.

The result was over 552,000 maintenance manhours saved annually. A managed broker at that scale removed operational weight the team would otherwise carry alone.

Cost modeling still matters even with a managed broker handling the heavy lifting. Pricing that scales cleanly at a hundred devices can look very different at two hundred thousand.

That difference is exactly why a cost projection belongs in the plan early. Running the numbers at expected scale, not pilot scale, avoids an unpleasant surprise later.

IoT Gateway: Where Devices Meet the Broker

An IoT gateway sits between constrained field devices and the broker itself. It translates protocols and aggregates traffic before any of it reaches the cloud.

Protocol Translation at the Gateway Layer

Not every sensor speaks MQTT natively. Older industrial equipment often speaks Modbus or a proprietary protocol the broker was never designed to understand.

A gateway translates that traffic into MQTT before it reaches the broker. Firmware development work often includes exactly this translation layer.

Getting that translation right the first time avoids a costly hardware retrofit later on. Protocol mismatches are far cheaper to catch during the design phase than after full deployment.

Buffering messages locally when the network drops is another gateway responsibility worth planning for early. A gateway that simply discards data during an outage creates gaps nobody can recover later.

Choosing gateway hardware with enough onboard storage for that buffering matters more than most teams expect going in. Running out of local storage during a long outage turns a temporary problem into permanent data loss.

Sizing that onboard storage against realistic outage durations, not best-case assumptions, avoids this particular failure mode entirely. A rural or industrial site should reasonably assume much longer outages than a typical office building nearby ever would.

Case Study: RFID and Gateway Design at a Border Terminal

DPL’s terminal operating system built for National Logistics Corporation relies on RFID readers feeding gateway hardware at border crossing points.

That environment has no tolerance for a dropped shipment record. Gateway design there had to account for intermittent connectivity and fully offline operation.

Aggregating readings at the gateway before forwarding them reduced the message volume reaching the broker considerably. Fewer, richer messages beat a flood of small, noisy ones.

IoT Cloud Platform: The Broker Is One Piece

An IoT cloud platform bundles the broker together with storage, analytics, and device management into one coherent system. The broker alone is rarely the whole story.

Where the Broker Fits Alongside Storage and Analytics

Messages arriving at the broker still need somewhere to land. Time-series storage, dashboards, and alerting all sit downstream of that first hop.

Treating the broker as an isolated component misses how tightly these pieces depend on each other in practice. Latency anywhere in that chain shows up to the end user.

Case Study: Smart Workforce Tracking at Scale

DPL’s workforce tracking platform for National Janitorial Solutions tracks more than 50,000 workers across 18,000 locations using indoor positioning data.

That platform depends on a broker that can absorb bursty location updates from thousands of badges. Peak shift changes push that burst higher than any average load estimate.

Building the full platform around the broker, rather than bolting analytics on afterward, kept latency low. That held true even as the deployment grew well past its original scope.

Designing for peak load rather than average load from the outset avoided a painful redesign later. Average-case planning is a common trap in workforce-scale deployments like this one.

IoT Protocols Beyond MQTT

IoT protocols beyond MQTT still matter, because not every device or network fits MQTT’s assumptions cleanly.

CoAP and HTTP for Different Constraints

CoAP was designed for similarly constrained devices but over UDP rather than TCP, which suits certain lossy network conditions better.

HTTP remains common for devices that already have ample bandwidth and do not need MQTT’s persistent connection model. Simplicity sometimes wins outright.

Choosing Based on Device and Network Reality

The right protocol depends on the actual device and network, not a default preference. A cellular sensor with patchy coverage has different needs than a wired gateway.

Security requirements factor into that choice too. Devices transmitting sensitive require stronger measures for securing IoT such as robust authentication, encryption, and certificate-based identity. On the other hand, constrained devices may need a lighter security model that does not overwhelm limited CPU, memory, or battery resources.

Mixing protocols within one deployment is normal. A gateway that speaks MQTT upstream and something else downstream is a common, sensible pattern.

Documenting exactly which protocol runs where helps future engineers debug faster. A tangled mix of protocols with no map slows down every incident response later on.

Cloud-Managed or Self-Hosted: Making the Call

There is no universally right answer between cloud-managed and self-hosted brokers. The right call depends on scale, expertise, and operational appetite.

Most teams land on a cloud-managed broker early. They reconsider self-hosting only once volume and cost pressure both justify making the switch.

That order rarely reverses once a team has committed. Revisiting the decision periodically, rather than treating it as permanent, keeps the architecture honest over time.

What fit a year ago may no longer fit today as device counts and traffic patterns shift. Scheduling a yearly architecture review catches that drift before it becomes expensive.

Eclipse Foundation’s IoT and Embedded Developer Survey shows MQTT remains the dominant messaging protocol across IoT and industrial deployments.

That dominance means the broker decision, not the protocol decision, is usually where teams get stuck. Both paths use the same protocol underneath.

Picking the Broker That Fits Your Fleet

Choosing an MQTT broker is less about the protocol and more about who owns the operational weight of running it.

Cloud-managed brokers trade cost predictability at scale for speed and simplicity early on. Self-hosted brokers trade setup effort for long-term control.

Neither choice is permanent, but switching later costs real time. Getting the initial call right saves that cost down the road.

If you are architecting an IoT deployment and weighing this decision, DPL’s IoT development team can help. We have run both models at real device scale.

Bilal Azhar
Bilal Azhar

An embedded systems and hardware engineer focused on product development, 4 years of experience working across IoT, consumer electronics, and embedded Linux.

×