当前位置:网站首页>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
边栏推荐
- Design e-commerce seckill system
- PS2 handle-1 "recommended collection"
- Esp8266 becomes client and server
- 股票开户要如何办理呢?办理手机开户安全吗
- Sm2246en+ SanDisk 15131
- CesiumJS 2022^ 源码解读[6] - 三维模型(ModelExperimental)新架构
- 1175. Disposition des nombres premiers / échange de doigts II 104. Nombre de permutations
- shell 同时执行多任务下载视频
- Summer Challenge [FFH] harmonyos mobile phone remote control Dayu development board camera
- Fastjson V2 simple user manual
猜你喜欢
![CesiumJS 2022^ 源码解读[6] - 三维模型(ModelExperimental)新架构](/img/ce/519778cd731f814ad111d1e37abd10.png)
CesiumJS 2022^ 源码解读[6] - 三维模型(ModelExperimental)新架构

The programmer's girlfriend gave me a fatigue driving test

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

To tell you the truth, ThreadLocal is really not an advanced thing
![[NLP] [textcnn] text classification](/img/bb/c8fd9f1ed458a88a17b8d5c70d9ce2.png)
[NLP] [textcnn] text classification

未来十年世界数字化与机器智能展望

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

Software supply chain security risk pointing North for enterprise digitalization and it executives

Redis - 01 缓存:如何利用读缓存提高系统性能?

New trends of China's national tide development in 2022
随机推荐
hot-fix、cherry-pick怎么提
Detailed explanation of conv2d -- use in arrays and images
6-1 exploit -ftp exploit
Solution to the conflict between unique index and logical deletion
How to edit special effects in VR panorama? How to display detailed functions?
Explain kubernetes backup and recovery tools velero | learn more about carina series phase III
什么是SRM系统,如何规范公司内部采购流程
Introduction to machine learning compilation course learning notes lesson 2 tensor program abstraction
Fastjson V2 simple user manual
如何关闭一个开放的DNS解析器
PS2 handle-1 "recommended collection"
Is it safe to open a stock account of Huatai Securities online?
206 page Shanghai BIM Technology Application and development report 2021
In 2022, the latest JCR officially released the list of the latest global impact factors (top 600)
conv2d详解--在数组和图像中的使用
异步过渡方案—Generator
The programmer's girlfriend gave me a fatigue driving test
Summer Challenge [FFH] harmonyos mobile phone remote control Dayu development board camera
The difference between union and union all in MySQL
Solutions to errors in installing OpenSSL for CentOS 6.3 x64 PHP 5.2.6 extensions