Cianplan

Level 1: Foundations · L1.2 DNS & CDNs

Anycast and edge compute

Explain how anycast routes users to the nearest edge and what runs there.

10 min · Free

What you take away

  • Anycast announces one IP address from many locations and lets BGP deliver each user to the closest one by network path.
  • Because it works below DNS, there is nothing cached: withdrawing a route moves traffic in seconds, which is why it is real failover.
  • Closest by routing is not always closest in milliseconds — BGP follows peering and policy, not distance.
  • Edge compute runs small, fast, stateless code near the user; anything needing your database is now further from its data.

How the class is laid out

  1. The problem
  2. The simple version
  3. Why this is the failover DNS could not do
  4. What actually runs at the edge
  5. DNS resolution
  6. TTLs and routing
  7. CDNs
  8. Anycast and edge
  9. Check your understanding