5. Resource Record Sets
A Resource Record Set (RRSet) is the set of all Resource Records (RRs) with the same NAME, CLASS, and TYPE. For example, the set of MX records for a domain is an RRSet. The set of A records for a domain is another RRSet.
A zone may contain RRs of the same name, class, and type, which are treated as a single RRSet, but which have different TTLs. This is a problem, as the RRSet is treated as a single entity, and the TTLs of the individual RRs must be the same.
The following are the rules for handling RRSets:
5.1. Sending RRs from an RRSet
When a server is sending an RRSet in a reply, it must send all the RRs in the RRSet. If the server is sending a partial RRSet (for example, due to message size limits), it must set the TC bit (see section 9).
5.2. TTLs of RRs in an RRSet
The TTL of all RRs in an RRSet must be the same. If a server receives an RRSet with differing TTLs, it must use the TTL of the RR with the lowest TTL as the TTL of the RRSet. This is a change from RFC1035, which required all RRs in an RRSet to have the same TTL.
Note that this is a change from the previous edition of this document, which stated that the TTL of an RRSet was undefined if the TTLs of the RRs in the RRSet were not all the same.
5.3. DNSSEC Special Cases
DNSSEC [RFC2065] introduces some special cases for RRSet handling. In particular, the SIG RRs that cover an RRSet must have the same TTL as the RRSet they cover. This is required so that the SIG RRs and the RRSet they cover are cached and expired together.
5.4. Receiving RRSets
When a server receives an RRSet, it must check that all the RRs in the RRSet have the same TTL. If they do not, it must use the lowest TTL as the TTL of the RRSet.
A resolver must not cache an RRSet with a TTL of zero. That is, an RRSet with a TTL of zero must not be cached.
5.5. Sending RRSets (reprise)
When a server is sending an RRSet in a reply, it must send all the RRs in the RRSet. If the server is sending a partial RRSet (for example, due to message size limits), it must set the TC bit (see section 9). The server must not split an RRSet across multiple messages unless the TC bit is set, and the client must not reassemble an RRSet from multiple messages unless the TC bit is set.