README.md 1.62 KB

yoho.switch

有货故障切换脚本

1. 主可用区从az1切换到az2

1.1 流量切换到az2

1)AZ1公网流量、内网流量切换到AZ2

2)AZ2公网流量切换到AZ2

1.2 数据库切换 + 流量切换到副可用区(AZ2)

需要进行切换的数据库域名:

domain record az1 master az2 slave
yohoops.org. write.cms 10.66.0.99 10.66.106.11
yohoops.org. write.orders 10.66.0.170 10.66.106.13
yohoops.org. write.passport 10.66.0.105 10.66.106.8
yohoops.org. write.shops 10.66.0.213 10.66.106.3
yohoops.org. write.uic 10.66.6.136 10.66.106.12
yohoops.org. write.yohood 10.66.0.170 10.66.106.13
yohoops.org. write1.orders 10.66.0.57 10.66.106.6
yohoops.org. write1.promotion 10.66.0.57 10.66.106.6
yohoops.org. write2.orders 10.66.0.81 10.66.106.9
yohoops.org. write2.promotion 10.66.0.81 10.66.106.9
yohoops.org. write3.orders 10.66.0.98 10.66.106.15
yohoops.org. write3.promotion 10.66.0.98 10.66.106.15
yohoops.org. write4.orders 10.66.0.121 10.66.106.16
yohoops.org. write4.promotion 10.66.0.121 10.66.106.16

将所有可用区的dns server (az1, az2, az3) 的 上表 write.* 域名切换到 az2 slave列中所示

1.3 Reload cobar server的 配置

Author Information

chunhua.zhang@yoho.cn