Deploy

配置文件

# [Member]
# Unique node name
name: "milvus-test-btxdkfxhclwm-etcd-1"

# Data storage directory
data-dir: "/mnt/data/etcd"

# Inter-cluster communication listening address
listen-peer-urls: "http://0.0.0.0:9054"

# Client access listening address
listen-client-urls: "http://0.0.0.0:6054"

# Exposed address for inter-cluster communication
initial-advertise-peer-urls: "http://172.17.39.182:9054"

# Exposed address for client access
advertise-client-urls: "http://172.17.39.182:6054"

# Disable v2 version (Boolean)
enable-v2: false

# Log configuration
log-level: "info"
log-outputs: ["/home/vdb/log/etcd.log"]

# Snapshot and WAL management
max-snapshots: 5
max-wals: 5

# [Clustering]
# Peer addresses of all nodes in the cluster
initial-cluster: "milvus-test-btxdkfxhclwm-etcd-1=http://172.17.39.182:9054,milvus-test-btxdkfxhclwm-etcd-2=http://172.17.40.139:9054,milvus-test-btxdkfxhclwm-etcd-3=http://172.17.39.183:9054"

# Unique token for the cluster
initial-cluster-token: "milvus-test-btxdkfxhclwm"

# Cluster state (new/existing)
initial-cluster-state: "new"

# Heartbeat and Election timeout (Integers)
heartbeat-interval: 1000
election-timeout: 10000

1 配置模板

etcd.conf.tpl

2 查看状态

2.1 health

2.2 status

  • IS LEADER: 节点 172.17.39.182 (etcd-1) 被选为了 Leader,其余两个是 Follower。这是集群正常工作的核心标志。

  • RAFT TERM (2): 选主任期为 2。这通常意味着集群经历过一次成功的选举(第一次是初始化,第二次选出了当前的 Leader)。

  • RAFT INDEX (10): 三个节点的 Raft 索引值完全一致(都是 10),说明数据在所有节点间是强一致同步的。

  • DB SIZE (20 kB): 数据库刚刚初始化,占用非常小,一切正常。

2.3 读写

Last updated