欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

2022-02-24influxdb集群的网络连接结构

时间:2023-04-19

目录

摘要:

集群节点分布:

端口划分:

meta节点日志中记录的加入集群的日志:

数据端口:

meta节点端口:

结论:


摘要:

通过influxdb端口的连接状态, 分析influxdb集群的网络拓扑结构

集群节点分布:

 192.168.58.128 192.168.58.131 192.168.58.132

DEBUG: addmeta metaAddr = localhost:8091, newNodeAddr = 192.168.58.128:8091 Added meta node 1 at 192.168.58.128:8091DEBUG: addmeta metaAddr = localhost:8091, newNodeAddr = 192.168.58.131:8091 Added meta node 3 at 192.168.58.131:8091DEBUG: addmeta metaAddr = localhost:8091, newNodeAddr = 192.168.58.132:8091 Added meta node 4 at 192.168.58.132:8091DEBUG: addData metaAddr = localhost:8091, newNodeAddr = 192.168.58.128:8088 add-data: EOFDEBUG: addData metaAddr = localhost:8091, newNodeAddr = 192.168.58.131:8088 Added data node 5 at 192.168.58.131:8088DEBUG: addData metaAddr = localhost:8091, newNodeAddr = 192.168.58.132:8088 Added data node 6 at 192.168.58.132:8088

root@localhost:~/work/influxdb-1.8.4# influxd-ctl showData Nodes:2 192.168.58.128:80885 192.168.58.132:80886 192.168.58.131:8088meta Nodes:1 192.168.58.128:80913 192.168.58.131:80914 192.168.58.132:8091

端口划分:

meta节点日志中记录的加入集群的日志:

DEBUG: services:meta:CreatemetaNode httpAddr = 192.168.58.128:8091, tcpAddr = 192.168.58.128:8089 ID= 1 ts=2022-02-24T12:31:57.354167Z lvl=info msg="Listening for signals" log_id=0ZrwJG9l000DEBUG: meta::handler::serveJoinCluster, peers = [192.168.58.128:8091] DEBUG: services:meta:CreateDataNode host = 192.168.58.128:8086, tcpHost = 192.168.58.128:8088 , ID=2 DEBUG: meta::handler::serveJoinCluster, peers = [192.168.58.128:8091] DEBUG: services:meta:CreatemetaNode httpAddr = 192.168.58.131:8091, tcpAddr = 192.168.58.131:8089 ID= 3 DEBUG: services:meta:CreatemetaNode httpAddr = 192.168.58.132:8091, tcpAddr = 192.168.58.132:8089 ID= 4 2022-02-24T21:16:13.968+0800 [INFO] raft-state: Node at 192.168.58.128:8089 [Follower]: peers=["192.168.58.128:8089", "192.168.58.131:8089", "192.168.58.132:8089"]2022-02-24T21:16:15.577+0800 [INFO] raft-state: Node at 192.168.58.128:8089 [Leader]: peers=["192.168.58.128:8089", "192.168.58.131:8089", "192.168.58.132:8089"]DEBUG: services:meta:CreateDataNode host = 192.168.58.132:8086, tcpHost = 192.168.58.132:8088 , ID=5 DEBUG: services:meta:CreateDataNode host = 192.168.58.131:8086, tcpHost = 192.168.58.131:8088 , ID=6

数据端口:

8086端口: http端口, 供客户端连接

8088端口: tcp端口, 数据节点间互联

root@localhost:~/work/influxdb-1.8.4# lsof -i :8086COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEinfluxd 430622 root 8u IPv6 3991221 0t0 TCP *:d-s-n (LISTEN)influxd 430622 root 11u IPv6 3993261 0t0 TCP localhost:d-s-n->localhost:46662 (ESTABLISHED)influx 430674 root 6u IPv6 3991274 0t0 TCP localhost:46662->localhost:d-s-n (ESTABLISHED)

root@localhost:~/work/influxdb-1.8.4# lsof -i :8088COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEinfluxd 430622 root 6u IPv6 3990238 0t0 TCP *:radan-http (LISTEN)influxd 430622 root 21u IPv6 4027211 0t0 TCP localhost.localdomain:radan-http->192.168.58.132:50816 (ESTABLISHED)influxd 430622 root 32u IPv6 4027233 0t0 TCP localhost.localdomain:radan-http->192.168.58.131:59344 (ESTABLISHED)

meta节点端口:

root@localhost:~/work/influxdb-1.8.4# lsof -i :8091COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEinfluxd-m 8183 root 7u IPv6 55596 0t0 TCP *:jamlink (LISTEN)influxd-m 8183 root 9u IPv6 52842 0t0 TCP localhost.localdomain:jamlink->localhost.localdomain:56166 (ESTABLISHED)influxd-m 8183 root 13u IPv6 58195 0t0 TCP localhost.localdomain:jamlink->192.168.58.131:55332 (ESTABLISHED)influxd-m 8183 root 16u IPv6 56797 0t0 TCP localhost.localdomain:jamlink->192.168.58.132:36260 (ESTABLISHED)influxd 8206 root 7u IPv4 53858 0t0 TCP localhost.localdomain:56166->localhost.localdomain:jamlink (ESTABLISHED)

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEinfluxd-m 8183 root 6u IPv6 55594 0t0 TCP *:8089 (LISTEN)influxd-m 8183 root 10u IPv4 58194 0t0 TCP localhost.localdomain:33318->192.168.58.131:8089 (ESTABLISHED)influxd-m 8183 root 12u IPv4 54176 0t0 TCP localhost.localdomain:39886->192.168.58.132:8089 (ESTABLISHED)influxd-m 8183 root 14u IPv4 58174 0t0 TCP localhost.localdomain:33298->192.168.58.131:8089 (ESTABLISHED)influxd-m 8183 root 15u IPv4 58179 0t0 TCP localhost.localdomain:39870->192.168.58.132:8089 (ESTABLISHED)

结论:  数据节点8086端口作为http协议供客户端使用 数据节点8088端口作为tcp端口用作各个数据节点连接

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。