The drill uses Aurora's Switchover, which synchronises every secondary before roles change. No committed transaction is lost.
Sum of the four phases below, from your configured health check and DNS values. Time the real drill and compare.
Architecture
Active–Active across two Indian regions, with one database that spans both.
ap-south-1
Primary
- EC2 web server + Elastic IP
- Apache, PHP, this application
- Aurora cluster — writer
ap-south-2
Standby
- EC2 web server + Elastic IP
- Identical code and configuration
- Aurora cluster — reader
AWS services in use
| Service | Where | What it does here |
|---|---|---|
| Amazon EC2 | ap-south-1, ap-south-2 | One web server per region running Apache, PHP and this application. |
| Elastic IP | ap-south-1, ap-south-2 | A fixed public address per server, so the DNS records stay valid across a stop and start. |
| Aurora Global Database | both regions | Replicates the primary into ap-south-2 at the storage layer, and provides one-command switchover of the writer between regions. |
| Amazon Route 53 | global | Failover routing with a health check on the primary. Traffic moves to the standby region automatically when the check fails. |
Where the recovery time goes
Planned drill, in order. Each phase is measured or taken from your configuration.
| # | Phase | Duration | Determined by |
|---|---|---|---|
| 1 | Aurora switchover to ap-south-2 | 30 sec | AWS managed operation. Typically under 30 seconds; no data loss. |
| 2 | Mumbai EC2 stop | 1 min | Instance shutdown. This is the drill's simulated failure. |
| 3 | Route 53 detects the failure | 20 sec | 10s interval × 2 failed checks |
| 4 | Cached DNS answers expire | 1 min | Record TTL of 60s |
| Total recovery time | ≈ 2 min 50 sec | Client traffic now served from ap-south-2 |
Treat the total as a floor rather than a promise. Route 53 needs a moment to propagate a health status change beyond the raw interval, and resolvers do not always honour a TTL exactly, so a timed drill usually lands somewhat above the arithmetic.
Planned switchover vs. real disaster
Switchover this drill
- Used for
- Rehearsals, maintenance, regional rotation — everything healthy.
- Data loss
- RPO = 0
- Recovery time
- ≈ 2 min 50 sec
- How
- Secondaries are synchronised first, then the roles are exchanged.
Failover real outage
- Used for
- The primary region is unreachable and cannot be synchronised.
- Data loss
- RPO in seconds
- Recovery time
- ≈ 1 min 50 sec
- How
- The standby is promoted immediately. Anything not yet replicated is lost — replication lag is typically under one second.
What the drill button does
- Switch the Aurora writer to ap-south-2, and wait until it really is the writer
- Stop the Mumbai EC2 instance — the simulated regional failure
- Route 53's health check fails and traffic resolves to the Hyderabad Elastic IP
- To return: start Mumbai, wait for its EC2 status checks, switch the writer home
The database always moves before the server stops, so the region taking traffic is never pointed at a database that cannot accept writes.
Scope of this demo
Stated plainly, so the numbers above are not read as more than they are.
- One server per region. No load balancer and no auto scaling, so a single instance failure inside a healthy region is not covered — only whole-region loss.
- Route 53 is administered separately. The drill never modifies DNS; it stops an instance and lets the existing health check react. The console therefore reports EC2 and Aurora state, not DNS state.
- RTO is an estimate until measured. Phases 1 and 2 are AWS timings that vary with load. Time an actual drill and record the result.
- Backups are separate from replication. A global database protects against
losing a region. It does not protect against a bad deployment or a mistaken
DELETE— that is what snapshots and point-in-time recovery are for.