Limit in-flight work
NSTART caps the number of outstanding interactions to one server. The RFC 7252 default is one, which is conservative and easy to implement.
Animate RFC 7252 NSTART limiting, randomized ACK timeout, exponential backoff, retransmission risk, and an RTT-aware comparison.
Watch a constrained CoAP client decide when it may send, when it must wait, and how retransmission timers expand after loss. Step through NSTART slots, randomized ACK timeout, exponential backoff, and the difference between safe recovery and a retry storm.
NSTART caps the number of outstanding interactions to one server. The RFC 7252 default is one, which is conservative and easy to implement.
A Confirmable message starts a timer. If no ACK or response arrives, the client retransmits the same message rather than starting unlimited new work.
Each retry waits longer. This exponential backoff gives the network time to recover instead of adding more traffic during congestion.
ACK_RANDOM_FACTOR spreads retry times. Without it, many clients can wake up and retransmit together.
One client sends Confirmable requests and waits for each result before opening the next interaction.
With NSTART set to one, the client keeps only one interaction outstanding and queues later requests until the ACK or response arrives.
| Control | Default | Meaning | Learning signal |
|---|---|---|---|
NSTART |
1 | Maximum simultaneous outstanding interactions to one server. | Higher values raise throughput pressure and can be unsafe without stronger congestion-control measurement. |
ACK_TIMEOUT |
2 s | Base timeout before retransmitting a Confirmable message. | Lower values can retry too soon on slow links; higher values slow recovery. |
ACK_RANDOM_FACTOR |
1.5 | Jitter multiplier for the initial timeout. | Values above 1.0 spread clients apart and reduce synchronized retries. |
MAX_RETRANSMIT |
4 | Maximum number of retransmission attempts. | More retries improve delivery chance but keep state and traffic alive longer. |
The workbench uses initial = ACK_TIMEOUT * random(1, ACK_RANDOM_FACTOR), then doubles that initial timeout for each retransmission step.
MAX_TRANSMIT_SPAN covers the time from first send to the last retransmission. With defaults, it is about 45 seconds.
MAX_TRANSMIT_WAIT includes the final wait before giving up. With defaults, it is about 93 seconds.
Watch the slot strip before the packet lanes. If every enabled slot is busy, the next request must wait in the queue.
The retry ladder shows why one missed ACK does not immediately become a flood. Each timeout gets longer.
In the no-jitter scenario, several clients retry in nearly the same time window. That is the behavior randomization is meant to reduce.
The default values and derived timing formulas are taken from RFC 7252 Sections 4.7 and 4.8. The workbench treats NSTART as a per-server outstanding-interaction limit.
The comparison mode is a teaching simplification inspired by CoCoA draft ideas. It shows why RTT measurement can help, but it is not a full implementation of the expired Internet-Draft.
The loss scenarios are deterministic so learners can repeat them. They illustrate congestion-control consequences rather than simulating a specific radio or MAC layer.