Comments (24)
From @weisd on May 7, 2017 4:56
输出了一下runtime.Stack, 调用了未定义的ctx s.ctx.nsqlookupd.coordinator.IsMineLeader()
coordinator在哪里赋值?@absolute8511
from nsq.
是不是没有配置cluster_id
和cluster_leadership_addresses
from nsq.
From @liushuchun on May 8, 2017 2:14
可能是cluster 集群没配置,我最后配置好,很好用。
On Mon, May 8, 2017 at 10:12 AM, Vincent Lee [email protected]
wrote:
是不是没有配置cluster_id 和cluster_leadership_addresses
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
absolute8511/nsq#22 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEUpbkBb6UsQAWIMODHITiavz56KQgD4ks5r3noGgaJpZM4NTACC
.
from nsq.
From @weisd on May 8, 2017 2:45
这是我的docker-composer
version: '2'
services:
nsqlookupd:
image: nsqio/nsq
command: /nsqlookupd
ports:
- "4160:4160"
- "4161:4161"
nsqd:
image: nsqio/nsq
command: /nsqd --lookupd-tcp-address=nsqlookupd:4160
ports:
- "4150:4150"
- "4151:4151"
nsqadmin:
image: nsqio/nsq
command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
ports:
- "4171:4171"
@absolute8511 @liushuchun cluster_id, cluster_leadership_addresses 应该写在哪?
from nsq.
nsqlookupd和nsqd的command里面 加上 --cluster_id
和 --cluster_leadership_addresses
可以的
from nsq.
From @weisd on May 8, 2017 3:10
cluster_leadership_addresses 这个值写什么?
from nsq.
From @weisd on May 8, 2017 3:14
是不是得起一个etcd?
from nsq.
From @liushuchun on May 8, 2017 3:15
是的,要配置一个etcd的。
On Mon, May 8, 2017 at 11:14 AM, weisd [email protected] wrote:
是不是得起一个etcd?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
absolute8511/nsq#22 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEUpbnC7liK9AdwuwVL0HzVje6vF-IPAks5r3oisgaJpZM4NTACC
.
from nsq.
From @liushuchun on May 8, 2017 3:31
您可以看看这个我之前的提问。
from nsq.
From @liushuchun on May 8, 2017 3:36
@absolute8511 hi,李帅,想问一下你的微信是多少?有些原理想问清楚一些,我们最近在调研你这个znsq.我也希望能够说服team用咱们国人的开源项目。
from nsq.
From @weisd on May 8, 2017 3:38
弄个交流群吧
from nsq.
@liushuchun @weisd 我们正在整理关于实现细节和原理性的文档, 后面都会放在github的doc目录下面. 有任何问题和疑问都可以在github开issue讨论, 这样更方便整理成文档供后面的参考.
from nsq.
From @liushuchun on May 8, 2017 6:6
@absolute8511 安装的文档我可以写一份?因为之前安装还是积累了一些经验?
from nsq.
@liushuchun 可以的, 欢迎, 你开个issue, 然后提交pull request即可
from nsq.
From @liushuchun on May 8, 2017 6:9
@absolute8511 好的,这个我来搞。
from nsq.
From @weisd on May 8, 2017 6:10
@liushuchun 弄个docker-compose啊,我的用docker还没运行起来 - -
from nsq.
From @liushuchun on May 8, 2017 6:29
@absolute8511 有几个问题,想咨询一下.
1.设置数量syncDisk:2000或者0都能保证安全?
2.副本设置2个还是3个性价比最好
3.坏掉一个点之后,能不能继续生产消费?
4.坏掉一个点,之前的数据会不会删除。坏掉之后,数据会迁移一个新的节点吗?如果会,那如果坏掉的节点恢复,之前的数据会自动删除吗?
5.某个点数据都删除,还能不能正常工作。
6.测试,放进去多少条消息,消费多少天。
7.消息重新再处理。保证每个消息都被处理到。
from nsq.
From @liushuchun on May 8, 2017 8:21
@weisd 好的。
from nsq.
- syncdisk 小于等于1表示每条都刷盘, 对应其他情况, 可能后台每隔几秒刷盘或者超过指定syncdisk条消息刷盘. 另外主备切换的时候强制刷盘, 因此在多个副本的情况下, 即使syncdisk=2000, 只要不是所有副本同时挂掉, 数据都是安全的. 一个副本挂掉, 其他副本感知到后会立即刷盘保证数据可靠性.
- 副本数越多可用性和可靠性更高, 但是性能略有下降以及空间占用增多. 可以根据不同的topic设置不同的副本数, 达到最佳性价比.
- 坏掉的节点如果导致可用副本数少于一半则不能继续生产消费. 也就是说replictor=3时, 挂一台任然可以继续读写, 挂2台停止读写.
- 挂了一个节点后, 如果一段时间没有起来, 集群会启动自动数据迁移, 保证数据副本满足配置值. 坏掉的节点恢复后, 会看负载是否均衡决定是否把数据迁移回去.
- 停掉一台, 或者异常挂掉一台, 不管数据是否删除, 集群内的多副本topic都可以正常工作. 为了防止没有副本的topic数据丢失, 可以使用下线节点功能彻底下线数据节点, 集群会自动把该节点的所有数据迁移走(包括单副本的topic).
6, 7 没明白你的问题
from nsq.
From @liushuchun on May 8, 2017 8:41
@absolute8511 好的,谢谢您的耐心仔细的回复,实在是太棒了,6,7可以无视。谢谢,谢谢。
from nsq.
From @weisd on May 9, 2017 16:1
今晚看了一下源码, NSQLookupd.opts.RPCPort 这个配置, options, flag, 都没有默认值, 导致coordinator没有赋值, 我用docker也没有加这个配置- -
@absolute8511 给NSQLookupd.opts.RPCPort 加个默认值 吧
from nsq.
panic的问题确实是coordinator没有初始化, 因为默认不使用coordinator, 所以rpc端口默认值为空, 不过panic的问题已经fix了, 在没有启用coordinator时只是返回错误. 如果要使用建议的配置文件可以参考contrib目录下的模板
from nsq.
From @liushuchun on May 16, 2017 8:8
@absolute8511 李文大帅好,go-sdk我看了一下,好像没有java-sdk那么完备?数据publish的时候,不需要先查nsqlookup吗?还是说用原来的go-sdk即可?
from nsq.
有个goroutine在定期查nsqlookup的
from nsq.
Related Issues (20)
- 服务端组提交,也会遇到消息丢失的场景吧
- 普通消费下如何保证一个 topic 下多个 partition 能够均等的获得消息? HOT 2
- NSQ HA 1.12.4部署(Key not found (/NSQMetaData/%!s(int64=2)/Topics)) HOT 1
- select the least load factor node HOT 2
- 关于延迟消息的一些疑问 HOT 3
- 怎么发送延迟消息? HOT 1
- Is there any plan to upgrade the etcd dependency to support etcd v3 API HOT 2
- topic在集群里的迁移时间 HOT 2
- consumer.Stop() 阻塞问题 HOT 2
- 能否开放topic创建,处于使用场景考虑,强制关闭topic创建并不是一件友好的事情 HOT 2
- 有序topic的消费吞吐量太低,有什么办法可以提高吗? HOT 3
- 急求!怎么限制topic未读消息大小?? HOT 4
- HandleMessage回调函数消费的问题 HOT 1
- 已使用etcd了为什么不去掉lookup呢? HOT 2
- 有没有编译基本可以用的docker镜像 HOT 1
- 有windows版的吗? HOT 1
- Why are there two log options
- 问题 HOT 1
- 请教关于NSQ Topic的问题 HOT 5
- nsqd:向后移动时间后停止发送消息 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsq.