Why UDP is Better Than TCP for IoT Battery Life
Battery-powered Internet of Things (IoT) devices rely on energy-efficient communication protocols to maximize their operational lifespan. This article explains why the User Datagram Protocol (UDP) is significantly better suited for low-power IoT hardware than the Transmission Control Protocol (TCP). By eliminating connection handshakes, reducing packet overhead, and avoiding resource-heavy retransmissions, UDP allows embedded microcontrollers and radios to spend less time active and more time in deep sleep mode.
Elimination of Connection Handshakes
TCP requires a reliable connection, which begins with a three-way handshake (SYN, SYN-ACK, ACK) and concludes with a multi-step termination process (FIN, ACK). For an IoT sensor that only needs to send a single sensor reading every hour, performing this handshake forces the radio transceiver—the most power-hungry component on the device—to remain powered on for several round trips.
UDP is completely connectionless. A device can wake up, immediately transmit its payload in a single packet, and power down without waiting for connection establishment or teardown exchanges.
Minimal Header Overhead
Packet size directly impacts transmission time and energy consumption:
- TCP Headers: Range from 20 to 60 bytes, containing fields for sequence numbers, acknowledgment numbers, window sizes, and control flags.
- UDP Headers: Fixed at just 8 bytes, containing only source port, destination port, length, and a checksum.
Transmitting fewer bytes over radio protocols like Wi-Fi, Cellular (NB-IoT/LTE-M), or LoRaWAN shortens the “on-air” time of the radio, directly conserving battery charge.
No Retransmissions or ACK Waits
TCP guarantees delivery through acknowledgments (ACKs) and automatic retransmissions of lost packets. In environments with poor signal or high packet loss, TCP will keep the radio active while repeatedly attempting to deliver old data.
For many IoT applications, such as temperature, humidity, or GPS tracking, fresh data makes old data obsolete. UDP’s “fire-and-forget” architecture avoids the power penalties of acknowledgment waiting and continuous retransmission loops. If a reading is lost, the device simply transmits updated data during its next scheduled cycle.
Faster Return to Deep Sleep
Conserving battery in IoT relies heavily on duty cycling, where devices spend over 99% of their time in a low-power deep sleep state.
Because UDP requires no connection management, minimal processing from the microcontroller, and fewer radio transmissions, the total transaction time is drastically reduced. A UDP transaction that takes tens of milliseconds allows the device to return to sleep almost instantaneously, compared to a TCP transaction that can take seconds under varying network conditions.