Skip to content

Plain-language guides to iot development

Date

Monday, November 16, 2026

Posted by

Date

IoT Communication Protocols and When to Use Each

iot protocols

Picking among iot protocols can feel like guesswork when your devices are small and your network is shaky. The short answer: use MQTT for publish/subscribe telemetry, CoAP for constrained devices that talk to the web, and HTTP when familiarity matters most.

If you are mapping a whole project, our iot development hub shows where protocol choices fit.

Item Value
MQTT transport TCP
CoAP transport UDP
MQTT quality of service levels Three levels
MQTT latest standard release listed 2019
CoAP first RFC 2014
Matter first version 2022

These figures come from the Eclipse Foundation newsletter and the Axiros guide. Standards get revised, so check the sources before you rely on them.

Start with your devices and your data

The Axiros guide advises that you consider where your devices are placed first, because that shapes the connectivity protocols, and then the data they send, which shapes the application protocols. Axiros makes that two-step order its closing advice.

This guide covers the application side of that choice:

  • MQTT and CoAP, the two general-purpose IoT protocols.
  • HTTP and WebSocket, borrowed from the wider internet.
  • LwM2M, User Services Platform (USP) and Matter, which solve narrower problems.

That split mirrors how a system is stacked, which our piece on iot architecture layers explains in more depth.

iot protocols Network connections
Blue network cables plug into a row of ports.

MQTT: publish/subscribe for telemetry

MQTT is a publish/subscribe messaging protocol. The Eclipse Foundation newsletter notes it was originally developed by IBM and is now an open standard.

Every sensor is a client that connects to a broker over TCP, and each message is published to a topic. Per the same newsletter, every client subscribed to a topic receives every message published to it.

Several built-in features make this model practical for telemetry:

  • Hierarchical topics with wildcards: the + wildcard matches a single level and # matches any number of levels, as the Eclipse newsletter explains.
  • Three quality of service levels: fire and forget, delivered at least once, and delivered exactly once, according to Eclipse.
  • Last will and testament: a message the broker sends on a client’s behalf if it disconnects, which tells subscribers a device has dropped off.
  • Persistence: the broker keeps only the most recent persistent message rather than letting a backlog build up.

Very constrained devices can struggle because, in the newsletter’s words, every MQTT client must support TCP and will typically hold a connection open to the broker at all times. The Eclipse Foundation points to MQTT-SN, which defines a UDP mapping of MQTT, as the answer.

The Axiros guide says OASIS standardizes MQTT, with a first version in 1999 and the latest it lists in 2019. It also warns that MQTT has no well-defined data representation, so each application must define its own.

CoAP: built for constrained devices

CoAP, the Constrained Application Protocol, is a document transfer protocol like HTTP but designed for constrained devices. The Eclipse Foundation newsletter says CoAP packets are much smaller than HTTP TCP flows.

It runs over UDP rather than TCP, and it follows a client/server model in which clients may GET, PUT, POST and DELETE resources. Simple proxies let it interoperate with HTTP and the RESTful web, the same source adds.

For reliability, a message can be marked confirmable, which means the receiver must acknowledge it, or nonconfirmable, which is fire and forget. Because it is datagram based, CoAP may also ride on top of SMS, per the Eclipse newsletter.

The Axiros guide says the first RFC appeared in 2014 and the most recent extension it lists is from 2021. It also admits CoAP does not have a wide adoption, partly because HTTP is so well known.

HTTP and WebSocket: familiar, but not made for IoT

HTTP is often used in IoT because of its wide adoption on the internet. Axiros stresses it was not originally developed for the IoT environment.

WebSocket keeps one connection open until it is explicitly terminated, which makes it stateful, unlike HTTP. The same guide says W3C standardized it in 2008 and that it can give gateways persistent connectivity to a back-end system.

If your decision comes down to these two, our comparison of mqtt vs http sets them side by side.

Special-purpose protocols for management and smart homes

Some protocols are not meant for moving sensor readings at all. The Axiros guide groups these three as special purpose:

  • LwM2M: a device management protocol for devices with limited processing and storage, covering firmware updates and diagnostics. Its first version was released in 2017 and the latest it lists in 2020 (Axiros).
  • USP: the Broadband Forum’s application layer protocol and data model for managing many device types. It was first published in 2018, with its latest release listed in 2022 (Axiros).
  • Matter: an interoperability protocol for connecting devices from different vendors in a smart home. Its first version came from the Connectivity Standards Alliance in 2022 (Axiros).

Treat these as companions to MQTT or CoAP rather than rivals, since they answer different questions.

So which of these iot protocols should you pick?

Work through the choice in this order:

  1. Decide where your devices sit and how they connect, which narrows the connectivity options.
  2. For collecting data from many devices and monitoring them remotely, start with MQTT, which Axiros describes as one of the most widely used.
  3. For tiny devices that must speak the web’s request and response style, look at CoAP.
  4. If your team already runs web services and wants the most familiar tooling, HTTP is the low-friction route.
  5. Add LwM2M or USP when you need to manage a fleet, and Matter when smart-home devices from different vendors must work together.

Your answer will rarely be a single protocol. Most real systems mix a data protocol with a management one.

Frequently asked questions

Is MQTT or CoAP better for small devices?

Show answer

It depends on what you value. The Eclipse Foundation newsletter says MQTT offers flexible communication patterns and acts as a pipe for binary data, while CoAP is aimed at interoperability with the web.

Can CoAP work without a TCP connection?

Show answer

Yes. It sends connectionless datagrams, so retries and reordering are left to the application stack, and the Eclipse newsletter suggests dropping TCP may allow full IP networking in small microcontrollers.

How do MQTT and CoAP handle security?

Show answer

MQTT brokers may demand a username and password, and the TCP connection can be encrypted with SSL/TLS, per the Eclipse Foundation. Axiros lists a security binding to DTLS among CoAP’s main features.

Does LwM2M replace MQTT or CoAP?

Show answer

No, it sits on top of them. The Axiros guide says it first relied only on CoAP, and its latest versions can also use MQTT and HTTP.

Why do people talk about Matter in a protocol comparison?

Show answer

Its goal is to let devices work without a separate proprietary hub for each producer, Axiros explains. That makes it a smart-home interoperability layer rather than a telemetry transport.