InterviewHubPRO
Section Overview
Q16

Question 16 of 65

Part 2: Networking, VPC & Traffic Routing (6 - 20)

25%
AWS Cloud Architecture•Part 2: Networking, VPC & Traffic Routing (6 - 20)

Amazon Route 53 Routing Policies.

In Simple Words:

  • Simple: Standard 1-to-1 DNS lookup.
  • Weighted: Splits traffic by percentage (e.g., 90% stable, 10% canary).
  • Latency-based: Routes users to the AWS region with the lowest ping.
  • Failover: Active-Passive disaster recovery via health checks.
  • Geolocation: Routes users based on geographic location (country/continent).
  • Multi-Value Answer: Returns up to 8 healthy IPs with DNS health checks.
hcl
# Route 53 Weighted Routing for Canary Deployment:
resource "aws_route53_record" "canary_v2" {
  zone_id = aws_route53_zone.primary.zone_id
  name    = "api.example.com"
  type    = "A"

  weighted_routing_policy {
    weight = 10 # 10% traffic to Canary
  }
  set_identifier = "canary-v2"
  alias {
    name                   = aws_lb.canary_alb.dns_name
    zone_id                = aws_lb.canary_alb.zone_id
    evaluate_target_health = true
  }
}