Route traffic to multiple POPs around the world
Metrics
https://latency.apex.sh/?url=https://commons.host&compare=
Goals
Lower latency, high-available redundancy, etc.
Method 1: Geo DNS
- Unique IP address per region
- Approachable solution for most customers
Method 2: Anycast IP
- Same IP address for all regions
- Requires a /24 (IPv4) and/or /48 (IPv6) address block.
- Mainly used by larger networks and key infrastructure: cloud providers, registrars, DNS server constellations, root servers, CDNs, etc.
List of Geo DNS Providers
List of Anycast IP Providers
- https://www.linkedin.com/pulse/build-your-own-anycast-network-9-steps-samir-jafferali
- https://engineering.linkedin.com/network-performance/tcp-over-ip-anycast-pipe-dream-or-reality
- https://www.hostvirtual.com/anycast
- http://anycastdns.cz/what-is-anycast
- https://www.pch.net/services/dns_anycast
Relevant Discussions
- https://serverfault.com/questions/30567/geo-dns-providers#42889
- http://www.webhostingtalk.com/showthread.php?t=857871
Domain Apex Limitation for GeoDNS
TL;DR
- For optimal routing, always use a CNAME sub-domain (e.g.
www.example.com
) that points tocommons.host
. Never use a domain apex (e.g.example.com
) to point at the CDN. - Avoid using non-standard hacks like ANAME (Constellix), ALIAS (NS1), or CNAME flattening (Cloudflare).
- DNS providers do not seem to consider EDNS information when resolving ANAME/ALIAS/flattened CNAME records.
- Single region per DNS provider PoP. E.g. if Constellix only has a SEA PoP in SG then it will never return the closest PoPs for the MY, VN, or ID regions to users based there.
Sources:
- https://calendar.perfplanet.com/2016/root-domain-cdn-performance/
- http://instantclick.io/github-pages-and-apex-domains
- https://news.ycombinator.com/item?id=7738293
- https://help.github.com/articles/about-supported-custom-domains/#apex-domains
GeoDNS PoP Naming Scheme
$COUNTRY-$CITY-$INDEX
$COUNTRY
is the 2-letter country code defined by ISO 3166-1 alpha-2.
$CITY
is the 3-letter city code defined by IATA, including Metropolitan Area Airport Codes.
$INDEX
is an integer, starting from 1, incremented by 1 for each new PoP in the same city.
Examples:
- sg-sin-1.commons.host
- sg-sin-2.commons.host
- my-kul-1.commons.host
- lt-vno-1.commons.host
Edited by Sebastiaan Deckers