appc / spec

App Container Specification and Tooling (archived, see https://github.com/rkt/rkt/issues/4024)
Apache License 2.0
1.26k stars 146 forks source link

spec: use TXT dns records for discovery #3

Open philips opened 9 years ago

philips commented 9 years ago

From @philips on December 8, 2014 21:3

@blalor said "I feel like there should be a DNS component to this, as well. Perhaps a TXT record?" in #210.

Lets discuss that topic here.

/cc @geekgonecrazy

Copied from original issue: coreos/rocket#242

miekg commented 9 years ago

I'm sorry, but regarding the length of TXT records you have it wrong: https://www.ietf.org/rfc/rfc1035.txt, section "3.3.14. TXT RDATA format"

TXT-DATA One or more <character-string>s.

Where <character-string>s. is defined as:

is a single length octet followed by that number of characters. is treated as binary information, and can be up to 256 characters in length (including the length octet).

And yes firewalls would drop larger packets, with the advent of DNSSEC this has become less and less (luckily).

And yes, existing types would work, but in the longer run a new RR type would work just so much better. It is easy to do and any nameserver support unknown RRs (https://tools.ietf.org/html/rfc3597) can support it.

b commented 9 years ago

No, I have it right. That 256 characters including the length octet? That's 255 character strings, just like I said. TXT-DATA is one OR MORE of those 255 character strings. The limit on the length of RDATA is 65535. The RDATA for a TXT RR is up to 65535 octets of 255 octet strings, just like I said. I did not use the pedantic terminology because it is unnecessary to this discussion.

There are still an unfortunately large number of those older devices dropping EDNS0 responses. The default image discovery mechanism should not rely on an extension we know to not yet be universal. Suggesting we layer on an additional requirement for both EDNS0 and unknown RRs is just asking for trouble.

Please quantify "would work so much better" given there are multiple IETF protocols that behave in exactly the way being proposed and which don't rely on anything but basic resolver behavior. If this is merely a question of personal aesthetics, then we can agree to disagree.

geekgonecrazy commented 9 years ago

Every dns provider i've tried limits it to 255 characters.. We can't just assume that because it can technically be done that it should.

If i'm not mistaken compatibility is the key here.

b commented 9 years ago

Limits a single TXT record in the zone file to 255 characters, right?

geekgonecrazy commented 9 years ago

Limits a single TXT record in the zone file to 255 characters, right?

Correct. I intentionally have avoided trying custom dns services run locally. Because not everyone is going to be running their own dns.

b commented 9 years ago

You may be misunderstanding. That is the single 255 byte string per entry part of what I said above. You can have multiple TXT records for the same label. That is actually required by SPF.

On Monday, March 2, 2015, Aaron Ogle notifications@github.com wrote:

Limits a single TXT record in the zone file to 255 characters, right?

Correct. I intentionally have avoided trying custom dns services run locally. Because not everyone is going to be running their own dns.

— Reply to this email directly or view it on GitHub https://github.com/appc/spec/issues/3#issuecomment-76830099.

geekgonecrazy commented 9 years ago

I apologize I articulated it poorly. But yes that is what I meant. They allow for multiple 255 byte strings, or multiple TXT records.

Either way. If its multiple chunks in one TXT record or multiple TXT records. Both are easier for then a new RR. Simply because they already exist and are widely used for this exact sort of thing.

If splitting it up into multiple records makes it easier for the DNS client to load. I say this should be the recommended approach.

geekgonecrazy commented 8 years ago

Any more thoughts on doing it using TXT? This has been stale for a while. I'd love to see this implemented.

jonboulle commented 8 years ago

This is still on the cards as something we might consider implementing, but work on discovery is a little stalled right now as we figure out the next steps for appc + cncf.

On Tue, Dec 1, 2015 at 11:40 AM, Aaron Ogle notifications@github.com wrote:

Any more thoughts on doing it using TXT? This has been stale for a while. I'd love to see this implemented.

— Reply to this email directly or view it on GitHub https://github.com/appc/spec/issues/3#issuecomment-161073677.

geekgonecrazy commented 8 years ago

@jonboulle perfect, I'll stay tuned. Thanks for the update!