Meaning
An application layer recovery mechanism in the Constrained Application Protocol ensures reliable message delivery over lossy networks by resending unacknowledged confirmable packets. Embedded endpoints utilize coap retransmission when a confirmable message does not receive a corresponding acknowledgement within a specified time window. This approach allows lightweight smart devices to maintain communication integrity without the overhead of a continuous connection-oriented transport protocol.
Transmission Timeout
A default timer governs the initial period that an endpoint waits before resending a confirmable packet. Developers configure this duration, typically set to two seconds, to prevent premature retransmission over high-latency radio links. If the acknowledgement arrives after the timeout has elapsed, the device processes it but adjusts its round-trip time calculations for future interactions.
Exponential Backoff
Congestion control algorithms double the timeout duration after each subsequent failed attempt to reach the destination node. The system applies a randomized factor to each new calculation, preventing multiple constrained nodes from synchronized resending of packets. This randomization breaks collision loops on dense sensor networks, stabilizing the shared medium during peak traffic events.
By dynamically adjusting the schedule based on network feedback, the sender mitigates localized congestion without needing centralized orchestration, preserving packet flows.
Resource Conservation
Nodes stop the retry process after a maximum number of attempts, which usually defaults to four retransmissions. When this threshold is exceeded, the application layer registers a transmission failure and notifies the orchestrating system. Stopping prevents excessive battery depletion and stops the node from flooding the local gateway with obsolete requests.