Manage idleness and recover from closure
05An idle session has no work left for that endpoint. Partial bytes and interrupted replies need careful handling so idle connections do not consume resources forever.
Separate interruption example: C1 closes while B is outstanding. The old server stops trying to send its pending response on C1. The client retries B on new C2; retry timing and limits are local policy.
Source for this drawing: RFC 7766 · Read RFC section 6.2.3 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Close responsibly; retry unanswered work.
- Clients MUST take care to minimize idle time and SHOULD close an idle TCP session unless another signalling mechanism established a timeout. Servers are recommended to use default idle periods on the order of seconds, with no particular value specified; zero timeouts MAY be used under heavy load or attack.
- Servers SHOULD reset the idle timeout on receipt of a full DNS message, rather than any partial segment. A client is idle only when it has neither pending questions to send nor outstanding responses; a server is idle when it has answered all received queries.
- Clients SHOULD retry unanswered queries after connection closure; RFC 7766 specifies no retry algorithm. A server that discovers the session closed or interrupted MUST NOT attempt to send pending responses on it, though it MAY cache them.
RFC 8490 §5.2 replaces these inactivity and termination rules once a DNS Stateful Operations (DSO) session is established; DSO is not used in these ordinary DNS examples. RFC 7766 §9 discusses TCP Fast Open non-normatively: it can reduce reopening cost, but protected DNS must not accidentally send its queries in cleartext. This is not a retry-count, universal idle-timer, TLS or DSO implementation.
Read the RFC section ↗