Skip to main content
In this lesson we compare two AWS approaches for cross-region resilience and disaster-recovery (DR) failover: Route 53 DNS-based failover (priority + health checks) and AWS Global Accelerator (two static anycast IPs with health-based routing across the AWS global network). This article provides a concise hands‑on demo using two EC2 instances in different regions (primary and secondary), a Route 53 health check and failover records, and a Global Accelerator configured with both instances as endpoints. Key takeaways:
  • 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)
Each instance runs a minimal HTTP web server configured via EC2 user data so the page identifies which instance served the request. User data (Amazon Linux 2):
Security groups: allow inbound HTTP (port 80) from the sources you need. For simple testing you can use 0.0.0.0/0, but restrict this for production. Below is a screenshot showing the SecondaryEC2 instance with its public IPv4 address (example):
Screenshot of the AWS EC2 Instances console showing one instance (i-08459d5ca217e2b88, labeled SecondaryEC2). The instance is running and displays a public IPv4 address (100.27.45.104).
Verify each instance by browsing to its public IPv4 (for 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):
A browser screenshot of the AWS Route 53 console showing the "edenthought.com" hosted zone Records page, with buttons to create/import/delete records and a table listing DNS records (NS entries shown). The top of the screen shows browser tabs and an AWS account/org banner.
Steps to configure Route 53 failover with a health check:
  1. 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)
  2. 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).
  3. Use a low TTL for test/DR scenarios (e.g., 60 seconds) to reduce DNS caching delays during failover tests.
Here is the primary EC2 instance screenshot used for health-check configuration:
Screenshot of the AWS EC2 Instances console showing a single EC2 instance (i-0fe2ec83b51af072e) with public IPv4 18.117.77.176 and private IPv4 172.31.4.239.
Notes on Route 53 failover behavior:
  • 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.
Summary table: when to use each approach

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):
  1. Console → Global Accelerator → Create accelerator.
  2. Select Standard accelerator and IP address type (IPv4 or Dual-stack).
  3. Configure a listener (for this demo: TCP port 80).
  4. Add an endpoint group per region (us-east-2 and us-east-1).
  5. Configure endpoint-group health checks (HTTP, path /, interval).
  6. Add EC2 instances as endpoints to the appropriate group and set weights.
Global Accelerator — choose Standard and IP address type:
A screenshot of the AWS Global Accelerator "Create accelerator" page in a web browser, showing the accelerator type options (Standard selected) and an IP address type dropdown with IPv4 and Dual-stack choices. The browser tabs and account/org banner are visible across the top.
Listener and endpoint-group configuration (example: listener 80 TCP, endpoint group set to us-east-2):
A screenshot of the AWS Global Accelerator web console on the "Create accelerator" page showing a Listener: 80 TCP configuration, with an endpoint group set to region us-east-2 and a traffic dial of 100. The left pane shows setup steps like "Add endpoint groups" and "Add endpoints."
Health check settings for the endpoint group (HTTP on port 80, health check path /, interval etc.):
A screenshot of the AWS Management Console on the "Create accelerator" page (AWS Global Accelerator) showing health check settings like protocol (HTTP), health check path ("/"), and interval (30 seconds). The browser tabs and navigation bar are visible across the top.
Adding EC2 endpoints to an endpoint group (select instance, set weight):
A screenshot of the AWS Global Accelerator "Create accelerator" console showing endpoint configuration for an EC2 instance. The form shows Endpoint type set to EC2, Weight set to 128, and a dropdown listing an instance ID and private IP.
After creating the accelerator, AWS provisions two static Anycast IPv4 addresses. Point an A record for your domain to those IPs or test directly:
  • Test with: http://<global-accelerator-ip>
  • Deployment time: typically several minutes (in my test ~15 minutes) to reach “Deployed” from “In progress”.
Testing and simulating failover with Global Accelerator:
  • 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:
This indicates Global Accelerator routed traffic to the us-east-2 instance after the other endpoint became unhealthy.

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.
Final screenshot — PrimaryEC2 used in this demo:
A screenshot of the AWS EC2 console showing one running instance named "PrimaryEC2" (i-0fe2ec83b51af072e). The instance is a t3.micro with a public IPv4 address and shows "3/3 checks passed" in us-east-2a.
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.

Watch Video