RFC 7828 / START HERE
DNS idle timeout, before the details
DNS means Domain Name System; EDNS means Extension Mechanisms for DNS; TCP means Transmission Control Protocol. The edns-tcp-keepalive option signals an idle limit for an existing DNS TCP connection.
A DNS client asks a server for records such as a website’s address. This option lets the server say how long a TCP connection can remain idle, so it may be reused for another question.
The idea in one picture
Ask to keep C1
Read the idle limit
Reuse or close
A simplified picture of the idea; the chapters explain the actual mechanisms.
Why it exists
Reusable connections save setup work, while idle connections consume server resources. This RFC adds explicit timeout signalling to DNS over TCP, using EDNS options carried with DNS messages.
A familiar example
A server sends the value 600 in a response. Each unit is 100 milliseconds, so that means 60 seconds of idle time. A later value can replace it, and zero asks for closure after outstanding replies arrive. The connection can still close earlier; the signal adds no encryption.
Helpful background
You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.
What you’ll learn next
Begin with chapter one, or choose a topic.
- Encode the timeout optionEDNS(0), the Extension Mechanisms for DNS, carries options inside an OPT pseudo-record. The keepalive option carries a server-selected idle timeout for an existing TCP connection.→
- Offer persistence only on an eligible responseA DNS client sends a query; the server may reply with its current idle timeout. OPT support in that query gives the server room to signal the option.→
- Start idle time after the work is doneAn idle connection has no work left for that endpoint. The client honors the newest signalled timeout, rather than counting from initial connection setup.→
- Drain outstanding replies when zero is signalledTIMEOUT zero requests prompt closure. A client should stop adding queries while allowing outstanding responses to finish; missing option support has a different meaning.→
- Respect transport and resource boundariesThe option applies to a TCP session. UDP handling, intermediaries, routing changes and abusive clients limit how much persistence can be expected.→
This introduction explains RFC 7828 (2016). Read the original RFC ↗