3 ms·
From the spec: "NUM imposes no limit on the number of records in a set but some DNS server and client implementations may have difficulties processing very larg
by sybercecurity 6y ago
From the spec:
"NUM imposes no limit on the number of records in a set but some DNS server and client implementations may have difficulties processing very large record sets."
There are still some places were packet size is an issue in DNS - mostly over IPv6. This was a big issue with DNSSEC first started being deployed. Not so much now, but I've still seen instances where large DNS responses get dropped over IPv6 for MTU issues. 1260 is the safe limit for MTU size most of the time even if they advertise a higher limit.
- elliottinvent 6y agoThanks for your input. We've put character efficiency at the very top of our priorities for this reason. We can fit a lot of structured data in ~450 bytes (to stay under original 512 limit) if the record uses a module.
- fanf2 6y agoYou are right that it is wise to keep DNS response sizes less than 1280 bytes if you want to fit in UDP. But the DNS can support responses of up to 65535 bytes over TCP, which servers are required to support. https://tools.ietf.org/html/rfc7766 https://tools.ietf.org/html/rfc7766
- reificator 6y ago> * But the DNS can support responses of up to 65535 bytes over TCP, which servers are required to support* Requirements are only as effective as their enforcement...
- elliottinvent 6y agoInterestingly, Google Cloud DNS has a fixed limit of 1012 characters per resource record (counting the quote marks that separate fixed length 255 char TXT strings). They claim you can have 10,000 resource records in a resource record set, so over 10mb of data.
- fanf2 6y agoGolly! Well, the minimum practical RR size is 2 bytes for the name (a compression pointer), 2x2 bytes for class and type, 4 bytes for TTL, 2 bytes for length, and some data, e.g. 4 bytes for an A record: total, 16 bytes. So you can't fit more than about 4k records in a DNS response. It is actually possible to have a zone with an RRset much bigger than that, and it will transfer successfully with AXFR or IXFR, and you can make the RRset bigger or smaller with UPDATE - but you won't be able to query for it... unless the server has some nonstandard shenanigans for returning partial data, as many of them do.