It's not who you are underneath, it's what you do that defines you

Brick walls are there for a reason :they let us prove how badly we want things

有赞高可用消息中间件 HA NSQ 集群实践

1.启动一个etcd节点
[root]# ./etcd --enable-v2=true

2.设置openfile最大数不小于10w
 [root]#  ulimit -n 100000

3.以配置文件的方式启动,nsqlookup和nsqd 使用contritab 下面的配置文件,更改下面几个字段,且 rpc-port两个服务需要不一致。

broadcast_interface = // 监听的网卡名称(ip a查询)
cluster_id = // 集群id, 用于区分不同集群
cluster_leadership_addresses = // etcd集群地址, 需要支持V2 api (http://127.0.0.1:2379)
rpc_port = "12345"  // 用于集群内部通信
log_dir=
data_path=


4.分别启动服务

[root]# ./nsqlookupd -config=nsqlookupd.cfg
[root]# ./nsqd -config=nsqd.cfg
[root]# ./nsqadmin --lookupd-http-address=ip:4161 
(部署一个节点即可)

最后的效果如下:

 

 

 

posted @ 2021-10-15 16:11  gbat  阅读(260)  评论(1编辑  收藏  举报

It's not who you are underneath, it's what you do that defines you

Brick walls are there for a reason :they let us prove how badly we want things