Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature to limit number of Answers returned #507

Open
nihn opened this issue Aug 2, 2017 · 5 comments
Open

Feature to limit number of Answers returned #507

nihn opened this issue Aug 2, 2017 · 5 comments

Comments

@nihn
Copy link

nihn commented Aug 2, 2017

Hello,

we use MesosDNS for loadbalancing some of our traffic (e.g. between real loadbalancers) inside the Mesos/Marathon cluster. We run into issue that often one of the loadbalancers has much more traffic than others.
This is caused by getaddrinfo system call behavior (forced by RFC3484) which sorts records got from MesosDNS and returns always same record. From documenation:

There are several reasons why the linked list may have more than one
addrinfo structure, including: the network host is multihomed,
accessible over multiple protocols (e.g., both AF_INET and AF_INET6);
or the same service is available from multiple socket types (one
SOCK_STREAM address and another SOCK_DGRAM address, for example).
Normally, the application should try using the addresses in the order
in which they are returned. The sorting function used within
getaddrinfo() is defined in RFC 3484; the order can be tweaked for a
particular system by editing /etc/gai.conf (available since glibc
2.5).

It would be nice to have feature to restrict number of answers returned by MesosDNS to one random record. Without it services started at the same time (which usually happens with Marathon when you restarts all of your application tasks at the same time) always use the same IP for other services they communicating with.

@jdef
Copy link
Contributor

jdef commented Aug 2, 2017 via email

@jdef
Copy link
Contributor

jdef commented Aug 2, 2017

xref #485

@mlowicki
Copy link

mlowicki commented Aug 8, 2017

@jdef any news on your side?

@jdef
Copy link
Contributor

jdef commented Aug 8, 2017

Not yet, stay tuned...

@jdef
Copy link
Contributor

jdef commented Oct 9, 2017

additional commentary re: libc implementations here http://www.zytrax.com/books/dns/ch9/rr.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants