Updated on 2025-05-22 GMT+08:00

Dual-Region Solution

The following solution uses ECS as an example to describe the deployment architecture in dual regions.

Item

Solution

Redundancy

Deploy cloud service instances in HA mode, such as ELB, ECS, DCS, Kafka, RDS, and DDS instances.

Backup

Enable automated backup for RDS and DDS databases. When a data fault occurs, the latest backup can be used to restore data, meeting availability requirements.

DR

Deploy applications across AZs so that services can be automatically restored when an AZ is faulty. Enable master/standby and primary/standby DR across regions so that services can be quickly restored remotely when a region-level fault occurs.

Monitoring metrics and alarms

Monitor and check the service running status and success metrics, and an alarm is reported when a fault occurs. Monitor the load status and resource failover of ECS, DCS, Kafka, RDS, and DDS instances, and an alarm is reported when the load exceeds the threshold or the status is abnormal.

Auto scaling

For ECS instances, use ELB for fault detection and load balancing and add or remove ECS instances on demand based on the monitoring statistics, so as to enhance the application performance. For RDS for MySQL, change the instance type or add read-only nodes during maintenance based on the workload monitoring statistics.

Change error prevention

Use canary or blue-green deployment for software updates. The deployment is automatically completed and rolled back upon a fault.

Emergency recovery

Develop an emergency handling mechanism and designate related personnel to quickly make decisions and recover services. Provide solutions to common application and database problems as well as upgrade and deployment failures. Periodically perform drills to identify problems in a timely manner.

A typical deployment architecture is as follows:

The architecture has the following features:

  • The deployment architecture is layered with stateless applications and stateful databases or VMs.
  • A complete application system is deployed in each of the primary and standby regions with data synchronization. Cross-AZ HA in a region provides active-active capabilities across DCs in the same city. Data can be asynchronously synchronized between regions in real time. Master/standby and primary/standby DR is used to quickly restore services to another region when a region is faulty.
    • Access layer (external DNS servers and API gateways): It uses external DNS servers to resolve domain names. Service traffic is manually switched to another region if the current region becomes faulty.
    • Application layer (ELBs, application software, and VMs): ELBs detect faults and distribute loads. AS monitors load conditions and triggers automatic scaling. For stateful applications, SDRS facilitates cross-cloud VM data replication and DR failover. In addition, CBR is used for automated data backup.
    • Middleware layer: Redis and Kafka clusters are deployed across AZs for high availability.
    • Data layer: MySQL databases are deployed for high availability. DRS is used to implement cross-cloud database replication and DR failover. Data can be automatically backed up periodically to quickly restore services in the event of data loss. OBS also supports cross-region database replication.
  • The RDS database data is automatically backed up to OBS periodically to ensure that data can be quickly restored in the case of data loss.