consul 集群 各个server间数据不同步问题!


各位大神好:
小弟最近部署了consul的集群,集群中有四个server;
peers.json 配置如下:
["..140.11:8300","..8.12:8300","..8.11:8300","..140.12:8300"]
其中140.12 为leader;

从网上很多文章说 consul集群间存在数据强一致性,是采用raft算法,数据从leader流向Follower;
但在实际使用中,各个服务器间的数据并没有进行同步 数据存放在 services目录中

consul启动命令:
consul agent -server -config-dir=/etc/consul/ -data-dir=/home/htdocs/ -bind=..140.12
启动后使用join 加入到集群中:
consul join “ip”

如下是 集群中leader 的consul info信息:

请大神们帮忙看看 如何能够做到consul 集群中 server间的数据同步
agent:
check_monitors = 141
check_ttls = 0
checks = 156
services = 157
build:
prerelease =
revision = 0c7ca91c
version = 0.5.0
consul:
bootstrap = false
known_datacenters = 1
leader = true
server = true
raft:
applied_index = 11185635
commit_index = 11185635
fsm_pending = 0
last_contact = 0
last_log_index = 11185635
last_log_term = 1895
last_snapshot_index = 11176168
last_snapshot_term = 1895
num_peers = 3
state = Leader
term = 1895
runtime:
arch = amd64
cpu_count = 32
goroutines = 1438
max_procs = 1
os = linux
version = go1.4.2
serf_lan:
encrypted = false
event_queue = 0
event_time = 518
failed = 0
intent_queue = 0
left = 0
member_time = 8
members = 6
query_queue = 0
query_time = 1
serf_wan:
encrypted = false
event_queue = 0
event_time = 1
failed = 0
intent_queue = 0
left = 0
member_time = 2
members = 1
query_queue = 0
query_time = 1
已邀请:

Casgy

赞同来自:


不同步具体指?

tuxknight

赞同来自:


consul是保证自己存储的数据具有强一致性,并不能为你同步服务器上的数据。

要回复问题请先登录注册