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

Support DNS as the address gossiped out #21

Open
mitchellh opened this issue Oct 23, 2013 · 6 comments
Open

Support DNS as the address gossiped out #21

mitchellh opened this issue Oct 23, 2013 · 6 comments

Comments

@mitchellh
Copy link
Contributor

Memberlist chooses the first private IP. If we join from outside that cluster, we can't communicate with that Serf cluster. This is by design, but we also have no way to tell memberlist to choose to a public IP. We need to expose that.

@armon
Copy link
Member

armon commented Oct 24, 2013

I think this is two separate issues, and want to close the ticket. If you provide an explicit bind address it will use that address (instead of the first private IP). So that is not a bug. Supporting DNS should be filed as an enhancement.

@mitchellh
Copy link
Contributor Author

Fair enough, I'm going to rename the issue and we'll just keep this one since people are watching it.

@livid
Copy link

livid commented Jan 21, 2014

I'm trying to deploy Serf on our CDN system (with 100+ servers) as a new messaging system, with Encryption turned on. However, I have two issues:

  1. It seems that Serf prefer to use private IP, so that if I try to start Serf on our servers with only public IP, I got an error and have to specify public IP in -bind to make it start.
  2. Nodes are trying to connect each other via private IPs, but they're not in same datacenter.

Since I'll be using Puppet to deploy Serf to those servers, I guess I will need to render public IP addresses to configuration files.

Maybe we can have a section in docs about how to use Serf in cross datacenter scenarios.

@armon
Copy link
Member

armon commented Jan 21, 2014

@livid By default, if no bind address is provided to Serf it uses the first private IP it can find. This is for security reasons, to prevent Serf from unexpectedly running on a public IP.

If you want to run it over the public network or cross DC, you need to do the following:

  1. Specify public addresses using "-bind"
  2. Set "-profile=wan". This optimizes the internal timing values for a WAN instead of the LAN which is default
  3. Highly recommend setting an encryption key

That should be it! If you have any issues, please email the mailing list!

@patrickviet
Copy link
Contributor

+1, this would be an awesome feature.
I'm thinking about the AWS DNS that will either resolve to public or private depending where you are.

@c4milo
Copy link

c4milo commented Apr 17, 2014

it would be nice if it does not have to rely in a DNS server. The following could be a non-sense for Serf's current design as well as out of topic, but I really like the approach taken in Iris, where the networking is abstracted out from the user and you only care about the logical networks created through Iris.

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

No branches or pull requests

5 participants