MQTT vs HTTP for Telemetry: How IoT System Development Cuts Over
Moving telemetry from HTTP polling to MQTT is a protocol change with operational consequences. This article explains how to judge the trade-off and migrate a live fleet without stopping the equipment that depends on it.
MQTT usually wins for device telemetry because it keeps a persistent connection and pushes data only when something changes, while HTTP suits infrequent, request-response exchanges. Before commissioning any IoT system development, judge three things: how often each device reports, whether the network is metered or intermittent, and whether the old and new paths can run side by side during cut-over.
What is MQTT and why is it used for IoT telemetry?
MQTT is a publish-subscribe messaging protocol that keeps a lightweight connection open between each device and a broker, so a sensor can send a reading the moment it changes instead of waiting to be asked.
The consequence is lower overhead per message and faster delivery. A device that reports every few seconds over HTTP opens a new request each time, carrying headers and handshake cost; over MQTT it publishes a small payload on an existing session. If a device reports more than a few times an hour, the per-message overhead of HTTP becomes the dominant cost, in both data volume and battery draw.
HTTP remains the better choice when a device reports rarely, when the payload is large, or when the receiving system is a conventional web API that already handles authentication and retries. The protocol is not a badge of modernity; it is a fit between reporting frequency and network conditions.
For readers scoping a first project, our overview of IoT system development sets out the components — devices, gateway, broker, storage, dashboard — and which of them you actually need to own.
How do you compare MQTT versus HTTP telemetry for a real fleet?
Compare the two protocols on the cost of a wrong answer, not on benchmark throughput, because the operational differences show up in reconnection behaviour and in what happens to a reading when the link drops.
| Criterion | HTTP telemetry | MQTT telemetry |
|---|---|---|
| Connection model | New request per message; stateless | Persistent session to a broker; stateful |
| Typical fit | Infrequent reports, large payloads, existing web APIs | Frequent small readings, many devices, metered links |
| Behaviour on network loss | Request fails; device retries on next cycle | Broker detects drop; queued messages can be delivered on reconnect |
| Delivery guarantee | Whatever the device and server implement | Quality-of-service levels chosen per topic |
| Firewall and proxy tolerance | Usually passes unchanged | Needs outbound port 8883 or a WebSocket fallback |
| Debugging | Readable with ordinary web tools | Needs broker logs and topic inspection |
| Firmware complexity | Lower; standard client libraries | Higher; session handling and reconnect logic |
The table hides the decisive question: what should the system do when a message is lost? For a cold-storage temperature log, a gap matters because a regulator or a customer may ask what the temperature was during a delivery window. If a missing reading would be questioned by a customer or an auditor, choose the protocol whose delivery behaviour you can evidence, and record the choice in the device specification.
London food wholesalers often face exactly this: a buyer asks for temperature records covering a chilled delivery into a restaurant, and the answer has to come from stored readings rather than a phone call to the driver. The same logic applies to vehicle tracking and to plant equipment reporting into an industrial IoT solution for food wholesale, where the audit trail is part of the product.
How do you migrate from HTTP to MQTT without stopping operations?
Run both paths in parallel and switch devices in cohorts, so the old HTTP endpoint stays live until every device in a cohort has reported successfully over MQTT for an agreed period.
- Publish the same reading to both the existing HTTP endpoint and a new MQTT topic from a pilot group of devices, and compare the two records for a set number of days.
- Move the dashboard and any alerting rules to read from the new store, keeping the old store as a read-only fallback.
- Cut over one cohort at a time, starting with devices whose loss would be least disruptive, and define the evidence that closes each cohort.
- Retire the HTTP endpoint only after the last cohort has passed its observation window and the retained records satisfy your audit requirement.
The delivery team controls the broker, the storage schema and the dashboard; the client controls the maintenance window, the cohort order and who signs off each step. Do not retire the old endpoint until the new path has survived at least one full reporting cycle of the slowest device in the cohort, because a device that reports daily will not reveal a fault in an afternoon.
Firmware is the constraint most migrations underestimate. If devices in the field cannot be updated remotely, the protocol switch has to be handled at the gateway, which translates between the device's existing HTTP calls and the new broker. Our teams treat firmware update strategy as part of the migration plan rather than a later task, because a device you cannot reach is a device you cannot move.
How do you handle devices that lose connectivity?
Design for loss rather than treating it as an exception: each device should buffer readings locally, reconnect with backoff, and mark gaps explicitly so the dashboard shows missing data instead of interpolating it.
With MQTT, a persistent session and a chosen quality-of-service level let the broker hold messages for a device that drops and deliver them on reconnect, within the limits you configure. With HTTP, the device itself must store unsent readings and replay them. Either way, the device needs enough local storage for the longest outage you are willing to accept, and that figure depends on reporting frequency and storage size, not on a universal rule.
For a London fleet, intermittent coverage in tunnels and basements is normal, so the reconnect policy should be tested against those conditions rather than an office Wi-Fi network. A device that loses connectivity should also be visible as a device-level alert, not only as a gap in a chart.
What should an IoT dashboard show during and after a migration?
An IoT dashboard should show the state of the fleet before it shows the state of the process: which devices are reporting, which are silent, and which are still on the old path.
During a migration, add a column or filter for protocol version so an operator can see the proportion of the fleet that has moved. After cut-over, keep a data-quality view that counts missing readings per device per day. If the dashboard cannot distinguish a silent device from a device reporting a normal value, the migration is not finished, because the operator will trust a blank panel as good news.
Dashboard design is where device fleet management becomes visible to the business. A cold-chain supervisor in London needs to see which chillers are out of range now, and a finance manager needs a monthly exception count; those are two views of the same data, not two systems.
How much does an IoT system cost to build?
Cost is driven by the number of device types, the firmware work required, and the audit and reporting obligations attached to the data, not by the protocol choice alone.
A migration from HTTP to MQTT on devices you can already update remotely is a bounded piece of work: broker setup, storage schema, dashboard changes and a cohort plan. The same migration on devices that need a site visit to reflash is dominated by field labour. If more than a small fraction of the fleet cannot be updated remotely, budget for the field visits before you budget for software.
We deliver custom software, business systems, mobile apps, websites, IoT systems and AI applications from Chengdu, and for a London deployment the practical questions are time zone, on-site support and who holds the device credentials. Our London delivery notes cover how those are usually split.
Frequently asked questions
What is IoT development and what does it involve?
IoT development covers the device firmware or gateway that captures readings, the messaging and storage layer that receives them, and the dashboard and alerts that make them usable. It also includes provisioning, credential management and a plan for devices that lose connectivity. A project can start with one device type and one dashboard rather than a full platform.
How much does an IoT system cost to build?
Cost depends on how many device types you have, whether firmware can be updated remotely, and what reporting or audit obligations apply to the data. A single-site pilot with off-the-shelf sensors is a much smaller scope than a multi-site fleet with regulated records. Ask for the cost broken down by device work, platform work and field work so you can see which part drives the total.
How do you handle devices that lose connectivity?
Each device should buffer readings locally, reconnect with backoff, and mark gaps explicitly so the dashboard shows missing data rather than filling it in. With MQTT, a persistent session can hold messages for a device that drops; with HTTP, the device must store and replay unsent readings itself. The buffer size should match the longest outage you are prepared to accept.
What is MQTT and why is it used for IoT?
MQTT is a publish-subscribe protocol that keeps a lightweight connection open between a device and a broker, so readings are pushed when they change. It is used in IoT because it reduces per-message overhead and handles intermittent links better than repeated HTTP requests. It is not automatically better for devices that report rarely or send large payloads.
Can we migrate from HTTP to MQTT without stopping operations?
Yes, if devices publish to both the old endpoint and the new broker during a parallel period, and cohorts are switched one at a time. The old endpoint stays live until every device in a cohort has reported successfully over the new path for an agreed observation window. Devices that cannot be updated remotely need a gateway translation layer or a planned site visit.
Questions we are asked
What is IoT development and what does it involve?
IoT development covers the device firmware or gateway that captures readings, the messaging and storage layer that receives them, and the dashboard and alerts that make them usable. It also includes provisioning, credential management and a plan for devices that lose connectivity. A project can start with one device type and one dashboard rather than a full platform.
How much does an IoT system cost to build?
Cost depends on how many device types you have, whether firmware can be updated remotely, and what reporting or audit obligations apply to the data. A single-site pilot with off-the-shelf sensors is a much smaller scope than a multi-site fleet with regulated records. Ask for the cost broken down by device work, platform work and field work so you can see which part drives the total.
How do you handle devices that lose connectivity?
Each device should buffer readings locally, reconnect with backoff, and mark gaps explicitly so the dashboard shows missing data rather than filling it in. With MQTT, a persistent session can hold messages for a device that drops; with HTTP, the device must store and replay unsent readings itself. The buffer size should match the longest outage you are prepared to accept.
What is MQTT and why is it used for IoT?
MQTT is a publish-subscribe protocol that keeps a lightweight connection open between a device and a broker, so readings are pushed when they change. It is used in IoT because it reduces per-message overhead and handles intermittent links better than repeated HTTP requests. It is not automatically better for devices that report rarely or send large payloads.
Can we migrate from HTTP to MQTT without stopping operations?
Yes, if devices publish to both the old endpoint and the new broker during a parallel period, and cohorts are switched one at a time. The old endpoint stays live until every device in a cohort has reported successfully over the new path for an agreed observation window. Devices that cannot be updated remotely need a gateway translation layer or a planned site visit.
