Menu

1 / 2

IoT protocols for asset tracking: MQTT vs HTTP vs CoAP — what to use when

DEV Community·Smrati·6 months ago
#hCimTAgx
#mqtt#http#coap#iot#wins
Reading 0:00
15s threshold

Choosing an unsuitable protocol in an asset tracking stack does not lead to immediate failure but to massive failures. There will be higher latencies, shorter than expected battery life, and even the message broker might be unable to handle thousands of concurrent connections.

The following is the right choice criterion.

Overview of three protocols

MQTT

Message Queuing Telemetry Transport

Pub/sub over TCP. Designed for unreliable networks and constrained devices. There is a broker that mediates communication between publisher and subscriber; peer-to-peer communication is never used.

Pub/Sub properties

Based on TCP

Persistent connections

HTTP

Hypertext Transfer Protocol

Client-server request/response mechanism over TCP. In HTTP, each device establishes a connection, sends the data, waits for a response and closes the connection.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.