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

Question Involving one topic being spread across NSQds #1185

Closed
spacehash opened this issue Sep 9, 2019 · 3 comments
Closed

Question Involving one topic being spread across NSQds #1185

spacehash opened this issue Sep 9, 2019 · 3 comments
Labels

Comments

@spacehash
Copy link

I have a question involving an NSQ topology that I can't find an answer for anywhere.

My use case is a distributed network with about 10 servers. Each server will have an instance of NSQ, and one "master" will have an instance of NSQLookup and NSQAdmin. Data will be entered into topics by web crawlers in Docker containers spun up by Kubernetes.

My question is, due to how I intend for Kubernetes to work, it is undefined which server will have which crawler - and one server can be running two different crawlers at the same time (different crawlers will input information into different topics).

How will this work? When I want to request data from one topic, how will NSQLookup decide which NSQ instance to pull from, given the topic is spread across multiple NSQ instances?

I apologize if this is a trivial question, or if it has been already asked.

@spacehash
Copy link
Author

update - i've referenced #1078 and #980, but still stuck.

@ploxiln
Copy link
Member

ploxiln commented Sep 9, 2019

You can ask general questions on the "google group" mailing list: https://groups.google.com/forum/#!forum/nsq-users

A topic can exist on multiple nsqd, and this is common. When a consumer process uses nsqlookupd to find a topic, it gets all nsqd which have that topic, and connects to them all. The consumer process continues to poll nsqlookupd (by default every 30 seconds I think) and if the topic appears on a new nsqd the consumer process will soon find out.

@ploxiln
Copy link
Member

ploxiln commented Sep 9, 2019

see https://nsq.io/overview/design.html#eliminating-spofs

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

No branches or pull requests

2 participants