LOGBOOK

HELP

Quiz Entry - updated: 2026.09.18

Why can't a constrained IoT device just use TCP like everything else on the internet?

TCP connection management can be too expensive for small, infrequent messages; UDP avoids that state, while reliability and security still need explicit design.

A schematic comparison of protocol work, not a timing measurement: reliability adds exchanges even when implemented above UDP.

* A schematic comparison of protocol work, not a timing measurement: reliability adds exchanges even when implemented above UDP. *

TCP's cost is not mainly about bandwidth — it is about what the endpoint has to hold and do:

  • Connection state per peer, kept alive for the duration of the connection, in RAM measured in kilobytes.
  • Acknowledgements, retransmission timers and windows, which add exchanges and scheduling constraints; the radio need not stay awake throughout every timer.
  • A handshake before any data flows, which is pure overhead when the payload is a 12-byte temperature reading taken every fifteen minutes.

Since the radio is typically the biggest consumer in the device's energy budget, "the radio must stay awake for the protocol's benefit" is the expensive part. UDP has no connection state, no handshake and no timers — the device can wake, transmit, and go back to sleep.

The trade is that UDP gives no delivery guarantee, so anything that genuinely needs reliability implements it at the application layer, where it can be sized to the use case: a lost temperature sample may simply be skipped, while a firmware-update chunk is retried explicitly.

This choice then propagates up the whole stack: a UDP-based CoAP design can use DTLS, while standard MQTT normally uses TCP, commonly protected with TLS. MQTT-SN is a separate protocol for sensor networks. TCP is not forbidden on IoT hardware: the choice depends on memory, duty cycle and reliability requirements.

Tip: the rule of thumb from this material is blunt — "TCP too expensive, use UDP instead." Remember it as the root of the whole substitution chain: UDP → DTLS → CoAP.

Go deeper:

From Quiz: SIOT / IoT Fundamentals and End-to-End Software Architectures | Updated: Sep 18, 2026