CoAP retransmission backoff

CoAP retransmission backoff

Watch the silent waits double until the client gives up

animation
coap
protocols
Frame-by-frame animation of CoAP confirmable-message retransmission: initial timeout, doubling waits, the last send at 45 s and the give-up at 93 s (RFC 7252 section 4.8.2).
← Back to the chapter: CoAP security applications, pitfall “Retransmission Backoff Flooding the Network”

A lost Confirmable (CON) request is resent after a timeout that doubles each time. Step through the clock to see the silent waits grow and where the client finally gives up.

From the chapter: “With default backoff: timeouts of 2–3 s, then 4–6, 8–12 and 16–24 s, so retransmissions occur at about 2–3, 6–9, 14–21 and 30–45 s after the first send. The maximum span from first to last send is 45 s; the sender may wait up to 93 s from the first send before giving up on ACK or RST (RFC 7252 §4.8.2).”

ANIMATION

Technical boundaries. The CON request, packet losses and resulting absence of ACKs are illustrative; the paragraph does not state them. The clock is scaled and the first timeout is fixed at 3 s so the numbers are easy to follow. Real CoAP picks each first timeout at random between 2 and 3 s (ACK_TIMEOUT 2 s, ACK_RANDOM_FACTOR 1.5) and allows up to 4 retransmissions (MAX_RETRANSMIT); the other timeouts double from there. The packets here are always lost; if any copy or its ACK got through, the exchange would end at that point.

Back to the chapter