当前位置:网站首页>NATs cluster deployment
NATs cluster deployment
2022-06-30 23:52:00 【Shuai dada's structural road】
nats Cluster deployment
explain : The cluster is deployed on three machines , Catalogue of each machine 、 Installation package 、 The configuration name is the same , But configure the of each node ip Different from routing , Pay attention to the corresponding changes , If deployed on one machine , You need to change the port of each node , Avoid port conflicts
1. download
NATS Server The latest version is v2.8.4 edition , There are three binary distribution packages , See :https://github.com/nats-io/nats-server/releases
- nats-server-v2.8.4-darwin-amd64.tar.gz for Mac Version of
- nats-server-v2.8.4-linux-amd64.tar.gz for Linux x64 Version of
- nats-server-v2.8.4-linux-arm.tar.gz for Linux ARM Version of
2. decompression
mkdir /biz-code/nats/ -p
cd /biz-code/nats/
wget https://github.com/nats-io/nats-server/releases/download/v2.8.4/nats-server-v2.8.4-linux-amd64.tar.gz
tar xf nats-server-v2.8.4-linux-amd64.tar.gz
cd nats-server-v2.8.4-linux-amd64/
3. Add the configuration
vim gnastd.conf
Node one :
port: 4333
http: 6333
net: 0.0.0.0
cluster {
host: 172.16.0.15
port: 8333
# authorization {
# user: root
# password: 123456
# timeout: 1
# }
routes = [
nats-route://172.16.0.18:8333
nats-route://172.16.0.24:8333
]
}
debug: true
trace: true
log_file: "/biz-code/nats/gnatsd-4222.log"
# max_connections
max_connections: 100
# Duration the server can block on a socket write to a client. Exceeding the
# deadline will designate a client as a slow consumer.
# Test for problems
write_deadline: "2s"
Node two :
port: 4333
http: 6333
net: 0.0.0.0
cluster {
host: 172.16.0.18
port: 8333
# authorization {
# user: root
# password: 123456
# timeout: 1
# }
routes = [
nats-route://172.16.0.15:8333
nats-route://172.16.0.24:8333
]
}
debug: true
trace: true
log_file: "/biz-code/nats/gnatsd-4222.log"
# max_connections
max_connections: 100
# Duration the server can block on a socket write to a client. Exceeding the
# deadline will designate a client as a slow consumer.
# Test for problems
write_deadline: "2s"
Node three :
port: 4333
http: 6333
net: 0.0.0.0
cluster {
host: 172.16.0.24
port: 8333
# authorization {
# user: root
# password: 123456
# timeout: 1
# }
routes = [
nats-route://172.16.0.18:8333
nats-route://172.16.0.15:8333
]
}
debug: true
trace: true
log_file: "/biz-code/nats/gnatsd-4222.log"
# max_connections
max_connections: 100
# Duration the server can block on a socket write to a client. Exceeding the
# deadline will designate a client as a slow consumer.
# Test for problems
write_deadline: "2s"
There is a problem : The account and password for cluster communication authentication are written in the configuration file , However, in the process of debugging, the error has been reported and the authentication has failed , Then I annotated it , The account and password specified by parameters at startup
4. start-up
./nats-server --config gnastd.conf --user root --pass 123456
5. Check the log
cd /biz-code/nats
tail -f gnatsd-4222.log
If it doesn't appear in the log ERR, It is estimated that the startup is successful , In addition, after debugging, you can set the debug: true Option comment
边栏推荐
- 35 giant technology companies jointly form the meta universe standard Forum Organization
- Mysql database query optimization
- 女朋友说:你要搞懂了MySQL三大日志,我就让你嘿嘿嘿!
- How to open a stock account? Is it safe to open a mobile account
- To tell you the truth, ThreadLocal is really not an advanced thing
- Warmup preheating learning rate "suggestions collection"
- 1175. 质数排列 / 剑指 Offer II 104. 排列的数目
- E-commerce seckill system
- 6-1 exploit -ftp exploit
- Understand target detection in one article: r-cnn, fast r-cnn, fast r-cnn, Yolo, SSD "suggestions collection"
猜你喜欢

SSM integration process (integration configuration, function module development, interface test)

Design e-commerce seckill system

深入理解 Jetpack Compose 内核:SlotTable 系统

ABAQUS 2022 latest edition - perfect realistic simulation solution

5g smart building solution 2021

Gateway service gateway

Why did kubernetes win? The changes in the container circle!

One revolution, two forces and three links: the "carbon reduction" road map behind the industrial energy efficiency improvement action plan

What does project management really manage?

Online customer service chat system source code_ Beautiful and powerful golang kernel development_ Binary operation fool installation_ Attached construction tutorial
随机推荐
基金管理人公司治理和风险管理
需求评审,测试人员应该发挥怎样的价值?两分钟让你不再懵逼
Solve arm_ release_ ver of this libmali is ‘g2p0-01eac0‘,rk_ so_ Ver is' 4 ', libgl1 mesa dev will not be installed, and there are unsatisfied dependencies
Which is better, server rental or hosting services in the United States?
唯一性索引与逻辑删除冲突问题解决思路
Analysis of 8253a register
Never use redis expired monitoring to implement scheduled tasks!
Asynchronous transition scenario - generator
Development of wireless U-shaped ultrasonic electric toothbrush
flutter - sort List排序
Warmup preheating learning rate "suggestions collection"
What is SRM system and how to standardize the internal procurement process of the company
When we look at the industrial Internet, we always look at it from the opposite of the consumer Internet
shell 同时执行多任务下载视频
Bridge emqx cloud data to AWS IOT through the public network
五分钟搞懂探索式测试
Redis - 01 缓存:如何利用读缓存提高系统性能?
Redis - 01 cache: how to use read cache to improve system performance?
leetcode 474. Ones and zeroes (medium)
C /platform:anycpu32bitpererrored can only be used with /t:exe, /t:winexe and /t:appcontainerexe