Skip to content

[配置]cluster

jamie12221 edited this page Nov 29, 2020 · 1 revision

集群配置

{
    "name":"c0",
	"clusterType": "MASTER_SLAVE",
	"heartbeat": {
		"heartbeatTimeout": 1000, //心跳超时值,毫秒
		"maxRetry": 3, //心跳重试次数
		"minSwitchTimeInterval": 300,//最小主从切换间隔,毫秒
		"slaveThreshold": 0 // mysql binlog延迟值
	},
	"maxCon": 2000,
	"readBalanceType": "BALANCE_ALL",
	"switchType": "SWITCH"
}

c0.cluster.json

{集群名字}.cluster.json 保存在clusters文件夹

clusterType

SINGLE_NODE:单一节点

MASTER_SLAVE:普通主从

GARELA_CLUSTER:garela cluster

switchType

NOT_SWITCH:不进行主从切换

SWITCH:进行主从切换

Clone this wiki locally