多活高可用服务 MAS
多活高可用服务 MAS
- 最新动态
- 功能总览
- 产品介绍
- 计费说明
- 快速入门
-
用户指南
- 开始使用多活高可用服务
- 功能模块
- 命名空间
- 多活管理
- 应用管理
- 监控管理
-
工作流管理
- 工作流简介
- 工作流模板
- 创建工作流
- 编排工作流
- 导入工作流
-
工作流插件说明
- DRS灾备切换
- DRS检查RTO&RPO
- RDS实例读写设置
- RDS实例重启
- RDS实例创建备份
- DWS检查容灾任务
- DWS容灾操作
- DCS开启/关闭白名单
- OBS桶存量比较
- OBS跨区域复制任务设置
- OBS桶策略操作授权用户
- DNS添加记录集
- DNS删除记录集
- DNS公网域名记录集权重设置
- Smart Connect任务操作
- 人工卡点
- 等待
- AOM作业执行
- 混沌实验执行
- PerfTest测试任务启动/停止
- HTTP请求
- MAS多活管理切换/回切
- DDM实例创建备份
- DDM实例读写设置
- RDS实例指定用户读写设置
- RDS检查容灾复制状态
- RDS灾备实例升主
- RDS修改实例参数
- DRS任务操作
- DRS检查任务方向和状态
- RDS自动备份策略设置
- RDS检查实例备份信息
- DRS检查任务信息
- DRS数据级/对象级对比
- OpenGauss容灾操作
- OpenGauss检查容灾信息
- 执行工作流
- 查看工作流执行详情
- 编辑工作流
- 复制工作流
- 删除工作流
- 关注工作流
- 混沌工程
- 应用韧性Hub
- 凭证管理
- 事件监控
- 查看审计日志
- 权限管理
- 最佳实践
- 开发指南
- 常见问题
- 视频帮助
- 文档下载
- 通用参考
本文导读
展开导读
链接复制成功!
Redis配置示例
结合配置项说明,在配置文件或配置信息添加故障注入相关配置。
- 配置文件示例config_Redis_chaos.yaml
props: version: v1 appId: xxx monitorId: xxxx cloud: xxxx region: xxxxx azs: az1 etcd: address: xxx.xxx.xxx.xxx:xxxx apiVersion: v3 username: xxxx password: xxxx httpsEnable: false Redis: nearest: dc1 asyncRemoteWrite: retryTimes: 4 connectionPool: enable: true asyncRemotePool: persist: true threadCoreSize: 10 taskQueueSize: 5 persistDir: dataDir/ servers: dc1: hosts: xxx.xxx.xxx.xxx:xxxx password: xxxxxx type: normal# cluster, master-slave, normal cloud: xxxx region: xxxxx azs: az1 pool: maxTotal: 100 maxIdle: 8 minIdle: 0 maxWaitMillis: 10000 timeBetweenEvictionRunsMillis: 1000 dc2: hosts: xxx.xxx.xxx.xxx:xxxx, xxx.xxx.xxx.xxx:xxxx password: xxxxxx type: cluster# cluster, master-slave, normal cloud: xxxx region: xxxxx azs: az1 pool: maxTotal: 100 maxIdle: 8 minIdle: 0 maxWaitMillis: 10000 timeBetweenEvictionRunsMillis: 1000 routeAlgorithm: single-read-write# local-read-single-write, single-read-write, double-write active: dc1 chaos: active: true# 全局开关 默认false duration: 20 interval: 100 percentage: 100 delayInjection: active: true percentage: 75 timeMs: 1000 jitterMs: 500 errorInjection: active: true percentage: 20
- 配置信息
func RedisConfiguration() *config.Configuration { return &config.Configuration{ Props: &mas.PropertiesConfiguration{ Version: "v1", AppID: "xxx", MonitorID: "xxxx", Cloud: "xxx", Region: "xxxxx", Azs: "az1", }, EtcdConfig: &etcd.EtcdConfiguration{ Address: "xxx.xxx.xxx.xxx:xxxx", APIVersion: "v3", Username: "xxxx", Password: "xxxx", HTTPSEnable: false, }, RedisConfig: &config.RedisConfiguration{ Nearest: "dc1", AsyncRemoteWrite: &config.AsyncRemoteWrite{ RetryTimes: 4, }, ConnectionPoolConfig: &config.RedisConnectionPoolConfiguration{ Enable: true, }, AsyncRemotePoolConfiguration: &config.AsyncRemotePoolConfiguration{ Persist: true, ThreadCoreSize: 10, TaskQueueSize: 5, PersistDir: "dataDir/", }, Servers: map[string]*config.ServerConfiguration{ "dc1": { Hosts: "xxx.xxx.xxx.xxx:xxxx", Password: "xxxxxx", Type: "normal", Cloud: "xxxx", Region: "xxxx", Azs: "az1", ConnectionPool: &config.ServerConnectionPoolConfiguration{ MaxTotal: 100, MaxIdle: 8, MinIdle: 0, MaxWaitMillis: 10000, TimeBetweenEvictionRunsMillis: 1000, }, }, "dc2": { Hosts: "xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx", Password: "xxxxxx", Type: "cluster", Cloud: "xxxx", Region: "xxxx", Azs: "az1", ConnectionPool: &config.ServerConnectionPoolConfiguration{ MaxTotal: 100, MaxIdle: 8, MinIdle: 0, MaxWaitMillis: 10000, TimeBetweenEvictionRunsMillis: 1000, }, }, }, }, RouteAlgorithm: "single-read-write", Active: "dc1", Chaos: &mas.InjectionProperties{ Active: true, Duration: 20, Interval: 100, Percentage: 100, DelayInjection: &mas.DelayInjection{ Active: true, Percentage: 75, TimeMs: 1000, JitterMs: 500, }, ErrorInjection: &mas.ErrorInjection{ Active: true, Percentage: 20, }, }, } }
父主题: 使用指南