IoT Protocols Compared: A Modular Stack Guide (2026)
A sensor speaks Bluetooth Low Energy, the cloud dashboard speaks HTTP, the PLC next to it insists on OPC UA, and the battery node in the field can afford a few dozen bytes per day over LoRaWAN. Teams respond by hunting for one “best” protocol, and they lose months because no such protocol exists. The more useful move is to treat the IoT protocol stack as a set of layers and seams: each layer solves one problem, and each seam between layers is a contract you can renegotiate without rebuilding the rest.
This matters more in 2026 than it did three years ago. Matter reached 1.5 in November 2025, OPC UA is at specification 1.05.06, LwM2M has settled on 1.2.2, and MQTT 5 is now the default choice in most new broker deployments. Several of these are no longer single-layer protocols but vertical bundles that span radio, messaging, and data model. This guide compares them honestly, shows where each belongs, and ends with a decision matrix you can apply to your own constraints.
What this covers: the five layers and the three seams that matter, a verified protocol-by-protocol comparison (MQTT 5, CoAP, AMQP 1.0, OPC UA, DDS, Matter, LwM2M), byte-level overhead arithmetic, failure modes, security per layer, and a decision matrix.
Context and Background: Why “Which Protocol?” Is the Wrong First Question
The most common design mistake in IoT is asking which protocol to use before asking which layers you need and what constrains each one. MQTT, for example, lives at the messaging layer and assumes a working TCP connection beneath it. It says nothing about whether the radio is Wi-Fi, cellular, or Ethernet. Mixing those concerns produces systems where a radio decision made in year one quietly dictates the cloud bill in year three.
Networking solved this decades ago with layered models. The IETF extended the same thinking to tiny devices in RFC 7228, which defines constrained-node classes: Class 0 devices have well under 10 KiB of RAM and well under 100 KiB of flash, Class 1 devices have about 10 KiB and 100 KiB, and Class 2 devices about 50 KiB and 250 KiB. Class 1 devices are too small for a full HTTP and TLS stack but can speak CoAP over UDP as full IP peers; Class 2 devices can run most of what a laptop runs. Those three numbers do more to narrow your protocol options than any feature table, which is why this guide returns to them repeatedly. See the IETF RFC 7228 text for the definitions.
Modularity has a price. Every boundary adds a translation step, and translation costs latency, code, and places for bugs to hide. The alternative, a vertically welded stack, is what turns “just change the radio” into a six-month rewrite. The goal is therefore the fewest boundaries that still give you the freedom you need, not the maximum number of layers.
If you want a flat catalogue of what exists before going deeper, our companion piece on the major IoT protocols and how to choose is the map. This post is about how the pieces compose, and about the 2026 specifics: which versions are current, and which “protocols” have quietly become bundles.
The thesis: protocols are bundles, seams are the architecture
Most protocol guides list protocols as if they occupied one layer each. That model broke a while ago. Consider what you actually adopt when you say each of these names:
- MQTT is one messaging layer. It says nothing about payload meaning.
- Sparkplug is a convention on top of MQTT that defines a topic namespace, payload, and session state management.
- LwM2M is CoAP (or MQTT or HTTP in newer releases) plus an object model plus a device-management lifecycle.
- OPC UA is transport, security, session, services, and an information model in a single specification family.
- Matter is an application layer, a data model, a commissioning flow, and a security model that runs over IP networks such as Wi-Fi, Thread, and Ethernet.
So the better question is which seams you want to own. Three seams decide most outcomes: the IP seam (does the device speak IP end to end, or does a gateway translate?), the session seam (who holds conversational state: a broker, a resource server, or the device itself?), and the semantic seam (who defines what a number means?). Pick protocol bundles by which of those seams they close for you and which they leave open. The rest of this guide is organized around that lens.
The Five-Layer IoT Protocol Stack and Its Three Seams
An IoT protocol stack is five composable layers, link, network, transport, messaging, and semantic, where each layer hides its complexity behind a stable interface. The practical value is swapping one tier, such as the radio, without touching the others. Figure 1 shows the layers and where the common protocols sit.

