44 ms·
You can put in multiple queries in a single packet. It's just that the response header would be ambiguous (a NODATA status could refer to any one of your querie
by lucb1e 8y ago
You can put in multiple queries in a single packet. It's just that the response header would be ambiguous (a NODATA status could refer to any one of your queries) and therefore not even a minority of clients or servers support this.
It's right there in the protocol, we just need to figure out how to signal NODATA/NXDOMAIN/SERVFAIL/... for each individual query.
- amaccuish 8y agoDidn't know that thank you! I guess it should be more compact though. Sending multiple complete queries would almost certainly need TCP, not sure the browsers would like that. Then again I think we're getting to the point where DNS should now be considered a mostly TCP protocol.
- lucb1e 8y agoWith name compression, asking for multiple records wouldn't be that much work. The format is dead simple: http://www.tcpipguide.com/free/t_DNSMessageHeaderandQuestionSectionFormat-2.htm http://www.tcpipguide.com/free/t_DNSMessageHeaderandQuestion... A packet would look something like: A IN 38:mydomainnameislongerthanyourdomainname 3:com AAAA IN <2 bytes pointer> CNAME IN <2 bytes pointer> SRV IN <2 bytes pointer> So 43 bytes for the name (41 bytes data, 2 length fields), plus 4 bytes for the type and class, and 6 bytes (type, class pointer) for each additional type. Even if you would already consider 200 bytes to be a lot of overhead, that would fit `floor(200/6)`=33 question records, more than I think we'd ever use. (Sure, the exist more, but currently we only query for A and AAAA. The overhead of that, when using the current DNS format but using multiple queries in one packet, is a grand total of 6 bytes.) Pointer format: http://www.tcpipguide.com/free/t_DNSNameNotationandMessageCompressionTechnique-3.htm http://www.tcpipguide.com/free/t_DNSNameNotationandMessageCo...
- JdeBP 8y agoIt is time for https://news.ycombinator.com/item?id=503120 https://news.ycombinator.com/item?id=503120 . (-: