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

net: resolv.conf rotate option captured but not used #17126

Closed
danp opened this issue Sep 15, 2016 · 7 comments
Closed

net: resolv.conf rotate option captured but not used #17126

danp opened this issue Sep 15, 2016 · 7 comments

Comments

@danp
Copy link
Contributor

danp commented Sep 15, 2016

The resolv.conf rotate option is captured when reading config but is not used by the Go stub resolver when querying.

Linux's resolv.conf(5) says:

rotate sets  RES_ROTATE in _res.options, which causes round-robin selection of name‐
       servers from among those listed.  This has the effect of spreading the  query
       load  among  all listed servers, rather than having all clients try the first
       listed server first every time.

cc @captncraig

@captncraig
Copy link

We noticed this caused an imbalance on the load our dns servers were handling. Would be really nice if the flag were honored.

@bradfitz
Copy link
Contributor

/cc @mdempsky

@bradfitz bradfitz added this to the Go1.8Maybe milestone Sep 15, 2016
@mdempsky
Copy link
Member

Seems worth supporting to me. Were either of you planning to prepare a CL for this?

@captncraig
Copy link

not me.

@danp
Copy link
Contributor Author

danp commented Sep 15, 2016

I can do it, sure.

@gopherbot
Copy link

CL https://golang.org/cl/29233 mentions this issue.

@captncraig
Copy link

If I were implementing this, I would consider just incrementing an atomic int at the beginning of tryOneName and using that as an offset for my iteration.

@golang golang locked and limited conversation to collaborators Sep 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants