mailing list of musl libc
 help / color / mirror / code / Atom feed
* Would love to see reconsideration for domain and search DNS keywords
@ 2015-09-04 17:11 Andy Shinn
  2015-09-04 17:56 ` Szabolcs Nagy
  2015-09-04 18:04 ` Rich Felker
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shinn @ 2015-09-04 17:11 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 937 bytes --]

I'm writing the wonderful musl project today to open discussion about the
future possibility of DNS search and domain keyword support. We've been
using musl libc (by way of Alpine Linux) for new development of
applications as containers that discover each other through DNS and other
software defined networking.

In particular, we are starting to use applications like SkyDNS, Consul, and
Kubernetes, all of which rely on local name resolution in some way using
search paths. Many users of the Alpine Linux container image have also
expressed their desire for this feature at
https://github.com/gliderlabs/docker-alpine/issues/8.

On the functional differences between glibc page, the domain and search
keyword "Support may be added in the future if there is demand". So please
consider this request an addition to whatever demand for the feature
already exists.

Thank you for your time and great work on the musl libc project!

-Andy

[-- Attachment #2: Type: text/html, Size: 1148 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Would love to see reconsideration for domain and search DNS keywords
  2015-09-04 17:11 Would love to see reconsideration for domain and search DNS keywords Andy Shinn
@ 2015-09-04 17:56 ` Szabolcs Nagy
  2015-09-04 18:04 ` Rich Felker
  1 sibling, 0 replies; 3+ messages in thread
From: Szabolcs Nagy @ 2015-09-04 17:56 UTC (permalink / raw)
  To: musl

* Andy Shinn <andy.shinn@gmail.com> [2015-09-04 12:11:36 -0500]:
> I'm writing the wonderful musl project today to open discussion about the
> future possibility of DNS search and domain keyword support. We've been
> using musl libc (by way of Alpine Linux) for new development of
> applications as containers that discover each other through DNS and other
> software defined networking.
> 
> In particular, we are starting to use applications like SkyDNS, Consul, and
> Kubernetes, all of which rely on local name resolution in some way using
> search paths. Many users of the Alpine Linux container image have also
> expressed their desire for this feature at
> https://github.com/gliderlabs/docker-alpine/issues/8.
> 
> On the functional differences between glibc page, the domain and search
> keyword "Support may be added in the future if there is demand". So please
> consider this request an addition to whatever demand for the feature
> already exists.
> 

i think it was discussed previously

http://www.openwall.com/lists/musl/2014/04/30/7
http://www.openwall.com/lists/musl/2014/05/04/20
http://www.openwall.com/lists/musl/2014/06/01/2

as you can see from the last thread not
everybody wants the search domains.

> Thank you for your time and great work on the musl libc project!
> 
> -Andy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Would love to see reconsideration for domain and search DNS keywords
  2015-09-04 17:11 Would love to see reconsideration for domain and search DNS keywords Andy Shinn
  2015-09-04 17:56 ` Szabolcs Nagy
@ 2015-09-04 18:04 ` Rich Felker
  1 sibling, 0 replies; 3+ messages in thread
From: Rich Felker @ 2015-09-04 18:04 UTC (permalink / raw)
  To: musl

On Fri, Sep 04, 2015 at 12:11:36PM -0500, Andy Shinn wrote:
> I'm writing the wonderful musl project today to open discussion about the
> future possibility of DNS search and domain keyword support. We've been
> using musl libc (by way of Alpine Linux) for new development of
> applications as containers that discover each other through DNS and other
> software defined networking.
> 
> In particular, we are starting to use applications like SkyDNS, Consul, and
> Kubernetes, all of which rely on local name resolution in some way using
> search paths. Many users of the Alpine Linux container image have also
> expressed their desire for this feature at
> https://github.com/gliderlabs/docker-alpine/issues/8.
> 
> On the functional differences between glibc page, the domain and search
> keyword "Support may be added in the future if there is demand". So please
> consider this request an addition to whatever demand for the feature
> already exists.
> 
> Thank you for your time and great work on the musl libc project!

I think this is a reasonable request. I'll look into it more.

One property I do not want to break is deterministic results, so when
a search is performed, if any step of the search ends with an error
rather than a positive or negative result, the whole lookup needs to
stop and report the error rather than falling back. Falling back is
not safe and creates a situation where DoS can be used to control
which results are returned.

While it would be possible to parallelize the search while serializing
the results (i.e. waiting to accept a result from the second query
until the first query finished with a negative result), I think the
consensus during the last round of discussion of this topic was that
the complexity cost is too great and the benefit too small. Ideally,
the first query should always succeed, anyway.

I also have a few questions:

1. Do you need multiple search items, or just a single domain? Any
   setup with multiple searches necessarily has suboptimal performance
   because ndots is not sufficient to make the right initial choice of
   query. If you do need this functionality, a unioning proxy dns
   server may be a better option than resolv.conf domain search; it
   would give much better performance.

2. For your intended applications, is there a need to support ndots>1?
   Such configurations are generally not friendly to applications that
   expect to be able to resolve normal internet domain lookups, and
   performance for such lookups will be very bad (because the search
   domains first have to fail).

3. The glibc behavior is just to swap the order of search when the
   query string has >=ndots dots in it, but would it be acceptable
   never to try the search domains at all in this case? That would
   yield much better performance for nxdomain results and avoid
   unexpected positive results due to weird subdomains existing in
   your search domain (e.g. a wildcard for *.us.example.com would
   cause *.us to wrongly resolve for non-existant .us domains).

Rich


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-04 18:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-04 17:11 Would love to see reconsideration for domain and search DNS keywords Andy Shinn
2015-09-04 17:56 ` Szabolcs Nagy
2015-09-04 18:04 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).