Drain outstanding replies when zero is signalled
04TIMEOUT zero requests prompt closure. A client should stop adding queries while allowing outstanding responses to finish; missing option support has a different meaning.
Separate exchange: the query asked for keepalive, but the response omits it. Even after an earlier nonzero signal, the client follows base DNS-over-TCP guidance instead of silently retaining that old advertisement.
Source for this drawing: RFC 7828 · Read RFC section 3.2.2 ↗
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.
Zero asks for closure; missing support uses base TCP guidance.
- A client receiving TIMEOUT 0 SHOULD send no more queries on that connection and initiate closing as soon as all outstanding responses have arrived.
- A server SHOULD send zero when resources are too low for more keepalive sessions or it wants open connections closed. Either endpoint MAY close at any time to manage its own resources.
- If the client requested keepalive but the response lacks it, the client SHOULD assume the server does not support the option and follow RFC 7766. This also applies after an earlier successful keepalive exchange on the same connection.
The drain sequence assumes the connection remains available for the outstanding responses; it is not a guarantee against interruption. RFC 7766 recommends retrying unanswered queries after closure and specifies no retry algorithm. A missing option is not encoded TIMEOUT zero, and does not by itself require rejecting the DNS answer. The separate fallback example has no prior zero-close request.
Read the RFC section ↗