Interview's MateSystem Design
Interview's Mate

System Design

Architecture & trade-offs

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
All topics/DNS & Anycast Routing
FUNDAMENTALS & NETWORKING · SUBTOPIC

GeoDNS & Anycast BGP Routing

Send global users to the closest healthy edge or region automatically.

IntermediatePart of DNS & Anycast Routing
Practice in AI HLD
Subtopics in DNS & Anycast Routing (2)
OverviewResolution & TTLGeoDNS & Anycast

In plain words

GeoDNS hands different callers different phone numbers based on their city. Anycast gives everyone the exact same phone number, and the phone network connects you to the closest office.

Think of it like…

Calling 911 (same number everywhere) connects to your local dispatch center - that is Anycast.

Loading interactive diagram
Loading interactive exercise

Theory & how it works

How Anycast survives massive DDoS attacks

With Anycast, attack traffic coming from 50 countries hits 50 different local edge PoPs instead of funneling into one data center. Each PoP scrubs its local slice of junk traffic.

Best practice in large architectures: use Anycast at the outer edge (DNS, CDN, WAF) and GeoDNS/regional routing behind it for stateful regional backends.

Key points & practical guide

Summary checklist

  • GeoDNS steers via DNS answers; Anycast steers via BGP network routing
  • Anycast withdraws unhealthy PoPs in seconds without waiting for DNS TTLs
  • TCP connections can break if BGP routes flap mid-flow, so keep Anycast terminating at nearby edges

When to use it

  • Global CDNs, authoritative DNS, DDoS mitigation edges
  • Multi-region active-active apps

Watch out for

  • Assuming GeoDNS knows the user’s exact city (it sees the recursive resolver’s location without EDNS Client Subnet)

Quick check

Loading quiz
Previous subtopic
DNS Resolution & TTL Caching
Back to overview
Full DNS & Anycast Routing Lesson