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

Comments

Projects
None yet
5 participants
@danp
Copy link
Contributor

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

This comment has been minimized.

Copy link

commented Sep 15, 2016

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

@bradfitz

This comment has been minimized.

Copy link
Member

commented Sep 15, 2016

/cc @mdempsky

@bradfitz bradfitz added this to the Go1.8Maybe milestone Sep 15, 2016

@mdempsky

This comment has been minimized.

Copy link
Member

commented Sep 15, 2016

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

@captncraig

This comment has been minimized.

Copy link

commented Sep 15, 2016

not me.

@danp

This comment has been minimized.

Copy link
Contributor Author

commented Sep 15, 2016

I can do it, sure.

@gopherbot

This comment has been minimized.

Copy link

commented Sep 15, 2016

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

@captncraig

This comment has been minimized.

Copy link

commented Sep 15, 2016

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.

@gopherbot gopherbot closed this in a1bf203 Sep 17, 2016

@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.
You can’t perform that action at this time.