← AWS projects

AWS · Reference Architecture

AWS Multi-AZ Web Application

Keep a conventional web application available through instance or Availability Zone failure by separating public ingress, replaceable compute, and resilient state.

PlatformAWS
DomainArchitecture
LevelIntermediate
Last reviewed2026-09-19
Use whenRun a conventional web application across multiple Availability Zones with no single application instance dependency.
Key decisionScale stateless compute horizontally
Primary servicesApplication Load Balancer · EC2 Auto Scaling · Amazon RDS
Cost focusEC2 instance hours
On this page

Building blocks

Application Load BalancerEC2 Auto ScalingAmazon RDSAmazon VPCAWS WAFAmazon CloudWatch

Design goal

Remove single-instance dependencies and keep application and database tiers private while the workload remains available through routine infrastructure failure.

Architecture

An internet-facing load balancer distributes traffic across application instances in multiple AZs; the database uses managed resilience appropriate to the chosen engine and deployment option.

UsersApplication LoadBalancerApp AZ-AApp AZ-BRDS Multi-AZ
Users
Application Load Balancer
Routes independently to healthy targets
App AZ-A
App AZ-B
Both application paths use resilient state
RDS Multi-AZ

Architecture decisions

Decision

Scale stateless compute horizontally

Why

Keep session/state outside individual application instances where possible.

Trade-off

Stateless compute makes replacement and scaling easier, but sessions and durable state must move into external services that are resilient themselves.

Decision

Separate public ingress from private application tiers

Why

Expose only the load-balancing layer and keep application/database tiers private.

Trade-off

Private tiers reduce exposure, but introduce load-balancing, NAT/endpoint, DNS, and troubleshooting dependencies.

Security

Protect the control and data paths deliberately. Use security groups by tier, WAF where required, IAM roles, encrypted storage, secrets management, and centralized logging.

Availability

Design for the failure domain that must be survived. Distribute load balancer targets across AZs and use Auto Scaling health replacement. Choose the appropriate RDS high-availability option for the workload.

Disaster recovery

Treat regional recovery as a separate operating state. Regional DR is a separate design decision; use backups, replicas, or secondary-region infrastructure according to RPO/RTO.

Cost drivers

  • EC2 instance hours
  • ALB LCUs
  • RDS engine/size/storage
  • NAT Gateway
  • data transfer
  • WAF/logging

Design assumptions

  • Application can run on multiple instances
  • State is externalized or replicated
  • Database requirements are defined

Implementation plan

  1. Create public ingress and private application/data subnets across at least two Availability Zones in the workload VPC.
  2. Place the Application Load Balancer on the public ingress path and keep application instances or tasks on private subnets.
  3. Configure Auto Scaling with a minimum healthy footprint across Availability Zones and health checks that can replace failed application capacity.
  4. Deploy the database privately using the high-availability option appropriate to the selected engine and recovery objectives.
  5. Apply tier-specific security groups, IAM roles, secrets handling, and centralized telemetry, then test instance and Availability Zone failure.

Validate the design

  • Terminate an application instance and confirm healthy capacity is replaced without user-visible loss of service.
  • Generate traffic across the load balancer and verify requests are distributed across the intended Availability Zones.
  • Perform a controlled database failover and measure application reconnection behavior.
  • Attempt direct access to private application/database tiers and confirm the security-group and routing boundaries block it.

Architecture basis

Continue a learning path