
Active-Active Application with Near-Zero RTO/RPO Using Mumbai & Hyderabad Regions
In today's digital economy, application downtime is not just an inconvenience — it is a business risk. This blog post walks you through designing and implementing a production-grade, Active-Active multi region architecture on AWS using the Mumbai (ap-south-1) and Hyderabad (ap-south-2) regions. • Achieves a RTO of seconds and RPO near zero • Serves users from the geographically nearest healthy region automatically • Survives a full regional failure with zero manual intervention
AWS Technical Blog
Building a Resilient Multi-Region Architecture on AWS
Active-Active Application with Near-Zero RTO/RPO Using Mumbai & Hyderabad Regions
Category | Regions | Services Used | Difficulty |
|---|---|---|---|
Disaster Recovery / HA | ap-south-1 | ap-south-2 | Route 53, ALB, RDS, S3, CloudFront, VPC | Advanced |
1. Introduction
In today's digital economy, application downtime is not just an inconvenience — it is a business risk. For financial institutions, government agencies, healthcare providers, and e-commerce platforms operating in India, regulatory uptime guidelines demand architectures that go well beyond traditional backup-and-restore or pilot-light strategies.
This blog post walks you through designing and implementing a production-grade, Active-Active multi-region architecture on AWS using the Mumbai (ap-south-1) and Hyderabad (ap-south-2) regions. By the end of this guide, you will understand how to architect an application that:
• Achieves a Recovery Time Objective (RTO) of seconds to minutes
• Achieves a Recovery Point Objective (RPO) near zero
• Serves users from the geographically nearest healthy region automatically
• Survives a full regional failure with zero manual intervention
Note: This architecture is particularly well-suited for organizations in India's BFSI, government, and healthcare sectors that must comply with SEBI, RBI, IRDAI, or NIC uptime and data-residency mandates.
2. The Business Problem
Many organizations begin their cloud journey with a Pilot Light or Warm Standby DR strategy. While these approaches offer cost advantages, they introduce meaningful recovery delays:
DR Strategy | Typical RTO | Typical RPO | Limitation |
|---|---|---|---|
Backup & Restore | Hours | Hours | Too slow for regulated industries |
Pilot Light | 15–30 mins | Minutes | Manual intervention required |
Warm Standby | 5–15 mins | Seconds–Minutes | Partial capacity until scaled up |
Active-Active ✅ | Seconds | Near Zero | Recommended — covered in this blog |
When regulatory compliance mandates 99.99% uptime or higher, the only viable option is a fully Active-Active architecture where both regions serve live traffic simultaneously and failover is automatic, instantaneous, and transparent to the end user.
3. Architecture Requirements
3.1 Functional Requirements
• Identical application stacks deployed in both ap-south-1 (Mumbai) and ap-south-2 (Hyderabad)
• Global traffic routing with automatic DNS-level failover via Amazon Route 53
• Local load balancing within each region using Application Load Balancers (ALBs)
• Cross-region database replication with near-zero RPO for MySQL workloads
• Bi-directional Amazon S3 Cross-Region Replication (CRR) for static assets
• Global CDN acceleration via Amazon CloudFront
3.2 Non-Functional Requirements
• RTO: Seconds to minutes
• RPO: Near zero (sub-second replication)
• Availability target: 99.99% or higher
• Data residency: All data must remain within AWS India regions
• Security: Encryption in transit and at rest across all services
4. Active-Active Architecture Overview
The following architecture diagram illustrates the complete Active-Active setup spanning both AWS India regions. All components are deployed redundantly, and traffic flows through Amazon CloudFront to the nearest healthy region automatically.
The key components of this architecture are:
Component | Service | Role |
|---|---|---|
Edge / CDN Layer | Amazon CloudFront | Global entry point; caches static content; routes to
nearest region |
DNS & Failover | Amazon Route 53 | Latency-Based Routing + Health Checks for automatic
failover |
Load Balancing | Application Load Balancer (ALB) | Distributes traffic across healthy EC2 instances per
region |
Compute | Amazon EC2 / Auto Scaling | Hosts the application in both regions |
Networking | VPC Peering / Transit Gateway | Private, low-latency cross-region connectivity |
Database | Amazon RDS for MySQL | Primary in Mumbai; Read Replica in Hyderabad |
Object Storage | Amazon S3 + CRR | Bi-directional replication of static assets |
SSL/TLS | AWS Certificate Manager (ACM) | Manages SSL certificates for CloudFront and ALBs |
5. Implementation Steps
Follow these seven steps in sequence to build the complete Active-Active architecture. Each step builds on the previous one, so it is important to proceed in order.
Step 1: Deploy Regional Application Load Balancers (ALBs)
Provision an Application Load Balancer (ALB) in both ap-south-1 (Mumbai) and ap-south-2 (Hyderabad). Configure regional target groups to register your web application instances as targets, ensuring localized traffic distribution and continuous health monitoring.
• Create an ALB in Mumbai VPC with appropriate subnets across multiple Availability Zones
• Create an identical ALB in Hyderabad VPC with the same configuration
• Configure target groups with health check paths (e.g., /health) and thresholds
• Attach SSL/TLS certificates from AWS Certificate Manager (ACM) to each ALB listener
Note: Always deploy your ALB across a minimum of two Availability Zones within each region to prevent a single AZ failure from impacting availability.
Step 2: Establish Low-Latency Cross-Region Networking
Create a VPC Peering connection — or deploy an AWS Transit Gateway with inter-region peering — between the Mumbai and Hyderabad VPCs. Update route tables and Security Groups in both regions to allow secure, private, bi-directional communication between the application and database tiers.
• Create a VPC Peering connection between Mumbai VPC and Hyderabad VPC
• Update route tables in both VPCs to route cross-region CIDR ranges through the peering connection
• Update Security Groups on RDS instances to allow inbound MySQL traffic from the peer VPC CIDR
• Validate connectivity using a test EC2 instance in each region (e.g., nc -zv <RDS-endpoint> 3306)
Note: For production workloads with multiple VPCs or accounts, AWS Transit Gateway with inter-region peering is recommended over direct VPC Peering for scalability and centralized routing management.
Step 3: Implement the Multi-Region Database Architecture
The database tier uses Amazon RDS for MySQL with a cross-region Read Replica deployed in ap-south-2 (Hyderabad). This architecture provides sub-second cross-region replication, ensuring near-zero RPO for read-heavy workloads.
Important: It is important to understand that this is an Active-Passive database configuration within an Active-Active application architecture. All write operations are directed to the Primary RDS instance in Mumbai. The Hyderabad Read Replica handles read traffic locally, reducing cross-region latency for read operations.
• Create the primary RDS MySQL Multi-AZ instance in ap-south-1 (Mumbai)
• Create a cross-region Read Replica in ap-south-2 (Hyderabad) from the Mumbai primary
• Configure the application in Hyderabad to direct read queries to the local Read Replica endpoint
• Direct all write operations to the Mumbai primary endpoint from both regions
• Enable automated backups and set the backup retention period to a minimum of 7 days
• Enable encryption at rest using AWS KMS for both the primary and replica instances
Operation | Region Handling | Endpoint Used |
|---|---|---|
Read queries | Served locally in each region | Local Read Replica or Primary |
Write queries | Always routed to Mumbai | Primary RDS endpoint (Mumbai) |
Failover (DR event) | Promote Hyderabad replica to primary | Manual or automated promotion |
Step 4: Configure Global Traffic Routing via Amazon Route 53
Within Amazon Route 53, create a hosted zone for your domain (e.g., abc.example.com). Define two Latency-Based Routing (LBR) alias records pointing to the respective regional ALBs in Mumbai and Hyderabad. Attach Route 53 Health Checks to these records to ensure automated DNS failover if a region experiences an outage.
• Create a Route 53 hosted zone for your application domain
• Create a Latency-Based Routing alias record pointing to the Mumbai ALB
• Create a second Latency-Based Routing alias record pointing to the Hyderabad ALB
• Create Route 53 Health Checks targeting each ALB's health check endpoint
• Associate Health Checks with the respective LBR records to enable automatic failover
• Set Health Check failure thresholds aggressively (e.g., 3 consecutive failures in 10-second intervals)
💡 Note: Latency-Based Routing automatically directs users to the AWS region that provides the lowest network latency, not simply the geographically nearest region. This ensures the best possible user experience under normal operating conditions.
Step 5: Implement Edge Acceleration via Amazon CloudFront
Deploy an Amazon CloudFront distribution to serve as the global entry point for your users. CloudFront accelerates content delivery through AWS edge locations worldwide while simultaneously providing DDoS protection via AWS Shield Standard.
• Create a CloudFront distribution with the alternate domain name (CNAME) set to abc.example.com
• Attach an ACM SSL/TLS certificate to the distribution (certificate must be in us-east-1 for CloudFront)
• Configure a custom origin pointing to your Route 53 latency routing endpoint (origin.abc.example.com)
• Set appropriate cache behaviors — cache static content aggressively; bypass cache for dynamic/API requests
• Enable CloudFront access logging to an S3 bucket for audit and analytics purposes
• Configure cache invalidation as part of your deployment pipeline for content updates
Step 6: Enable Bi-Directional Amazon S3 Cross-Region Replication (CRR)
Configure two-way bi-directional Amazon S3 Cross-Region Replication (CRR) between your S3 buckets in Mumbai and Hyderabad. This ensures that any static assets or user uploads written to one region are asynchronously mirrored to the peer region automatically, maintaining data consistency across both regions.
• Create an S3 bucket in ap-south-1 (Mumbai) as the primary assets bucket
• Create a corresponding S3 bucket in ap-south-2 (Hyderabad) as the secondary assets bucket
• Enable versioning on both buckets (required for CRR)
• Configure a CRR rule on the Mumbai bucket to replicate to the Hyderabad bucket
• Configure a second CRR rule on the Hyderabad bucket to replicate back to Mumbai
• Create appropriate IAM roles granting S3 replication permissions between the two buckets
• Enable S3 Replication Time Control (RTC) if you require guaranteed replication within 15 minutes with SLA
Important: S3 CRR replicates new objects only after the replication rule is enabled. Existing objects must be copied using the S3 Batch Replication feature. Ensure you replicate existing data before going live.
Step 7: Optimize Asset Delivery with CloudFront S3 Origin Grouping
Create a dedicated Amazon CloudFront distribution for your static S3 assets. Use CloudFront Origin Groups to configure an automated failover mechanism, designating the Mumbai S3 bucket as the primary origin and the Hyderabad S3 bucket as the secondary origin.
• Create a second CloudFront distribution specifically for static asset delivery
• Define an Origin Group with the Mumbai S3 bucket as the primary origin
• Add the Hyderabad S3 bucket as the failover origin within the same Origin Group
• Configure origin failover criteria — trigger failover on HTTP 500, 502, 503, and 504 responses
• Associate the Origin Group with your CloudFront cache behavior for static asset paths
• Test failover by temporarily blocking access to the primary S3 bucket and confirming assets load from Hyderabad
6. Security Considerations
Security must be embedded into every layer of this architecture. The following security controls should be implemented alongside the infrastructure components described above.
6.1 Identity and Access Management (IAM)
• Apply the principle of least privilege to all IAM roles and policies
• Use IAM roles for EC2 instances — never store access keys on application servers
• Create separate IAM roles for S3 replication, RDS access, and CloudFront origin access
• Enable AWS CloudTrail in all regions to maintain a complete audit log of all API activity
6.2 Network Security
• Restrict Security Group inbound rules to only required ports and source CIDRs
• Place RDS instances in private subnets — never expose database endpoints to the internet
• Use AWS WAF with CloudFront to protect against common web exploits (OWASP Top 10)
• Enable VPC Flow Logs in both regions for network traffic analysis and threat detection
6.3 Data Protection
• Enable encryption at rest on all RDS instances and S3 buckets using AWS KMS
• Enforce HTTPS-only access on ALBs by redirecting HTTP (port 80) to HTTPS (port 443)
• Set S3 bucket policies to deny any requests that do not use TLS (aws:SecureTransport condition)
• Rotate KMS keys and database credentials regularly using AWS Secrets Manager
Note: For organizations subject to RBI or SEBI data localization requirements, ensure that all KMS keys are created in the AWS India regions (ap-south-1 or ap-south-2) and that no data is replicated outside these regions.
7. Monitoring and Observability
A robust monitoring strategy is essential to ensure that the Active-Active architecture operates as intended and that any regional degradation is detected and responded to within seconds.
7.1 Amazon CloudWatch
• Create CloudWatch dashboards that aggregate metrics from both regions into a single view
• Configure alarms on critical metrics: ALB 5XX error rate, RDS replica lag, EC2 CPU utilization, and RDS FreeStorageSpace
• Set RDS ReplicaLag alarm threshold to under 1 second — any higher value indicates replication degradation
• Enable CloudWatch Container Insights or Application Insights if using containerized workloads
7.2 Amazon Route 53 Health Checks
• Configure health checks to poll each ALB endpoint every 10 seconds
• Set the failure threshold to 3 consecutive failures before triggering DNS failover
• Create CloudWatch alarms on Route 53 Health Check status for immediate alerting
• Use Amazon SNS to send health check failure notifications to on-call teams via email, SMS, or PagerDuty
7.3 AWS CloudTrail and Config
• Enable AWS Config rules to continuously evaluate compliance of your architecture against best practices
• Set up CloudTrail event notifications for unauthorized API calls, security group changes, or IAM policy modifications
Metric | Service | Recommended Threshold | Action |
|---|---|---|---|
5XX Error Rate | ALB | > 1% over 5 minutes | Trigger SNS alert |
ReplicaLag | RDS | > 1 second | Investigate replication health |
CPU Utilization | EC2 | > 80% over 5 minutes | Auto Scaling trigger |
Health Check Status | Route 53 | Unhealthy | Automatic DNS failover |
BucketReplicationLatency | S3 | > 900 seconds | Check CRR configuration |
8. Testing and Validating the DR Setup
An untested disaster recovery architecture is not a DR architecture — it is a hypothesis. The following tests should be performed before going live and repeated on a quarterly basis.
8.1 Route 53 Failover Test
• Simulate a Mumbai ALB failure by temporarily changing the health check path to a non-existent endpoint
• Verify that Route 53 detects the failure within the configured threshold (typically 30–60 seconds)
• Confirm that DNS resolves to the Hyderabad ALB after failover using dig or nslookup
• Measure actual RTO from failure injection to full traffic redirection
8.2 Database Failover Test
• Test RDS Read Replica promotion in Hyderabad by manually triggering a promotion via the AWS Console or CLI
• Update the application database connection string to point to the newly promoted primary
• Verify that write operations succeed from the Hyderabad application tier
• Document the time taken to promote the replica and restore full read/write capability (this is your database RTO)
8.3 S3 CRR Validation Test
• Upload a test file to the Mumbai S3 bucket and verify it appears in the Hyderabad bucket within the expected replication window
• Repeat the same test from Hyderabad to Mumbai to validate bi-directional replication
• If S3 Replication Time Control (RTC) is enabled, confirm replication completes within 15 minutes
Important: Always perform DR testing during a maintenance window or using a staging environment that mirrors production. Document all test results, including actual RTO/RPO measurements, and update your runbook accordingly.
10. Conclusion
Building a truly resilient Active-Active multi-region architecture on AWS requires careful planning across networking, compute, database, storage, and content delivery layers. By combining Amazon Route 53 Latency-Based Routing, Application Load Balancers, RDS cross-region Read Replicas, Amazon S3 bi-directional Cross-Region Replication, and Amazon CloudFront, organizations can achieve near-zero RTO and RPO while serving users from the optimal AWS region at all times.
With AWS's expanding India infrastructure — now encompassing both the Mumbai (ap-south-1) and Hyderabad (ap-south-2) regions — organizations operating in India can build world-class resilient architectures while maintaining full data residency within the country, satisfying even the most stringent regulatory requirements.
Key takeaways from this blog:
• Active-Active means both regions serve live traffic simultaneously — not just failover standby
• RDS Read Replicas provide near-zero RPO but require a promotion step for full write failover
• Route 53 Health Checks combined with Latency-Based Routing provide automatic, sub-minute DNS failover
• CloudFront Origin Groups add an additional layer of resilience for static asset delivery
• Regular DR testing is not optional — it is the only way to validate your RTO/RPO assumptions
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article