Figure 1: The five-layer modular IoT protocol stack. Bundles such as Matter, LwM2M, and OPC UA span several rows.
Figure 1 reads bottom to top: radios and wires carry frames, the network layer gives devices addresses, the transport layer decides reliability and encryption, the messaging layer defines the interaction pattern, and the semantic layer gives the bytes meaning. A constrained sensor and an industrial gateway can share the upper two layers while diverging entirely below them. That shared upper portion is where your application logic and digital twin live, and keeping it stable across wildly different edge hardware is the whole point of the architecture.
Link layer: the hardest decision to reverse
The link layer covers how bits move across air or wire: short-range radios such as Bluetooth Low Energy and Zigbee, low-power wide-area options such as LoRaWAN and cellular NB-IoT or LTE-M, and high-throughput links such as Wi-Fi, Ethernet, and Time-Sensitive Networking (TSN) for deterministic industrial traffic. Three axes dominate the choice: range, throughput, and power budget.
This is the hardest layer to reverse, because it is welded to physical hardware. You cannot push a firmware update that turns a LoRaWAN node into a Wi-Fi node. The standard defence is to isolate the radio behind a gateway or an IP adaptation layer so the irreversible choice cannot leak upward. For radio-specific trade-offs, see our guides on LoRaWAN and Bluetooth Low Energy.
Network and transport layers: closing the IP seam
IEEE 802.15.4 radios carry frames of at most 127 bytes, while IPv6 requires links to carry packets of at least 1,280 bytes (RFC 8200). 6LoWPAN, defined in RFC 4944 with header compression in RFC 6282, bridges that gap through fragmentation and compression. Thread builds a self-healing IPv6 mesh on top of 802.15.4 and 6LoWPAN, and it is the transport Matter relies on for low-power devices. Thread 1.4, released in September 2024, added credential sharing across ecosystems so border routers from different vendors can join one mesh, and, as summarized in public reference material, new border routers can only be certified against 1.4 from 1 January 2026.
Running IPv6 to the device is the single most valuable seam you can close. It removes protocol-specific gateways, lets standard tooling reach the edge, and makes every upper-layer choice portable. The cost is adaptation-layer complexity and a modest overhead that header compression is designed to minimize. Our OpenThread border router deep dive covers the mesh mechanics.
The transport layer then decides how packets behave. TCP provides ordered, reliable, connection-oriented delivery and underpins MQTT, AMQP, OPC UA’s binary protocol, and HTTP. UDP is connectionless and light, the foundation under CoAP and most Matter traffic. DTLS adds encryption to UDP, with DTLS 1.3 specified in RFC 9147, and QUIC (RFC 9000) combines UDP with integrated TLS 1.3 and multiplexed streams. Transport choice cascades upward: pick UDP and CoAP follows; pick TCP and MQTT or HTTP become natural.
Messaging and semantic layers: where the interaction model is chosen
The messaging layer decides the interaction pattern: publish/subscribe (MQTT), request/response (CoAP, HTTP), brokered queues with settlement (AMQP 1.0), client/server with subscriptions plus a PubSub extension (OPC UA), or brokerless data-centric pub/sub (DDS). The semantic layer sits above and answers what a byte means: Sparkplug payload definitions, OPC UA information models, LwM2M objects, Matter clusters, and the serialization formats (JSON, CBOR, Protobuf) that carry them. A modular architecture lets you keep MQTT as the messaging layer while upgrading the payload from ad hoc JSON to Sparkplug B, a semantic change the transport beneath never notices.
IoT Protocols Compared: What Each One Actually Gives You
Choosing among IoT protocols is a constraint-satisfaction problem, not a popularity contest. Rank your hard constraints (memory, power, bandwidth, latency, topology, security), let the most binding one pick the layer it governs, and let the rest fall out. The decision tree in Figure 2 captures the messaging-layer logic most teams need.

