背景
云数据库 Redis 支持多可用区部署,用户可以将其业务部署在多个可用区,提高系统的高可用能力。用户可以使用混沌演练平台提供的云数据库 Redis 主备节点不可用故障来模拟此类场景,以验证其业务系统的灾备能力以及整体高可用能力。
演练实施
步骤一:演练准备
一台云数据库 Redis 实例。
一台和 Redis 实例网络相通的 CVM 实例(用于登录 CRS 实例)。
步骤二:演练编排
1. 登录 混沌演练控制台,进入演练管理页面,单击新建演练,填写演练信息,选择演练目标云数据库 Redis 实例。
![](https://qcloudimg.tencent-cloud.cn/image/document/8d04deefc26103ceb4204efdf866aeec.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/8d04deefc26103ceb4204efdf866aeec.png)
2. 单击左下角添加演练动作,选择主备节点不可用,然后单击下一步。
![](https://qcloudimg.tencent-cloud.cn/image/document/7153c5cdcdfc9766059216232117aefa.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/7153c5cdcdfc9766059216232117aefa.png)
3. 为故障动作配置动作参数信息,然后单击确定。
![](https://qcloudimg.tencent-cloud.cn/image/document/e95a11a4ddf540c6c506ac5c41cdadf7.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/e95a11a4ddf540c6c506ac5c41cdadf7.png)
4. 动作参数配置完成之后,单击下一步。确定所有配置之后,单击提交,完成演练创建。
![](https://qcloudimg.tencent-cloud.cn/image/document/aacaed1ef6118e89684cc54c0c8a6a5b.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/aacaed1ef6118e89684cc54c0c8a6a5b.png)
步骤三:执行演练
1. 使用 CVM 尝试登录云数据库 Redis 实例。
![](https://qcloudimg.tencent-cloud.cn/image/document/8dc91cbb2aef338b859bf1ec37ddc8a8.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/8dc91cbb2aef338b859bf1ec37ddc8a8.png)
2. 进入演练详情,单击执行,开始执行演练。
![](https://qcloudimg.tencent-cloud.cn/image/document/2e81d5baa29930faafd64460f11fc51a.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/2e81d5baa29930faafd64460f11fc51a.png)
3. 执行故障动作,待故障注入后,重新使用 CVM 实例登录云数据库 Redis 实例。
![](https://qcloudimg.tencent-cloud.cn/image/document/40f852d6d84a97be070fd2cf79ad6110.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/40f852d6d84a97be070fd2cf79ad6110.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/d2b6c9bc7a74282c2aa88f4b1f0777da.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/d2b6c9bc7a74282c2aa88f4b1f0777da.png)
4. 执行恢复动作,并再次使用 CVM 连接云数据库 Redis。Redis 恢复正常连接。
![](https://qcloudimg.tencent-cloud.cn/image/document/a220862a8d5b53497ccb708da3ab2d27.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/a220862a8d5b53497ccb708da3ab2d27.png)