当前位置:网站首页>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
边栏推荐
- 让企业数字化砸锅和IT主管背锅的软件供应链安全风险指北
- Pycharm useful shortcut keys
- 电商秒杀系统
- KubeVela 1.4:让应用交付更安全、上手更简单、过程更透明
- 五分钟搞懂探索式测试
- Development of wireless U-shaped ultrasonic electric toothbrush
- 需求评审,测试人员应该发挥怎样的价值?两分钟让你不再懵逼
- New trends of China's national tide development in 2022
- 1175. 質數排列 / 劍指 Offer II 104. 排列的數目
- Cesiumjs 2022 ^ source code interpretation [6] - new architecture of modelempirical
猜你喜欢
![[fundamentals of wireless communication-13]: illustrated mobile communication technology and application development-1-overview](/img/1d/62e55f1b5445d7349ec383879f4275.png)
[fundamentals of wireless communication-13]: illustrated mobile communication technology and application development-1-overview

Makefile notes (Yiwen Institute makefile)

Shell multitasking to download video at the same time

Development of wireless U-shaped ultrasonic electric toothbrush

Wordpress blog uses volcano engine veimagex for static resource CDN acceleration (free)

MIT doctoral dissertation optimization theory and machine learning practice

让企业数字化砸锅和IT主管背锅的软件供应链安全风险指北

什么是SRM系统,如何规范公司内部采购流程
![Cesiumjs 2022 ^ source code interpretation [6] - new architecture of modelempirical](/img/ce/519778cd731f814ad111d1e37abd10.png)
Cesiumjs 2022 ^ source code interpretation [6] - new architecture of modelempirical

Detailed explanation of conv2d -- use in arrays and images
随机推荐
leetcode 474. Ones and zeroes (medium)
Error when starting PHP: [pool www] cannot get uid for user '@php_ fpm_ [email protected]’
Bridge emqx cloud data to AWS IOT through the public network
KubeVela 1.4:让应用交付更安全、上手更简单、过程更透明
HP notebook disable touchpad after mouse is inserted
E-commerce seckill system
如何使用 DataAnt 监控 Apache APISIX
Five minutes to understand the exploratory test
ABAQUS 2022 software installation package and installation tutorial
In depth understanding of jetpack compose kernel: slottable system
Matlab saves triangulation results as STL files
Fund clients and sales agencies
CTFSHOW框架复现篇
One revolution, two forces and three links: the "carbon reduction" road map behind the industrial energy efficiency improvement action plan
How to mention hot fix and cherry pick
MaxPool2d详解--在数组和图像中的应用
Flitter - sort list sort
LVM snapshot: backup based on LVM snapshot
5G智慧建筑解决方案2021
1175. prime number arrangement / Sword finger offer II 104 Number of permutations