IICTPIICTP

Blog / Guides

IoT & edge26 October 20265 min read

MQTT vs HTTP vs CoAP: choosing an IoT protocol

The right protocol depends on the device, the network and how data needs to flow. Here are the three you will meet most often.

In this post
  1. MQTT
  2. HTTP
  3. CoAP
  4. Choosing
  5. Sources and further reading

MQTT

A lightweight publish/subscribe protocol that runs over TCP and routes messages through a broker. It offers three delivery levels (at most once, at least once, exactly once) and suits many devices sending small messages on unreliable links.

HTTP

The web’s request/response protocol. Universally supported and easy to debug, but heavier for tiny devices and not designed for pushing messages to them.

CoAP

A protocol modelled on HTTP but built for constrained devices and networks, running over UDP. It keeps the familiar request/response style with a much smaller footprint.

Choosing

  1. Many devices, small frequent messages, need to push to devices: MQTT.
  2. Existing web infrastructure and larger, less frequent exchanges: HTTP.
  3. Very constrained devices and lossy networks: CoAP.
  4. Whichever you choose, secure it with TLS or DTLS and authenticate devices.

Sources and further reading

  1. OASIS. MQTT Version 5.0. docs.oasis-open.org/mqtt/mqtt/v5.0/.
  2. IETF RFC 7252. The Constrained Application Protocol (CoAP). rfc-editor.org/rfc/rfc7252.

IICTP is a new independent credential and is not ISO/IEC 17024 accredited.

Keep reading

← All posts

Where do you stand?

Find the credential that fits the work you do.