A company runs a web application on two EC2 instances in different Availability Zones, each with an Elastic IP address. The SysOps administrator needs to automatically route traffic to the healthy instance and fail over if one instance becomes unhealthy. The application must be accessible via a single DNS name. Which Route 53 routing policy should be used?
Trap 1: Weighted routing policy
Weighted routing policy in Amazon Route 53 assigns a weight to each resource record and returns DNS records in proportion to those weights, enabling load balancing across multiple instances. However, it does not evaluate the health of the target instances unless you explicitly attach health checks to the records, and even then it only stops responding with the IP when the health check fails. For a simple two-instance web application needing automatic failover when one instance becomes unhealthy, weighted routing would still return the unhealthy instance's IP to a portion of clients instead of routing all traffic to the healthy one.
Trap 2: Geolocation routing policy
Geolocation routing policy routes traffic based on the geographic location of the DNS resolver (the user's IP address) rather than the health or availability of your resources. You can map different instances to serve users from specific continents, countries, or states, but Route 53 does not automatically reroute traffic when a particular instance becomes unhealthy — it simply continues responding with the record associated with that location. This policy is optimized for content localization and compliance, not for detecting instance failure and shifting traffic like the requirement here.
Trap 3: Simple routing policy
Simple routing policy in Amazon Route 53 is the most basic policy: it allows you to define a single record with multiple values (e.g., all IP addresses) and returns all values in a random order, or a single value if only one is configured. It does not support health checks, so Route 53 cannot distinguish between healthy and unhealthy instances, and every client receives the same set of IPs regardless of instance status. Because there is no mechanism to stop returning an unhealthy instance's IP, simple routing cannot provide automatic failover between the two EC2 instances.
- A
Weighted routing policy
Why it fails: Weighted routing policy in Amazon Route 53 assigns a weight to each resource record and returns DNS records in proportion to those weights, enabling load balancing across multiple instances. However, it does not evaluate the health of the target instances unless you explicitly attach health checks to the records, and even then it only stops responding with the IP when the health check fails. For a simple two-instance web application needing automatic failover when one instance becomes unhealthy, weighted routing would still return the unhealthy instance's IP to a portion of clients instead of routing all traffic to the healthy one.
- B
Failover routing policy
Failover routing policy is specifically designed for active-passive architecture: you create a primary and a secondary record with the same name and type, each associated with a Route 53 health check. When the primary instance fails its health check, Route 53 automatically changes the DNS response to return the secondary (standby) instance's IP address. This provides the required automatic failover for the two EC2 instances without needing a load balancer or manual intervention.
- C
Geolocation routing policy
Why it fails: Geolocation routing policy routes traffic based on the geographic location of the DNS resolver (the user's IP address) rather than the health or availability of your resources. You can map different instances to serve users from specific continents, countries, or states, but Route 53 does not automatically reroute traffic when a particular instance becomes unhealthy — it simply continues responding with the record associated with that location. This policy is optimized for content localization and compliance, not for detecting instance failure and shifting traffic like the requirement here.
- D
Simple routing policy
Why it fails: Simple routing policy in Amazon Route 53 is the most basic policy: it allows you to define a single record with multiple values (e.g., all IP addresses) and returns all values in a random order, or a single value if only one is configured. It does not support health checks, so Route 53 cannot distinguish between healthy and unhealthy instances, and every client receives the same set of IPs regardless of instance status. Because there is no mechanism to stop returning an unhealthy instance's IP, simple routing cannot provide automatic failover between the two EC2 instances.