d2iq-archive / mesos-dns

DNS-based service discovery for Mesos.
https://mesosphere.github.com/mesos-dns
Apache License 2.0
483 stars 137 forks source link

Prefixing with underscore can make a DNS component exceed 63 chars #522

Open MikeWillCook opened 6 years ago

MikeWillCook commented 6 years ago

After supporting RFC1123 the limit of 63 chars is default, but when an underscore is prefixed for some records (e.g., port SRV records) they then can become too long and fail to query. It appears any time an underscore is prefixed the name length must be potentially truncated back to 63 chars.

For example, this would be a valid length of 63 chars without the underscore:

# dig _port0.longapplicationname-1234567890123456789012345678901234567890123._tcp.marathon.mesos

But this fails:

# dig _port0._longapplicationname-1234567890123456789012345678901234567890123._tcp.marathon.mesos
dig: '_longapplicationname-1234567890123456789012345678901234567890123._tcp.marathon.mesos' is not a legal name (label too long)