- Route 53: DNS-level primary/secondary failover using health checks — quick to set up, but subject to DNS TTL and client caching.
- Global Accelerator: two static Anycast IPs, network-level routing over AWS backbone, health-driven routing with proximity/performance considerations.
- Use low TTLs and well‑configured health checks while testing failover. Ensure security groups permit health probes and client traffic.
Environment overview
I provisioned two EC2 instances in separate AWS regions:- PrimaryEC2 — us-east-2 (Ohio)
- SecondaryEC2 — us-east-1 (Northern Virginia)
0.0.0.0/0, but restrict this for production.
Below is a screenshot showing the SecondaryEC2 instance with its public IPv4 address (example):

http://<public-ip>). The user-data page returns the hostname to show which instance responded.
Route 53 — hosted zone, health checks, and failover records
If you are using a custom domain, register it in Route 53 and create the hosted zone. The hosted zone contains NS and SOA records plus any application records you create. In your hosted zone you will see default NS and SOA records and any custom records (for example, CNAME or A records used for TLS/SSL verification):
- Create a Route 53 health check that points to your primary endpoint:
- Name:
HealthCheck-Primary(or similar) - Endpoint: primary EC2 public IPv4
- Protocol: HTTP, Port: 80, Path:
/(or your health path)
- Name:
- Create DNS records:
- Primary record (A or alias) pointing to primary endpoint; attach the health check and mark as Primary.
- Secondary (failover) record pointing to secondary endpoint; mark as Secondary (used when primary is unhealthy).
- Use a low TTL for test/DR scenarios (e.g., 60 seconds) to reduce DNS caching delays during failover tests.

- Route 53 prefers the Primary record while its health check is healthy. When the health check fails, Route 53 serves the Secondary record.
- DNS caching and client resolvers can delay visibility of failover. Lower TTLs speed switchover during tests but increase DNS query volume.
AWS Global Accelerator — overview and setup
Global Accelerator gives you two static public Anycast IPv4 addresses (or dual-stack) that remain constant while its endpoint mapping can change. Traffic enters AWS via the closest edge location and is routed over the AWS global backbone to healthy regional endpoints. Create a Global Accelerator (high-level steps):- Console → Global Accelerator → Create accelerator.
- Select Standard accelerator and IP address type (IPv4 or Dual-stack).
- Configure a listener (for this demo: TCP port 80).
- Add an endpoint group per region (us-east-2 and us-east-1).
- Configure endpoint-group health checks (HTTP, path
/, interval). - Add EC2 instances as endpoints to the appropriate group and set weights.


/, interval etc.):


- Test with:
http://<global-accelerator-ip> - Deployment time: typically several minutes (in my test ~15 minutes) to reach “Deployed” from “In progress”.
- Access the accelerator IP (or domain pointed to it) and confirm which instance serves traffic.
- To force failover, stop the EC2 instance currently serving traffic:
- Console → EC2 → Instances → select instance → Instance state → Stop.
- Global Accelerator will mark the endpoint unhealthy (visible in console) and route traffic to other healthy endpoints automatically.
- The returned page after failover shows the hostname of the instance serving the request, for example:
Demonstration checklist and commands
- Verify instance pages:
curl http://<primary-public-ip>curl http://<secondary-public-ip>
- Test Global Accelerator IP:
curl http://<global-accelerator-ip>
- Confirm Route 53 health check status in the console and DNS records for Primary/Secondary.
Cleanup
To avoid ongoing charges:- Disable and delete the Global Accelerator (select the accelerator → Disable → wait → Delete).
- Terminate the EC2 instances.
- Remove Route 53 records, and delete the hosted zone if no longer needed.

Operational and exam notes:
- Route 53: DNS-based priority failover (Primary/Secondary) using health checks — faster switchover requires lower TTLs.
- Global Accelerator: two static Anycast IPs; routing decisions are health-based and factor in performance/proximity, not a strict priority model.
- Ensure health checks and security groups allow both health probes and client traffic (e.g., HTTP on port 80).
- Use Global Accelerator when low-latency, stable entry points and faster network-level failover are required. Use Route 53 failover for simpler DNS-based primary/secondary architectures.
Links and references
- Amazon Route 53 Developer Guide
- AWS Global Accelerator Developer Guide
- Amazon EC2 User Guide for Linux Instances — Running commands on your Linux instance at launch (User data)