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

nsqd: expand DNS records for "service discovery" #646

Open
ekristen opened this issue Sep 10, 2015 · 12 comments
Open

nsqd: expand DNS records for "service discovery" #646

ekristen opened this issue Sep 10, 2015 · 12 comments

Comments

@ekristen
Copy link

In the age of service discovery where tools like Consul, SkyDNS, and other services exist to do service discovery via DNS because networks and IP address change, I think it would make sense for NSQ to take advantage of this.

This proposal is for anytime a DNS entry is given to an argument like -lookupd-tcp-address that nsq take all the records returned from the DNS query and make the additional connections automatically.

For example, if using consul and I provide -lookupd-tcp-address=nsqlookup.service.consul and the nsqlookup.service.consul has 3 IP addresses in the DNS record, nsqd should make 3 separate connections just as if -lookup-tcp-address had been given 3 times.

Thoughts?

@jehiah jehiah added the feature label Sep 10, 2015
@jehiah
Copy link
Member

jehiah commented Sep 10, 2015

@ekristen #601 is relevant to this conversation as that PR added the ability to dynamically configure nsqd lookup addresses via HTTP. That means it's now possible to write glue code that synchronizes nsqd lookupd settings dynamically with any other 3rd party discovery mechanism.

@jehiah
Copy link
Member

jehiah commented Sep 10, 2015

To clarify, our goal with #601 was to somewhat defer making a choice on supporting any specific service discovery methods as there is broad lack of consensus on a singular approach to do that. Instead we chose as a first step to expose the foundational capability that could be used to integrate with any discovery mechanism.

I'm not opposed to a path forward on built in support for (some) service discovery approaches. This is a good spot for discussion on that. Thoughts @mreiferson ?

@mreiferson
Copy link
Member

@jehiah yea, I agree. For example, implementing some DNS based resolution would be reasonably agnostic to the service discovery implementation as most expose some mechanism to deliver results in that way.

@ekristen
Copy link
Author

Well by expanding DNS it also just allows anyone who wants to use DNS, like with Route53 on AWS with a Private Zone to just setup a record that contains all nsqlookupd servers and viola. It doesn't necessarily have to be in the name of support "service discovery".

@mreiferson
Copy link
Member

@ekristen I think we agree 😁

@ekristen
Copy link
Author

Awesome @mreiferson +1

@mreiferson mreiferson changed the title Proposal: Take advantage of service discovery, expand DNS records nsqd:: expand DNS records for "service discovery" Oct 4, 2015
@mreiferson mreiferson changed the title nsqd:: expand DNS records for "service discovery" nsqd: expand DNS records for "service discovery" Oct 4, 2015
@harlow
Copy link

harlow commented Jan 15, 2016

+1 to DNS discovery. This would be great addition.

@harlow
Copy link

harlow commented Jan 22, 2016

I've created a "sidecar" app that runs alongside each nsqd instance in our cluster. It pings DNS for A records and then pushes the IP addresses to the /config/nsqlookupd_tcp_addresses endpoint.

https://github.com/harlow/nsqd-discovery

@mreiferson re: #708 I'll get a PR into nsqd docs that explains how to use the new config endpoints. They seem like a decent stop-gap until a decision is made whether or not to add DNS discovery to nsqd proper.

@mreiferson
Copy link
Member

@harlow this is great, I'll keep an eye out for that PR!

@harlow
Copy link

harlow commented Jan 23, 2016

@mreiferson does it make sense to add /config/nsqlookupd_tcp_addresses endpoint for nsqadmin too?

@mreiferson
Copy link
Member

probably :)

@fixe
Copy link

fixe commented Jun 24, 2016

+1 for adding the endpoint to nsqadmin.

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

Successfully merging a pull request may close this issue.

5 participants