Lesson 3 of 16
26. CDNs

26.2 What are edge locations (PoPs)?

3 min read+10 XP

In the warehouse: The warehouses sit in big cities, near highways, where most shops can reach one quickly. A shop goes to whichever is nearest and open.

In the system: A CDN runs points of presence (PoPs): data centres in many cities, each with cache servers, connected to local internet providers. Big CDNs run hundreds of them worldwide.

How a reader reaches the nearest one:

  • Anycast: many PoPs announce the same IP address; the internet's routing (BGP) delivers each user's packets to a nearby one (Chapter 4 touched on this for DNS).
  • DNS-based steering: the CDN's DNS answers with the IP of a good PoP for the user's location and current load (Chapter 4).

Inside a PoP:

  • Many cache servers share the work, often using consistent hashing (Chapter 28) so each object lives on one or two servers in the PoP, instead of every server caching everything.
  • Hot objects sit in memory, the rest on SSDs.
  • A miss goes to the origin, or to a shield first (26.6).

Things to know:

  • Hit ratio varies by PoP. A small-city PoP sees less traffic, so more of its requests are first-time misses.
  • Caches evict. Rarely requested files (an old book's cover) may be dropped and fetched again later; "cached for a year" means "allowed to be", not "guaranteed to be".

Memory code: "A warehouse in every city; the road takes you to the nearest."