Re:DNS Resolution: A Primer
by jlgaddis on Tuesday November 19, 2013 @08:48PM
(#6765866)
The "message compression" used in DNS messages is also quite unusual, compared to other protocols. It serves as a reminder that the DNS protocol was created at a time when it was desirable to minimize as much as possible the amount of bandwidth used (as opposed to today), e.g.:
[ Parent
| on HN ]
DNS compression is actually described in section 4.1.4 of IETF RFC 1035:
In order to reduce the size of messages, the domain system utilizes a
compression scheme which eliminates the repetition of domain names in a
message. In this scheme, an entire domain name or a list of labels at
the end of a domain name is replaced with a pointer to a prior occurance
of the same name.Even now it's worth doing all compressions possible, with as little CPU use as possible. With something like a DNS server a difference of one byte in the packet size can result in twice as much bandwidth used. At the lowest levels, it's packets, not bytes. Cross the limit for one packet, get two packets, twice as much of bandwidth.