Figure 2: A messaging-protocol decision tree. Start from the most binding constraint, not from a favorite.
The tree is deliberately short. It asks about device memory first because RAM and flash are the only constraints you cannot buy your way out of after shipping hardware. It then asks about topology, because a plant floor with typed machine models has different needs than a fleet of thermostats feeding a cloud. Everything that is simple, occasional, and firewall-friendly lands on HTTPS, which deserves more respect than it gets. The sections below explain the leaves.
MQTT 5: the default for many-to-many telemetry
MQTT was created in 1999 by Andy Stanford-Clark of IBM and Arlen Nipper to monitor oil pipelines over expensive satellite links, which explains its small footprint. Version 3.1.1 became an OASIS standard on 29 October 2014 and is standardized as ISO/IEC 20922:2016. Version 5.0 became an OASIS standard on 7 March 2019. Default ports are 1883 for plain TCP and 8883 for TLS.
MQTT 5 fixed the gaps that made 3.1.1 awkward at scale. The OASIS specification adds reason codes on acknowledgments (values at or above 0x80 signal failure), a Session Expiry Interval so you control how long session state persists after disconnect, shared subscriptions that deliver each message to only one client in a group, topic aliases that replace a long topic string with a short number, a Receive Maximum property that caps in-flight QoS 1 and QoS 2 messages (defaulting to 65,535 when absent), user properties for application metadata, Response Topic and Correlation Data for request/response over pub/sub, and an AUTH packet for challenge-response authentication.
Two of these change architecture rather than just tuning. Shared subscriptions turn a topic into a work queue, so a consumer group can scale horizontally without a separate queueing system; our MQTT 5 shared subscriptions guide covers backpressure and clustering. Session expiry and message expiry make it possible to say “this reading is worthless after 30 seconds” and let the broker enforce it, which prevents the classic problem of a reconnecting device being flooded with stale commands.
MQTT also has hard limits. It carries opaque bytes, so the semantic seam is entirely yours. The broker is a stateful central component, so it is both a scaling lever and a failure domain. And it needs TCP, which is awkward on lossy low-power links; that gap is the reason MQTT-SN exists, a variant for non-TCP networks such as UDP and serial links that uses a gateway to reach a standard broker. For the full protocol, see our MQTT technical guide, and for the constrained-link variant, MQTT-SN versus MQTT versus CoAP.
CoAP: REST for devices that cannot afford HTTP
The Constrained Application Protocol is RFC 7252, published in June 2014 as a Proposed Standard. It is a request/response protocol with URIs and media types like HTTP, but binary, UDP-based, and designed for low-power lossy networks and microcontrollers. It supports resource discovery and multicast, and it maps cleanly to HTTP through a proxy. The fixed header is four bytes. The IANA-registered ports are 5683 for plain UDP and 5684 for DTLS.
RFC 7252 has been extended rather than replaced. According to the RFC Editor, it is updated by RFC 7959 (block-wise transfer), RFC 8613 (OSCORE object security), RFC 8974, and RFC 9175, with a further update listed. Beyond those, RFC 7641 adds Observe, which lets a client register interest in a resource and receive notifications, and RFC 8323 defines CoAP over TCP, TLS, and WebSockets for networks where UDP is blocked. Observe is the feature that blurs the pub/sub versus request/response line, because a sensor can stay silent until queried yet still push changes to registered observers.
CoAP’s reliability is built into the protocol itself: a confirmable message is retransmitted until acknowledged, and a non-confirmable message is fire-and-forget. That matters because the transport (UDP) offers neither, and it keeps the reliability decision per message instead of per connection. For security on constrained links, see our deep dive on CoAP with OSCORE, EDHOC, and DTLS 1.3 and the broader CoAP protocol guide.
Pub/sub versus request/response, side by side
The deepest fork at the messaging layer is the interaction model. In MQTT, publishers send to a topic on a broker and the broker fans the message out. Producers and consumers never know about each other, which scales to many consumers and survives either side going offline. In CoAP, a client asks a server for a resource and waits for the answer, which keeps a low-power device silent until asked. Figure 3 contrasts the two flows.

