创建了 redis 集群,7003、7004、7005 三个节点。 查看网络连接为什么会出现 6 个节点?
[root@iZ1mlxtcx2Z ~]# netstat -tpln |grep redis
tcp 0 0 192.168.201.127:17003 0.0.0.0:* LISTEN 19533/redis-server
tcp 0 0 192.168.201.127:17004 0.0.0.0:* LISTEN 19537/redis-server
tcp 0 0 192.168.201.127:17005 0.0.0.0:* LISTEN 19541/redis-server
tcp 0 0 192.168.201.127:7003 0.0.0.0:* LISTEN 19533/redis-server
tcp 0 0 192.168.201.127:7004 0.0.0.0:* LISTEN 19537/redis-server
tcp 0 0 192.168.201.127:7005 0.0.0.0:* LISTEN 19541/redis-server
[root@iZ1mlxtcx2Z ~]# ps -ef|grep redis
root 19533 1 0 May11 ? 00:10:06 redis-server 192.168.201.127:7003 [cluster]
root 19537 1 0 May11 ? 00:11:39 redis-server 192.168.201.127:7004 [cluster]
root 19541 1 0 May11 ? 00:06:04 redis-server 192.168.201.127:7005 [cluster]
root 29113 28971 0 09:25 pts/0 00:00:00 grep redis
1
cloverstd 2018-05-23 09:43:20 +08:00
哨兵吧
|
3
kemad 2018-05-23 09:53:19 +08:00
你这个是 tcp 端口侦听,不是进程。看 netstat 输出的最后一列,前面的数字才是 pid,只有三个进程。
本人对 redis 不熟。 |
4
defunct9 2018-05-23 10:51:46 +08:00
3 进程,6 个监听。无毛病啊
|
5
zts1993 2018-05-23 11:19:47 +08:00
redis cluster : redis 端口+10000 作为集群通信端口
结贴吧 |
6
yexiangyang 2018-05-23 11:42:24 +08:00
搭车 问一句 client list 里面怎么总是多一个客户端链接
|
7
yexiangyang 2018-05-23 11:47:54 +08:00
|
9
Jakesoft 2018-05-23 13:00:46 +08:00
昨天也恰好看到了,https://redis.io/topics/cluster-tutorial
> Every Redis Cluster node requires two TCP connections open. The normal Redis TCP port used to serve clients, for example 6379, plus the port obtained by adding 10000 to the data port, so 16379 in the example. |
10
hcymk2 2018-05-23 13:06:16 +08:00
@yexiangyang
cmd=info 估计服务器上是有 redis 运行状态的监控吧 |