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

how to replicate or synchronize messages between nsqd automatically? #981

Closed
gzliudan opened this issue Jan 5, 2018 · 2 comments
Closed
Labels

Comments

@gzliudan
Copy link

gzliudan commented Jan 5, 2018

How to ensure high availability of nsqd when anyone nsqd is offline, and prevent message loss ? Can one topic is existed in all nsqd? Can one message is saved in all nsqd?

@ploxiln
Copy link
Member

ploxiln commented Jan 5, 2018

Nope, nsqd currently does help you with this. If you lose an nsqd, you lose the messages that were only on that nsqd. http://nsq.io/overview/features_and_guarantees.html#messages-are-not-durable-by-default

What nsqd does do, is avoid any messages from being lost or even slowed-down on all other nsqd instances.

A common pattern is to use nsq_to_file to save a copy of all messages from a separate channel to hourly "stream log" files. This way, all messages should end up in a "stream log" very quickly (less than one second usually) so there is a very small window where that message could be lost. If an nsqd instance hard-crashes and important messages were not consumed from some channels, the last few minutes or hours of messages could be re-sent manually based on the "stream log".
http://nsq.io/deployment/topology_patterns.html#persistence

@mreiferson
Copy link
Member

Also see #510

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

3 participants