All Products
Search
Document Center

High-availability architecture on the cloud - Technical Solutions - Alibaba Cloud

High-availability architecture on the cloud

Reliable service delivery determines the quality of service you provide to your customers and is the foundation of business growth. However, systems inevitably face various failure risks. The core of high availability (HA) design is to eliminate any single point of failure, ensuring your system remains operational even when individual components fail. This guide addresses the fundamental needs of businesses moving to the cloud, explaining how to build a robust, layered high-availability architecture and helping you develop a systematic understanding of HA design principles.

Intended customers

Businesses with high-concurrency workloads

Organizations that require rapid, elastic scaling and flexible management

Enterprises with strict requirements for service continuity and data integrity

Business stability challenges

In the early stages of business development, a single-node architecture is a common deployment model that meets basic needs. This setup typically consists of one server and a single-node database. However, this simple architecture presents several inherent risks:

Reliability and stability

If the single node fails, the entire business system becomes unavailable. This is the most significant and critical risk of a single-node architecture, which lacks resilience features such as service redundancy and automatic failover.

Performance and elasticity

The application's capacity is limited by the performance of a single node, creating a bottleneck. Scaling up can be expensive, time-consuming, and disruptive to service.

Operations and management

Performing maintenance or upgrades on the single node can lead to service downtime. Each standalone machine has its own Internet-facing entry point, making it difficult to manage security policies consistently.

Improve business stability

The core strategy to address these challenges is to eliminate single-point dependencies through redundancy. This ensures that a localized failure does not bring down the entire system. Achieving this requires the following key mechanisms:

Redundancy

Critical components must have more than one copy. Any single component can become a point of failure.

Health checks

The system must continuously monitor the status of each component to detect failures promptly.

Automatic failover

Upon detecting a failure, the system must fail over automatically. Relying on manual intervention significantly extends downtime.

Solution advantages

Architecture comparison

Compared to the inherent limitations of traditional self-built architectures in cost, operations, and stability, Alibaba Cloud's high-availability architecture lowers the barriers and risks of cloud adoption with features such as auto scaling, automatic disaster recovery, and multi-AZ deployment.

Traditional self-built architecture

Alibaba Cloud high-availability architecture

Requires a large upfront investment in hardware and infrastructure

Active-standby disaster recovery is expensive and lacks elasticity. Performance and reliability depend on hardware, making architecture expansion or upgrades difficult and costly to maintain.

Cost

Supports auto scaling and on-demand expansion

Automatically scales based on business usage without manual intervention, enhancing security, performance, and management capabilities.

Complex software solutions and high maintenance costs

Requires dedicated development, testing, and operations teams to maintain and update the architecture.

Operations

Supports multi-AZ disaster recovery and automatic product updates

It provides automatic recovery from failures without manual intervention, includes built-in monitoring and management tools, and offers 24/7 expert support.

Insufficient reliability

Application service capacity is limited by a single node's performance, creating a bottleneck. A single node failure can render the entire business system unavailable.

Stability

High stability

ECS multi-AZ deployments can achieve up to 99.995% availability. The high-availability series of ApsaraDB RDS for MySQL offers up to 99.95% availability.

Zone-level high availability: Application layer

This level of HA addresses single server failures and complete outages of a single data center (availability zone). It is a fundamental requirement for most businesses.

Multi-instance redundancy and load balancing

Combine multi-instance redundancy, ALB for load balancing, and a multi-AZ deployment to achieve automatic fault isolation and traffic shifting at the application layer. For details, see the deployment guide in this document.

Stateless applications

Decouple all variable states from application servers and store them in an external, independent storage service that all instances can share.

Auto scaling

Auto scaling allows the system to maintain service quality during peak times while saving costs during off-peak periods, combining high availability with cost optimization.

Zone-level high availability: Data layer

After implementing redundancy at the application layer, ensuring the high availability of the data layer is equally crucial. Data is the core of your business, and losing data or access to it is more critical than application downtime. Data is typically categorized into two types, each requiring a tailored storage solution.

Structured data