Figure 3: MQTT’s broker-mediated pub/sub versus CoAP’s direct request/response with Observe. They differ in who holds state.
Read Figure 3 as a statement about state ownership. In MQTT the broker holds subscriptions, retained messages, and queued QoS 1 or 2 messages for offline sessions, so the device can be dumb about who is listening. In CoAP the resource server holds the current value and the observer list, so there is no central component to scale or fail, but also no durable queue between a sensor and a consumer that is temporarily down. Neither is better; they put the session seam in different places.
AMQP 1.0: brokered messaging with settlement semantics
AMQP 1.0 became an OASIS standard on 31 October 2012 and was approved as ISO/IEC 19464 in April 2014. It is a binary application-layer protocol that requires a reliable transport such as TCP and can use SASL and TLS for authentication and encryption. The most important thing to know is that AMQP 1.0 is not the same protocol that RabbitMQ’s classic clients speak: versions 0-8 through 0-9-1 are described as significantly different from 1.0, and 1.0 deliberately standardizes the wire protocol and leaves exchange and routing topology to the broker.
Where MQTT is deliberately lean, AMQP 1.0 offers link-based flow control with credit, explicit settlement of deliveries, and richer addressing. That makes it a fit for enterprise integration, transactional back-end pipelines, and cloud messaging services where guaranteed processing matters more than per-message bytes. It is rarely the right choice on a device. Its natural place in an IoT architecture is behind the gateway or broker, moving data between the ingest tier and enterprise systems; OPC UA PubSub also defines an AMQP mapping, and we examine the broader protocol in the AMQP protocol guide.
OPC UA: the industrial bundle
OPC UA was introduced on 28 July 2006 and is standardized as IEC 62541. The OPC Foundation’s reference site lists the current specification as 1.05.06, published on 22 October 2025. It defines transport mappings in Part 6 (the binary opc.tcp protocol, HTTPS, and WebSockets), a security model built on X.509 certificates, a service set for browsing, reading, writing, calling methods, and subscribing, and, critically, an address space with typed information models.
That last part is what makes OPC UA a bundle. It closes the semantic seam for industrial equipment: companion specifications define what a robot, a machine tool, or an I/O-Link master looks like in a standard vocabulary. Part 14 adds PubSub, which maps to UDP (multicast, broadcast, unicast, DTLS), raw Ethernet (using EtherType 0xB62C for UADP), MQTT, and AMQP. The cost is weight: OPC UA is a Class 2 or gateway-class workload, not a coin-cell protocol. For depth, see the OPC UA technical guide, the OPC UA PubSub over MQTT versus UADP comparison, and the 1.03 to 1.05 migration analysis.
DDS: data-centric and brokerless
The Object Management Group’s Data Distribution Service has a formal version history ending (at the time of the OMG page checked) with DDS 1.4, published in March 2015. DDS is data-centric rather than message-centric: participants discover each other without a broker and exchange typed topics governed by Quality of Service contracts. It rides the RTPS wire protocol and is widely used in robotics and autonomy through ROS 2. Choose it when you need brokerless, low-latency peer data sharing with explicit QoS contracts, usually inside a vehicle, robot, or cell; see our DDS guide and the micro-ROS write-up for microcontroller-side options.
Matter and Thread: the consumer and building bundle
Matter is an application-layer standard that runs over IP networks; its connectivity foundations are Wi-Fi, Thread, and Ethernet, with Bluetooth Low Energy used for commissioning. The Connectivity Standards Alliance announced Matter 1.5 on 20 November 2025, adding cameras (live audio and video over WebRTC, with PTZ control and privacy zones), a unified closures model for shades, gates, and garage doors, soil sensors, expanded energy management including an electrical energy tariff device type, and full TCP transport support for large transfers such as camera sessions and firmware updates. A 1.5.1 camera-focused update has been reported in the trade press for late March 2026; verify against the CSA’s current specification page before depending on it.
For an industrial architect, Matter is mostly relevant at the edges: smart buildings, energy, and consumer-facing devices. Its design lesson is more general, though. Matter closes the IP seam (it requires IP), the semantic seam (clusters and device types), and the security seam (device attestation and commissioning) in one certified bundle. That is exactly why it interoperates across vendors, and why it is rigid. See Matter 1.5 and Thread 1.4 for the camera and mesh details.
LwM2M: device management as a protocol
OMA’s Lightweight M2M is the least understood of the major bundles because it is about managing devices, not just moving telemetry. Per OMA SpecWorks, the release history is 1.0 (February 2017), 1.1 (July 2018, adding TCP/TLS and broader LPWAN support), 1.2 (November 2020, adding MQTT and HTTP bindings and CBOR encoding), 1.2.1 (December 2022), and 1.2.2 (June 2024), which is marked as the latest release. Its base transport is CoAP over UDP with DTLS, which makes it a natural companion to constrained devices.
LwM2M organizes everything as numbered objects, instances, and resources. Standard objects cover server and security configuration, device information, connectivity monitoring, and firmware update, which is what makes it valuable: you get bootstrap, registration, observation, and over-the-air update as one coherent lifecycle rather than assembling them from parts. If your fleet is cellular NB-IoT or LTE-M meters that must be updated and re-keyed for ten years, LwM2M closes the management seam you would otherwise hand-build.
Sparkplug: closing the semantic seam on MQTT
Sparkplug is the pragmatic answer to MQTT’s lack of semantics in industrial settings. Version 3.0 of the Eclipse specification is dated 21 October 2022, and it became ISO/IEC 20237:2023. It defines an MQTT topic namespace, payload, and session state management, including birth and death certificates so consumers know which devices are online and what their metrics are without polling. Plain MQTT topics leave every team inventing its own structure; Sparkplug gives you a shared one at the price of tighter coupling to its payload encoding and state model. Our comparisons of Sparkplug B versus plain MQTT topics and OPC UA versus MQTT with Sparkplug B go deeper, and the unified namespace architecture shows how the pieces become a plant-wide data model.
Worked Example: Counting Bytes and Choosing a Topology
Headline throughput numbers are marketing; framing overhead is arithmetic you can do yourself. The figures below are computed from the protocol framing rules, not measured, and they exclude link-layer and IP headers. Treat them as illustrative of order of magnitude, and benchmark your own payloads on your own network.
A temperature reading, three ways
Take a 13-byte JSON payload, {"degC":72.4}, and a 23-character MQTT topic, plant/line3/temperature. An MQTT 5 PUBLISH at QoS 1 consists of a 2-byte fixed header (one byte for packet type and flags, one byte for remaining length), a 2-byte topic length plus the 23 topic bytes, a 2-byte packet identifier, and a 1-byte property length (zero properties). That is 30 bytes of MQTT overhead around the 13-byte payload, 43 bytes in total. Once a topic alias has been established on the connection, the topic string can be replaced by a 3-byte alias property (one byte of property identifier, two of value), which brings the MQTT-layer cost down to about 10 bytes of overhead. That is a saving of roughly 20 bytes per message, which compounds over millions of messages, but the alias only lives for the connection and both sides must advertise support.
A CoAP GET for /line3/temp is a 4-byte header, a 1-byte token, and two Uri-Path options (each a 1-byte option header plus the segment: 6 bytes for line3, 5 for temp), for 16 bytes. The response carrying the same JSON is the 4-byte header, a 1-byte token, a 2-byte Content-Format option, a 1-byte payload marker, and the 13-byte payload: 21 bytes. The CoAP response is half the size of the MQTT publish at the application layer. But transport headers move the comparison back: TCP’s minimum 20-byte header and its handshake and keepalive traffic are paid by MQTT, while UDP’s 8-byte header is paid by CoAP, and 6LoWPAN header compression can shrink IPv6 and UDP headers dramatically on 802.15.4 links.
The lesson is not that CoAP is “smaller” and therefore better. It is that on a 127-byte radio frame, a few dozen bytes decide whether a reading fits in one frame or two, and that in a cloud-ingest path with kilobyte payloads the framing difference is noise. Pick the protocol for the constraint that actually binds you.
Two topologies, one upper stack
The payoff of modularity shows when you put a constrained-device deployment beside an industrial one. Figure 4 shows battery sensors on BLE and Zigbee, LoRaWAN nodes, and Thread-based Matter devices on one side, and PLCs speaking OPC UA over a TSN Ethernet bus on the other. Both feed an edge gateway that translates and buffers, then an MQTT 5 broker carrying Sparkplug B or a unified-namespace topic tree, and finally the platform and digital twin.

