Region及同城多活方案►客户案例►Region是什么►Region有什么►同城多活推荐方案Agenda案例一►某视频客户►负载均衡►允许WebService单节点宕机►单可用区内的高可用读/写DNSWebService#1LoadBalancerWebService#2MySQLMasterMySQLSlaveCache读写GD1MySQLSlave►某互金客户►负载均衡►同城双活►依赖DNS►依赖于隧道案例二ReplicationReplicaReplicaReplicaReplicaMasterDNSLB#2WebService#3WebService#4DataService读LBLB#1WebService#1WebService#2DataService读LB写IPSecPEK3APEK3B抽象架构(南北向)DNSDataServiceFrontGateWebServiceCacheServicePythonGoPHPNodeJSLBNgnixApacheRedisMemcachedMySQLPlusMongoDBRandonDB►单可用区内的高可用是不够的►光纤总是会被挖断的►点对点隧道►隧道的性能损失►DNS延迟难点►Region/区域:由多个物理独立的AvailabilityZone可用区互联组成►可用区:一个独立部署的资源集合。如PEK3B/SH1A/GD2A►可用区内:0.2ms►Region可用区间:1.5msRegion是什么?GLOBALRegion(PEK3)AvailabilityZone(PEK3B)AvailabilityZone(PEK3C)AvailabilityZone(PEK3D)Region(GD2)AvailabilityZone(GD2A)GD2BGD2CRegion(SH1)AvailabilityZone(SH1A)SH1BSH1C►VPC►172.16.0.0/16►…Region级VPC可用区PEK3C可用区(PEK3D)可用区PEK3BPEK3区域VPCRegion级VxNet►VxNet►VxNet中主机可在不同可用区运行►172.16.1.0/24►172.16.2.0/24►…可用区PEK3C可用区(PEK3D)可用区PEK3BPEK3区域VPC+VxnetRegion级LBCluster/EIP可用区PEK3C可用区(PEK3D)可用区PEK3BPEK3区域负载均衡集群LoadBalancerClusterVPC+VxnetNode#1Node#3Node#2Node#4►LBCluster:►LB节点同时在不同可用区运行►EIP►需绑定到Region级LBClusterRegion级VIP►VIP►可跨可用区漂移可用区PEK3C可用区(PEK3D)可用区PEK3BPEK3区域VPC+Vxnet172.16.2.253/32172.16.2.253/32172.16.2.253/32Region级APP►APP►MySQLPlus/RadonDB/MongoDB/RedisCluster等可用区PEK3C可用区(PEK3D)可用区PEK3BPEK3区域VPC+VxnetMasterReplicaReplica►Region级VPC►Region级VxNet:VxNet中主机可在不同可用区运行►Region级LBCluster:LB节点同时在不同可用区运行►Region级EIP:需绑定到Region级LBCluster►Region级VIP:可跨可用区漂移►Region级APP:MySQLPlus/RadonDB/MongoDB/RedisCluster等优势Region支持VPCVxnet/SubnetLBClusterVIPRDSMongo友商A友商B主备切换30秒友商C主备切换10秒友商DQingCloud同城多活推荐方案——Region架构可用区PEK3C可用区(PEK3D)可用区PEK3BPEK3区域负载均衡集群LoadBalancerClusterWebServer#1WebServer#2WebServer#NWebServer#4WebServer#3WebServer集群数据服务层数据服务层数据服务层读写VIPMySQLSlaveMySQLMasterMySQLSlaveRedisRedis读/写读/写读/写读写VIP读写VIPRedisVPC+Vxnet同步同步无需GRE/IPSec隧道、强一致性、读无可扩展性►需要构建同城双活/多活方案时►需要构建同城灾备方案时►需要构建两地三中心容灾方案时►同城多可用区的主机之间需要简洁高效地互联时RegionorNotRegion►高可用RegionorNotRegion►低延迟VS.同城多活推荐方案——Region架构无需GRE/IPSec隧道、强一致性、读写分离、读有可扩展性可用区PEK3C可用区PEK3D可用区PEK3BPEK3区域WebServer#1WebServer#2WebServer#NWebServer#4WebServer#3WebServer集群数据服务层数据服务层数据服务层读MongoDBSecondaryMongoDBPrimaryMongoDBSecondary读/写读写写VPC+Vxnet同步同步负载均衡集群LoadBalancerCluster同城灾备推荐方案——Region架构无需专线或隧道,冷存储归档可用区PEK3C可用区PEK3D可用区PEK3BPEK3区域WebServer#1WebServer#2WebServer#4WebServer#3WebServer集群数据服务层数据服务层读MongoDBSecondaryMongoDBPrimary读/写写VPC+Vxnet同步负载均衡集群LoadBalancerCluster冷存储归档Thankyou.cipher@yunify.com