Skip to content

Comparing Common IoT Communication Protocols: MQTT, CoAP, HTTP, and Modbus ​

IoT communication protocols overview

"Which protocol should devices use to connect to the platform?" is the first question every IoT project faces. This article compares four mainstream protocols to help you quickly build an intuition for protocol selection.

1. A Quick Look at the Four Protocols ​

ProtocolTransport LayerModelTypical Scenarios
MQTTTCPPublish/SubscribeThe mainstream choice for connecting devices to cloud platforms
CoAPUDPRequest/ResponseLow-power, constrained networks (NB-IoT)
HTTPTCPRequest/ResponseLow-frequency reporting, easy integration
ModbusSerial/TCPMaster-slave pollingIndustrial PLCs and instrumentation on site

2. MQTT: The De Facto Standard for Cloud Platforms ​

MQTT is built on the publish/subscribe model, with a Broker relaying messages. It natively supports massive numbers of persistent connections and bidirectional communication (uplink reporting + downlink commands). With a minimum header of just 2 bytes and three optional QoS reliability levels, it is the protocol of choice for cloud platforms such as FastBee. The trade-off is that devices must maintain a persistent TCP connection, which consumes more power than UDP-based alternatives.

3. CoAP: Born for Constrained Devices ​

CoAP runs over UDP, with semantics aligned to REST, making it well suited to low-bandwidth, high-latency networks such as NB-IoT and LoRa. Its Observe mechanism provides subscription-like behavior, but its ecosystem and integration with cloud platforms fall far short of MQTT.

4. HTTP: Simple but Inefficient ​

HTTP has virtually zero learning curve — any language can send a request — making it suitable for low-frequency scenarios that report only a few times a day. However, it does not support server-initiated downlink (requiring polling or long polling), carries heavy connection overhead, and is unsuitable for real-time control.

5. Modbus: The Veteran of Industrial Sites ​

Modbus is deeply entrenched in the industrial world; a vast number of PLCs, power meters, and variable-frequency drives support nothing else. Cloud connectivity is typically achieved through protocol conversion at an edge gateway: the gateway polls Modbus registers, then reports the data to the platform over MQTT.

6. Selection Guidance ​

  • New projects connecting devices directly to a cloud platform → MQTT;
  • Battery-powered + cellular narrowband → CoAP;
  • Existing industrial equipment → edge gateway + Modbus-to-MQTT conversion;
  • Prototype validation or extremely low-frequency reporting → HTTP is fine to start with.

Last updated:

Recent Update

FastBee | fastbee.cn