当前位置:网站首页>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
边栏推荐
- New trends of China's national tide development in 2022
- HP 惠普笔记本电脑 禁用触摸板 在插入鼠标后
- Combining online and offline, VR panorama is a good way to transform furniture online!
- 1175. 質數排列 / 劍指 Offer II 104. 排列的數目
- Is it safe to choose mobile phone for stock trading account opening in Hangzhou?
- Mysql database query optimization
- composer
- How do it outsourcing resident personnel position their pain points?
- 如何使用 DataAnt 监控 Apache APISIX
- Detailed explanation of conv2d of pytorch
猜你喜欢

Makefile notes (Yiwen Institute makefile)

唯一性索引与逻辑删除冲突问题解决思路

Fh6908a negative pole turn off synchronous rectification analog low voltage drop diode control IC chip tsot23-6 ultra low power rectifier 1W power consumption < 100ua static replacement mp6908

conv2d详解--在数组和图像中的使用

一次革命、两股力量、三大环节:《工业能效提升行动计划》背后的“减碳”路线图

Shell multitasking to download video at the same time

206 page Shanghai BIM Technology Application and development report 2021

QQmlApplicationEngine failed to load component qrc:/main. qml:-1 No such file or directory

Combining online and offline, VR panorama is a good way to transform furniture online!

Analysis of 8253a register
随机推荐
Fastjson V2 simple user manual
VR panorama adds contrast function to make the display of differentiation effect more intuitive!
206页上海BIM技术应用与发展报告2021
Asynchronous transition scenario - generator
Development of wireless U-shaped ultrasonic electric toothbrush
"Paddle + camera" has become a "prefabricated dish" in the AI world, and it is easier to implement industrial AI quality inspection
Solutions to errors in installing OpenSSL for CentOS 6.3 x64 PHP 5.2.6 extensions
Combining online and offline, VR panorama is a good way to transform furniture online!
Gateway service gateway
Why did kubernetes win? The changes in the container circle!
未来十年世界数字化与机器智能展望
How to distinguish between platform security and online hype? What are the stop loss techniques for online speculation?
How do I open a stock account on my mobile phone? In addition, is it safe to open a mobile account?
Analysis of 8253a register
Code de conduite pour la vente de fonds et la gestion de l'information
conv2d详解--在数组和图像中的使用
Fund clients and sales agencies
Advanced mathematical modeling
Query points in MATLAB Delaunay triangulation
1. crawler's beautifulsoup parsing library & online parsing image verification code