Figure 4: Constrained-device edge versus industrial backbone. Different lower layers converge on a common messaging and semantic layer.
The gateway is the linchpin. On the constrained side it absorbs radio heterogeneity, translates to IP, re-encodes payloads, buffers during connectivity gaps, and presents a single stream upward. On the industrial side, OPC UA already carries IP-native semantics, so the gateway mostly maps information-model nodes to topics. Either way, the digital twin sees structured data and never needs to know whether a reading came from a coin-cell sensor or a machine tool. For the buffering pattern, see MQTT store-and-forward at the edge, and for brownfield equipment, the Modbus to unified namespace retrofit comparison.
The IoT Protocol Decision Matrix
Use the matrix as a starting filter, not a verdict. Cells are qualitative on purpose: real latency and throughput depend on payload size, QoS, topology, and hardware, and precise numbers should come from your own benchmark. The versions and standards in the “Status” column are those verified in the research for this article.
| Protocol | Typical transport | Interaction model | Footprint | Semantics included | Status (verified) | Best fit |
|---|---|---|---|---|---|---|
| MQTT 5 | TCP, TLS | Pub/sub via broker | Low | None (opaque payload) | OASIS 5.0, March 2019; 3.1.1 is ISO/IEC 20922:2016 | Telemetry fan-in, cloud ingest, many consumers |
| MQTT-SN | UDP, serial | Pub/sub via gateway | Very low | None | Variant of MQTT for non-TCP networks | Sensor nets without TCP |
| CoAP | UDP, DTLS (also TCP, WebSockets) | Request/response plus Observe | Very low | URIs, resource discovery | RFC 7252, June 2014, plus extensions | Class 1 devices, lossy links |
| AMQP 1.0 | TCP, TLS, SASL | Brokered links, settlement | Higher | None | OASIS 2012; ISO/IEC 19464 (2014) | Enterprise integration, guaranteed processing |
| OPC UA | opc.tcp, HTTPS, WebSockets; PubSub on UDP, MQTT, AMQP | Client/server plus PubSub | Higher | Full information models | Spec 1.05.06 (Oct 2025); IEC 62541 | Plant floor, machine interoperability |
| DDS | UDP (RTPS), TCP | Brokerless data-centric pub/sub | Medium | Typed topics, QoS contracts | OMG DDS 1.4 (March 2015) | Robotics, real-time cell and vehicle data |
| LwM2M | CoAP/UDP; MQTT, HTTP, TCP bindings | Device management plus telemetry | Low | Object model | v1.2.2, June 2024 | Cellular and LPWAN fleet management |
| Matter | IP: Wi-Fi, Thread, Ethernet | Cluster-based, certified | Medium | Clusters and device types | 1.5, November 2025 | Smart building, home, energy |
| Sparkplug | MQTT | State-aware MQTT | Low to medium | Topics, payload, birth and death | 3.0, Oct 2022; ISO/IEC 20237:2023 | OT data over MQTT |
| HTTPS REST | TCP, TLS | Request/response | Higher | URIs, JSON | Ubiquitous | Occasional, firewall-friendly calls |
How to read it: scan for the row whose “Best fit” shares your hardest constraint, then check that its semantics column does not leave a seam you cannot afford to own. A common outcome is not one row but a combination: LwM2M for management of the cellular fleet, MQTT 5 with Sparkplug for the plant, OPC UA at the machine, and HTTPS for partner APIs. Those are complementary, not competing, because they sit at different seams.
Decision rules that survive contact with reality
Four rules hold up across projects. First, if the device is Class 1 or smaller, start from CoAP or LwM2M, and treat anything heavier as a gateway-side concern. Second, if more than one downstream consumer needs the same data, put a broker in the path; fan-out by hand-written point-to-point links does not age well. Third, if the equipment is industrial and vendor-diverse, use OPC UA companion specifications rather than inventing a model, and bridge to MQTT at the edge. Fourth, if you need cross-vendor consumer interoperability, adopt a certified bundle such as Matter and accept its rigidity.
Trade-offs, Gotchas, and What Goes Wrong
Layering is powerful but not free, and the failure modes are predictable once you know where to look.
The gateway becomes the bottleneck and the single point of failure. It concentrates translation, buffering, and security, so its capacity and resilience must be designed rather than assumed. Size its disk buffer for the longest uplink outage you must survive, monitor queue depth, and plan for active/standby operation. A gateway that silently drops messages when its buffer fills is worse than one that fails loudly.
Semantic drift defeats modularity. If every team invents its own topic structure and JSON schema, you have a modular stack with chaos at the top. Standardize early on Sparkplug, an OPC UA information model, or a documented topic convention with schema validation, or pay for it later in fragile hand-written parsers.
QoS does not mean what anxiety wants it to mean. MQTT QoS 2 and AMQP guaranteed settlement cost extra round trips and broker state. On a flaky link they can amplify congestion rather than fix it. QoS 1 with idempotent handling at the application layer is often the better engineering choice, and for telemetry that is superseded by the next sample, QoS 0 is correct.
TCP on lossy radios stalls. TCP’s retransmission and congestion control assume wired-like loss behavior; on a poor radio link a single lost segment can block everything behind it. This is why CoAP over UDP, DTLS, and QUIC exist, and why MQTT over a bad cellular link needs sensible keepalive and reconnect tuning.
Translation hops multiply bug surface. Pushing OPC UA onto a coin-cell sensor, or HTTP onto a LoRaWAN node, fights the constraints. The opposite failure, translating through three protocols between device and cloud, adds latency and a place for unit and timestamp errors at every hop. Count your boundaries and justify each.
Version and certification drift is real. OPC UA moved to 1.05 and Thread certification tightened to 1.4; LwM2M has three 1.2.x releases. Devices in the field live for ten years, so record which specification revision every device and gateway targets, and decide up front how you will handle a mixed fleet. Do not assume a feature present in a new SDK is available on deployed firmware.
Benchmarks lie by omission. Vendor throughput figures rarely state payload size, QoS, number of subscribers, or retained-message load. Run your own test with your real topic structure and message mix, and measure tail latency, not averages.
Security Across the Layers
Security in a modular stack is a per-layer responsibility tied together by one device identity and key-management foundation. A gap at any layer undermines the rest, and a TLS checkbox alone is never enough.
At the link layer, use the radio’s native encryption and secure pairing so an attacker cannot sniff or join the local network. At the network layer, segment device traffic so a compromised sensor cannot roam the VLAN. At the transport layer, TLS, DTLS (1.3 is RFC 9147), and QUIC encrypt the link; pin or validate certificates wherever the device can store them. At the messaging layer, enforce authentication, authorization, and fine-grained topic or resource ACLs so a device that may publish temperature cannot also command an actuator; MQTT 5’s enhanced authentication and CoAP’s OSCORE (RFC 8613) provide message-level options. OPC UA bakes in X.509-based security with configurable security policies, which we cover in the OPC UA security certificates guide. At the semantic layer, validate payload ranges and, where it matters, sign payloads so an authenticated device still cannot inject nonsense.
What ties these together is per-device identity: a unique credential provisioned at manufacture, rotatable, and revocable. Without it every other control degrades into a shared secret that leaks the moment one unit is opened. NIST’s IoT cybersecurity program treats device identity and lifecycle management as foundational for this reason. Build identity in from the first prototype; retrofitting it across a deployed fleet is among the most expensive mistakes in IoT. Regulation is also pulling in this direction: see our analysis of Cyber Resilience Act obligations for IoT firmware.
Practical Recommendations
Start from layers, not logos. Sketch the five layers and the three seams on a whiteboard before you name a protocol, and write next to each seam who owns it. Then work upward from the most binding constraint.
For a constrained, battery-powered fleet, run IPv6 to the device where the radio allows (6LoWPAN or Thread), use CoAP and, if you must manage devices for years, LwM2M, and keep a gateway only where the radio forces one. For plant-floor and OT data, keep OPC UA at the machine, bridge to MQTT 5 at the edge, and standardize on Sparkplug or a documented unified namespace before the device count grows. For cloud integration, put a broker between producers and consumers, use MQTT 5 shared subscriptions for scaling consumers, and reserve AMQP 1.0 for back-end systems that need settlement semantics. For building and consumer devices, adopt Matter rather than reinventing it.
A short checklist before you freeze the design:
- Write down the RAM, flash, and power class of every device type (RFC 7228 classes help).
- Choose the radio last-but-firm: it is the hardest layer to reverse, so isolate it behind a gateway or IP.
- Standardize the semantic layer organization-wide before scaling.
- Match QoS to the link and the data, not to anxiety; make handlers idempotent.
- Treat the gateway as a tier-one component: size, monitor, and plan its failure.
- Record the specification version each device and gateway implements.
- Provision a unique, revocable identity per device from the first prototype.
- Benchmark with your own payloads, topic tree, and network.
Frequently Asked Questions
What is the IoT protocol stack?
The IoT protocol stack is a layered, modular architecture for moving and giving meaning to device data. It spans link (BLE, LoRaWAN, Wi-Fi, Ethernet), network (IPv6, 6LoWPAN, Thread), transport (TCP, UDP, DTLS, QUIC), messaging (MQTT, CoAP, AMQP, OPC UA, DDS), and semantic layers (Sparkplug, OPC UA models, LwM2M objects, Matter clusters). Each layer exposes a stable interface so you can swap one, such as the radio or the payload format, without rewriting the others.
Should I use MQTT, CoAP, or OPC UA?
Let your most binding constraint decide. Choose MQTT 5 for many-to-many telemetry and cloud ingest where broker-mediated pub/sub helps. Choose CoAP for very constrained devices on lossy links, where UDP and a four-byte header matter. Choose OPC UA for industrial equipment that needs typed, self-describing information models and vendor interoperability. Many real systems use all three at different points, with a gateway bridging OPC UA to MQTT at the plant edge.
What changed in MQTT 5 compared with MQTT 3.1.1?
MQTT 5.0 (OASIS Standard, 7 March 2019) added reason codes on acknowledgments, session and message expiry, shared subscriptions, topic aliases, flow control through Receive Maximum, user properties, request/response support through Response Topic and Correlation Data, and enhanced authentication with an AUTH packet. Version 3.1.1 remains widely deployed and is the version standardized as ISO/IEC 20922:2016, so check what your broker and clients both support before relying on version 5 features.
Is AMQP 1.0 the same as RabbitMQ’s AMQP?
No. AMQP 1.0 (OASIS Standard, 31 October 2012; ISO/IEC 19464) is substantially different from the 0-8 to 0-9-1 versions that classic RabbitMQ clients use. Version 1.0 standardizes the wire protocol and leaves routing topology to the broker, whereas the older versions define exchanges and queues explicitly. Always confirm which AMQP version a client library and broker pair actually speak, because the two families do not interoperate directly.
Do constrained devices need IPv6?
Not strictly, but running IPv6 to the device through 6LoWPAN or Thread is a strong architectural choice. It makes each device an addressable end-to-end endpoint, removes protocol-specific translation gateways, and lets standard tooling reach the edge. The trade-off is adaptation-layer complexity and modest overhead, which 6LoWPAN header compression is designed to minimize on 127-byte 802.15.4 frames. Non-IP radios such as LoRaWAN still need a gateway.
How do Matter and LwM2M fit into an industrial IoT stack?
They mostly serve different domains. Matter (version 1.5, November 2025) targets smart homes and buildings, with cameras, closures, and energy management, and runs over Wi-Fi, Thread, and Ethernet. LwM2M (version 1.2.2, June 2024) manages constrained devices, especially cellular and LPWAN fleets, with bootstrap, registration, and firmware update. Neither replaces OPC UA or Sparkplug on the factory floor, but both can feed the same platform through a gateway.
Further Reading
Internal guides on this site:
- Major IoT protocols and how to choose one: the catalogue-style companion to this article.
- MQTT-SN versus MQTT versus CoAP for constrained sensor networks: the low-power end of the comparison.
- OPC UA versus MQTT with Sparkplug B: the industrial trade-off in depth.
- Unified namespace architecture for industrial IoT: how the semantic layer becomes a plant-wide model.
Primary sources:
- MQTT Version 5.0, OASIS Standard
- RFC 7252: The Constrained Application Protocol (CoAP)
- RFC 7228: Terminology for Constrained-Node Networks
- OPC Foundation reference: OPC 10000-1 overview
- OMA SpecWorks: LwM2M protocol versions
- Connectivity Standards Alliance: Matter 1.5 announcement
- NIST Cybersecurity for IoT Program
By Riju — about
