The Overhead the Byte Count Misses

Ada re-derives this chapter’s own numbers step by step, at full precision

foundations
math-foundations
calculation-audit
protocols-overview
Ada ADA · CALCULATION AUDIT

The Overhead the Byte Count Misses

A soil sensor that reports just once a day over MQTT QoS 1 with a 60-second keepalive still exchanges 1,440 keepalive pings a day, holding the session warm for a single payload. Carry a 4-byte reading over CoAP, UDP, IPv4, and Ethernet and the frame swells to 50 bytes, of which 46 — a full 92% — is pure overhead. This audit asks whether protocol choice for a sleepy, infrequent reporter is really about the application data, or about the fixed per-session and per-packet costs the byte count never sees.

Companion to the chapter CoAP and MQTT Tradeoffs — every number here comes from that chapter.

Ada: The packet-overhead panel earlier already priced CoAP against MQTT byte for byte. But this chapter makes two other numeric claims the byte count never sees — a once-a-day MQTT sensor still sends “1,440 pings per day,” and a tiny CoAP payload can be “92% overhead.” Both are fixed costs that do not shrink with the message, so let me check them.

Take the daily soil sensor on MQTT QoS 1 with a 60-second keepalive. The connection must be kept warm even when there is nothing to report:

  • Keepalive pings per day: 86400 s / 60 s = 1440.
  • Ratio of upkeep to payload: 1440 : 1 against a single daily data message.

Now the full-stack overhead of a 4-byte reading (“25.3”) carried by CoAP over UDP, IPv4, and Ethernet:

  • Frame total: 4 (payload) + 4 (CoAP) + 8 (UDP) + 20 (IPv4) + 14 (Ethernet) = 50 bytes.
  • Overhead: 50 - 4 = 46 bytes, so 46 / 50 = 0.92, i.e. 92%.

The design meaning is that both costs are fixed per session or per packet and are paid regardless of how little data moves. A device reporting once a day would spend 1,440 keepalive exchanges holding a TCP session open for one payload — which is exactly why the chapter steers a sleepy, infrequent reporter toward connectionless CoAP CON, where the exchange is one request and one ACK with no session to maintain. The 92% figure makes the same point at the packet level: when the payload is only a few bytes, protocol choice is about minimising unavoidable fixed overhead, not about the application data itself.

Every number above is taken from the chapter’s own material and re-derived step by step.