Geo DNS
DNS-based traffic steering that returns different IP addresses based on the client's geographic location. Routes users to the nearest CDN PoP or data center without Anycast.
Full Explanation
Geo DNS is the simplest form of CDN traffic steering. When a user queries your domain, the authoritative DNS server looks up the requester's location (based on the resolver's IP or EDNS Client Subnet data) and returns the IP of the nearest server or PoP.
It's an alternative to Anycast routing. Where Anycast operates at the network layer (BGP), Geo DNS operates at the application layer (DNS). Some CDNs use both: Anycast for the DNS servers themselves, and Geo DNS responses to direct HTTP traffic to optimal edges.
The main limitation: Geo DNS routes based on the DNS resolver's location, not the actual user's location. A user in Tokyo using a US-based DNS resolver might get routed to a US server. EDNS Client Subnet (ECS) partially fixes this by passing the user's subnet to the authoritative nameserver, but not all resolvers support it.
Examples
# Route53 geolocation routing (Terraform)
resource "aws_route53_record" "eu" {
zone_id = aws_route53_zone.main.id
name = "cdn.example.com"
type = "A"
geolocation_routing_policy {
continent = "EU"
}
set_identifier = "eu"
records = ["203.0.113.10"] # EU PoP
ttl = 300
}
resource "aws_route53_record" "us" {
zone_id = aws_route53_zone.main.id
name = "cdn.example.com"
type = "A"
geolocation_routing_policy {
continent = "NA"
}
set_identifier = "us"
records = ["198.51.100.10"] # US PoP
ttl = 300
}
Video Explanation
Frequently Asked Questions
DNS-based traffic steering that returns different IP addresses based on the client's geographic location. Routes users to the nearest CDN PoP or data center without Anycast.
# Route53 geolocation routing (Terraform)
resource "aws_route53_record" "eu" {
zone_id = aws_route53_zone.main.id
name = "cdn.example.com"
type = "A"
geolocation_routing_policy {
continent = "EU"
}
set_identifier = "eu"
records = ["203.0.113.10"] # EU PoP
ttl = 300
}
resource "aws_route53_record" "us" {
zone_id = aws_route53_zone.main.id
name = "cdn.example.com"
type = "A"
geolocation_routing_policy {
continent = "NA"
}
set_identifier = "us"
records = ["198.51.100.10"] # US PoP
ttl = 300
}
Related CDN concepts include:
- Point of Presence (PoP) — A physical location containing CDN edge servers and networking equipment. PoPs are identified by airport …
- Anycast — A routing technique where the same IP address is announced from multiple locations worldwide. The …
- DNS TTL — Time To Live for DNS records—how long resolvers and clients should cache a DNS response …
- DNS (Domain Name System) (DNS) — The internet's phone book—translates human-readable domain names (example.com) into IP addresses (93.184.216.34). Every CDN request …