• 周六. 8月 20th, 2022

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

mysql架构~Orch生产环境部署具体参数

admin

11月 28, 2021

{
一 全局配置
“Debug”: true,
“EnableSyslog”: false,
“ListenAddress”: “:3000”,
ORCH_MYSQL探测配置
“MySQLTopologyUser”: “orchestrator”,
“MySQLTopologyPassword”: “123456”,
“MySQLTopologyCredentialsConfigFile”: “”,
“MySQLTopologyUseMutualTLS”: false,
二 ORCH_MYSQL本地配置
“MySQLOrchestratorHost”: “127.0.0.1”,
“MySQLOrchestratorPort”: 3336,
“MySQLOrchestratorDatabase”: “orchestrator”,
“MySQLOrchestratorUser”: “orchestrator”,
“MySQLOrchestratorPassword”: “123456”,
“MySQLOrchestratorCredentialsConfigFile”: “”,
“MySQLOrchestratorUseMutualTLS”: false,
“MySQLConnectTimeoutSeconds”: 1,
“MySQLTopologyReadTimeoutSeconds”: 3,
三 ORCH_DETECT
“DefaultInstancePort”: 3336,
“InstancePollSeconds”: 3,
“UnseenInstanceForgetHours”: 240,

四 ORCH_DISCOVERY配置
“MySQLDiscoveryReadTimeoutSeconds”: 3,
“DiscoverByShowSlaveHosts”: true,
“ReasonableReplicationLagSeconds”:10,
“SnapshotTopologiesIntervalHours”: 0,
“InstanceBulkOperationsWaitTimeoutSeconds”: 10,
“SkipBinlogServerUnresolveCheck”: true,
“SkipMaxScaleCheck”:true,
“VerifyReplicationFilters”: false,
“ReasonableMaintenanceReplicationLagSeconds”: 20,
“CandidateInstanceExpireMinutes”: 1440,
“SlaveLagQuery”: “”,

“MySQLHostnameResolveMethod”: “”,
五 WEB配置
“AuditLogFile”: “”,
“AuditToSyslog”: false,
“ReadOnly”: false,
“AuthenticationMethod”: “”,
“HTTPAuthUser”: “”,
“HTTPAuthPassword”: “”,
“AuthUserHeader”: “”,
“PowerAuthUsers”: [
“*”
],
“ClusterNameToAlias”: {
“127.0.0.1”: “test suite”
},

“DetectPromotionRuleQuery”: “”,
“PhysicalEnvironmentPattern”: “”,
“DetachLostReplicasAfterMasterFailover”: true,
“DetectSemiSyncEnforcedQuery”: “SELECT 0 AS semisync FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM performance_schema.global_variables WHERE VARIABLE_NAME = ‘rpl_semi_sync_master_wait_no_slave’ AND VARIABLE_VALUE = ‘ON’) UNION SELECT 1 FROM DUAL WHERE EXISTS (SELECT 1 FROM performance_schema.global_variables WHERE VARIABLE_NAME = ‘rpl_semi_sync_master_wait_no_slave’ AND VARIABLE_VALUE = ‘ON’)”,
“ServeAgentsHttp”: false,
“AgentsServerPort”: “:3001”,
“AgentsUseMutualTLS”: false,
“UseMutualTLS”: false,
“URLPrefix”: “”,
“StatusEndpoint”: “/api/status”,
“StatusSimpleHealth”: true,
“StatusOUVerify”: false,
“AgentPollMinutes”: 60,
“UnseenAgentForgetHours”: 6,
“StaleSeedFailMinutes”: 60,
“SeedAcceptableBytesDiff”: 8192,

六 匿名GTID配置,非GTID环境
“AutoPseudoGTID”:true,
“PseudoGTIDPatternIsFixedSubstring”: true,
“PseudoGTIDMonotonicHint”: “asc:”,
“BinlogEventsChunkSize”: 10000,
“SkipBinlogEventsContaining”: [],
“ReduceReplicationAnalysisCount”: true,
七 Recovry锁定时间
“FailureDetectionPeriodBlockMinutes”: 60,
“RecoveryPeriodBlockSeconds”: 31,
八 Recovery锁定集群
“RecoverMasterClusterFilters”: [“*”],
“RecoverIntermediateMasterClusterFilters”: [“*”],
九 高可用切换方案.此种是等待relaylog
“ApplyMySQLPromotionAfterMasterFailover”: true,-relaylog
“DelayMasterPromotionIfSQLThreadNotUpToDate”: true,核心
“FailMasterPromotionIfSQLThreadNotUpToDate”: false,核心
“CoMasterRecoveryMustPromoteOtherCoMaster”: true,
“DetachLostSlavesAfterMasterFailover”: true,
“PreventCrossDataCenterMasterFailover”: false,
“MasterFailoverDetachSlaveMasterHost”: false,
“MasterFailoverLostInstancesDowntimeMinutes”: 0,
“PostponeSlaveRecoveryOnLagMinutes”: 0,
十切换流程的接口脚本
“OnFailureDetectionProcesses”: [
“echo ‘? Detected {failureType} on {failureCluster}. Affected replicas: {countSlaves}’ >> /tmp/recovery.log”
],
“PreGracefulTakeoverProcesses”: [
“echo ‘? Planned takeover about to take place on {failureCluster}. Master will switch to read_only’ >> /tmp/recovery.log”
],
“PreFailoverProcesses”: [
“echo ‘? Will recover from {failureType} on {failureCluster}’ >> /tmp/recovery.log”
],
核心负责VIP的切换
“PostMasterFailoverProcesses”: [
“sudo -u orchestrator /usr/local/orchestrator/failover.sh {failureType} {failureClusterAlias} {failedHost} {successorHost} >> /tmp/orc_failover.log”
],
“PostFailoverProcesses”: [
“echo ‘? (for all types) Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Successor: {successorHost}:{successorPort}’ >> /tmp/recovery.log”
],
“PostUnsuccessfulFailoverProcesses”: [
“echo ‘? >> /tmp/recovery.log'”
],
“PostIntermediateMasterFailoverProcesses”: [
“echo ‘? Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Successor: {successorHost}:{successorPort}’ >> /tmp/recovery.log”
],
“PostGracefulTakeoverProcesses”: [
“echo ‘? Planned takeover complete’ >> /tmp/recovery.log”
],

十一 raft配置
“RaftEnabled”: true,
“BackendDB”: “mysql”,
“RaftBind”: “IP1”,
“RaftDataDir”: “/var/lib/orchestrator”,
“DefaultRaftPort”: 10008,
“RaftNodes”: [
“IP1”,
“IP2”,
“IP3”
],
十二 consul配置
“ConsulAddress”: “”,
“ConsulAclToken”: “”
}

发表回复

您的电子邮箱地址不会被公开。