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

Using DNS names in Config.AdvertiseAddr #162

Open
karsten42 opened this issue Sep 20, 2018 · 3 comments
Open

Using DNS names in Config.AdvertiseAddr #162

karsten42 opened this issue Sep 20, 2018 · 3 comments

Comments

@karsten42
Copy link

I am wondering why you cannot use a DNS name for the AdvertiseAddr in the config. Is there a reason for this? Would that mean have to do the name resolution myself before giving it to the memberlist config?

Here it expects that the AdvertiseAddr is an actual IP address:

memberlist/memberlist.go

Lines 369 to 373 in b195c8e

addr, port, err := m.transport.FinalAdvertiseAddr(
m.config.AdvertiseAddr, m.config.AdvertisePort)
if err != nil {
return fmt.Errorf("Failed to get final advertise address: %v", err)
}

@excieve
Copy link

excieve commented Jul 18, 2019

Also interested if there's a reason DNS name couldn't work for AdvertiseAddr? In a WAN setup would rather expose a load balancer than all the nodes to the remote. In our use case we don't really need to keep track of individual nodes, rather "clusters" of such nodes so exposing an LB endpoint should work unless I'm missing something.

@i0x71
Copy link

i0x71 commented May 26, 2020

Bump

@wubin1989
Copy link

@karsten42 I made a fork at https://github.com/unionj-cloud/memberlist that implemented the DNS name feature. I changed net.IP to string in many places along with some other changes. It works good in my use case. I think you can have a try.

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

4 participants