Store structured data, such as user information and order records, in ApsaraDB RDS. Use a primary/standby architecture for high availability. If the primary node experiences an unrecoverable failure, the system automatically triggers a failover to the standby node. This process is transparent to the application and requires no manual intervention.

Unstructured data

As part of making applications stateless, migrate unstructured data like images, videos, and documents to OSS. OSS uses a multi-replica mechanism to ensure data durability. Choose zone-redundant storage for availability zone-level high availability.

Cache layer

Migrate user sessions to the high-performance distributed cache service, Tair. This allows any ECS instance handling a request to access or update user state by interacting with the same Tair instance.

Solution advantages

Region-level disaster recovery and high availability

Active-standby disaster recovery

Deploy a production environment in the primary region and a standby environment in a disaster recovery region. Under normal conditions, the standby environment only receives data synchronization—DTS for structured data and OSS cross-region replication for unstructured data—and does not handle business requests. In a disaster, you can activate the standby system and manually update DNS records or use GTM to trigger an automatic switchover, restoring business services within minutes to hours.

Two-location, three-center

This is an enhanced architecture commonly used in industries like finance that have extremely high stability requirements. It essentially layers intra-city high availability with active-standby disaster recovery. In the production region, the business system is deployed across two different availability zones, forming an intra-city HA cluster (the two centers) that can automatically withstand a single data center failure. In the disaster recovery region, a disaster recovery center (the third center) is deployed and kept in sync with the production environment.

Multi-region active-active

Deploy complete, independent production environments in multiple regions. All regions actively handle real user traffic, with no primary/standby distinction. GTM routes user requests to the optimal region based on geographic location and network latency. If a region fails, GTM automatically removes it from the address pool, and user traffic naturally flows to other healthy regions. This process is seamless to users, achieving automatic failover for region-level outages.

Observable high-availability architecture

A redundant architecture alone does not guarantee high availability. Consider this: all instances are running and pass ALB health checks, but the database connection pool has silently been exhausted. 99% of user requests are timing out, and you are unaware. Observability is an indispensable part of a high-availability system. It allows you to receive alerts before a failure becomes a user-perceivable outage, quickly pinpoint the problematic layer and component when a failure occurs, and continuously identify and optimize system weaknesses using historical data.

Metrics and alerts

For end-to-end monitoring, collect key metrics and set alerts for the application layer (ALB request success rate, response time; ECS CPU/memory), data layer (ApsaraDB RDS connections, slow queries, primary/standby sync delay; Tair memory usage, hit rate), and business layer (order volume, payment success rate).

Tracing

When a request traverses multiple components such as ALB → ECS → Tair → ApsaraDB RDS, ARMS can visualize the entire call chain. This allows you to precisely locate which component is causing delays or errors, reducing troubleshooting time from hours to minutes.

Logs

Collect application and access logs from all instances into Log Service (SLS). This prevents log loss if an instance fails and enables cross-instance log searching and analysis, providing a complete record for incident review and security audits.

Architecture and deployment

High-availability architecture deployment

2785364

When a user accesses the application, DNS resolves the request to the service address of the SLB (this guide uses ALB). The load balancer acts as a unified entry point, distributing requests to the ECS instances in the backend server group based on health checks and load balancing policies. If an ECS instance fails or becomes unresponsive, the load balancer detects its unavailable status and automatically reroutes traffic to a healthy instance. This ensures continuous service availability.

35 minutes

CNY 20(This is an estimated cost assuming you use pay-as-you-go resources with the recommended specifications for no more than 24 hours. The cost also assumes you have activated Cloud Data Transfer (CDT) to receive a free public traffic quota and that your usage remains within 20 GB. Fees for domain names, certificates, and ICP filing are not included. Actual costs may vary based on your selected specifications and versions. The price displayed in the console is final.)

image

SLBECSApsaraDB RDS for MySQL

Use cases

Use cases

image

Mission-critical enterprise applications

Systems such as Enterprise Resource Planning (ERP), Customer Relationship Management (CRM), and Business Intelligence (BI) are core to business operations and require guaranteed high availability.

image

E-commerce platforms

E-commerce platforms must operate 24/7 to process orders, payments, and user queries. High availability is crucial for their success.