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

Manage Multiples Nameservers #29

Closed
khena opened this Issue Jul 6, 2015 · 2 comments

Comments

Projects
None yet
4 participants
@khena
Copy link

khena commented Jul 6, 2015

Hi,

First, thank you for this container ! Nice & easy :)

In production, we use multiples dns servers. I see the dnsdock actually manage only one dns external server (google by default).

I tried to read the go script, and i found this code :
In the function handleOrForward, when you call the Exchange function of the dns client library,
you read directly the config structure, with the nameserver.

I sugget to :

  • split the nameserver string with comma separator into a array (or something equivalent in go)
  • count the nameservers
  • while err != nil and all the servers have not yet been tested
    • randomize and take a another nameserver
    • try it :)
    • go out the 'while' or take another nameserver
  • clear the array!

Maybe the array must be created on constructor and release at the end (use a error server list in this case)

I prefer use the random function to balance the charge, but one by one is nice too :)

-> only one server, nothing change!
-> with multiples servers, we use the same syntax than skydns/skydock

thank you for your attention :)

ps : sorry i'm not a golang dev, i can't do it myself !

@tonistiigi

This comment has been minimized.

Copy link
Collaborator

tonistiigi commented Jul 7, 2015

Yes, makes sense to add this.

@febbraro

This comment has been minimized.

Copy link
Contributor

febbraro commented Sep 20, 2016

This was already implemented in another commit (3219e79), but was not fully baked. I added a PR to fix it here: #73

@aacebedo aacebedo closed this Sep 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment