← Lessons

quiz vs the machine

Platinum1800

System Design

The Cloudflare Edge Network

Anycast routing and edge caches put compute and content close to every user.

6 min read · advanced · beat Platinum to climb

Be everywhere at once

Cloudflare runs servers in many cities. The goal is to serve each user from a nearby location, cutting latency and absorbing traffic before it reaches the origin.

Anycast routing

Every edge location announces the same IP address using anycast. The internet's routing naturally sends a user to the topologically nearest location announcing that address, with no client logic required.

  • Many locations share one anycast address
  • Routing steers users to the nearest edge
  • The origin server sits behind the edge

Edge cache and edge compute

Static responses are cached at the edge, so most requests never touch the origin. Lightweight code can also run at the edge, transforming or generating responses close to the user.

Latency drops because the answer comes from nearby, and the origin is shielded because most requests are absorbed at the edge.

Key idea

Use anycast so users reach the nearest edge automatically, then serve from edge caches and edge compute to cut latency and shield the origin.

Check yourself

Answer to earn rating on the learn ladder.

1. How does anycast route a user to a nearby edge?

2. Why does edge caching shield the origin server?