System Design Basics: Content Delivery Networks (CDNs), Anycast, PoPs, and Edge Computing
Stop treating CDNs as black boxes. Learn the internal logic of routing and distributed computing.
Data transmission is bound by the laws of physics.
When a user requests information from a web server, that signal travels through fiber optic cables, copper wires, and network routers.
Although light travels incredibly fast, it is not instantaneous. Across vast distances, such as an ocean or a continent, these small delays accumulate.
This delay is known as latency.
In a standard client-server model, a user in Tokyo requesting data from a server in New York faces a significant physical penalty.
The signal must cross the Pacific Ocean, traverse the United States, and then the response must travel all the way back.
If the application requires multiple back-and-forth exchanges to establish a secure connection, the user waits. The screen stays blank. The experience feels broken.
Engineers solve this by changing the physical topology of the network. We do not just make the cables faster; we move the data closer to the user. This is the fundamental purpose of a Content Delivery Network (CDN).
Many developers believe a CDN is simply a storage bucket for images and CSS files.
While caching static assets is a primary function, modern CDNs are complex distributed systems. They rely on advanced routing protocols and distributed computing to fundamentally alter how traffic flows across the internet.
Let’s dig into the architecture of these systems. We will look at how they manage connections, how they route traffic using a single IP address, and how they are evolving to run application logic.
The Foundation: Points of Presence (PoPs)
To understand a CDN, you must first understand the concept of the Origin Server. The Origin Server is the source of truth. It is where your database lives, where your backend code runs, and where the original versions of your files are stored.
If you have users distributed globally, a single Origin Server becomes a bottleneck. It represents a single point of failure and a guaranteed latency penalty for distant users.
A CDN introduces a layer of intermediary servers. These are grouped into data centers located in strategic positions around the globe. These physical locations are called Points of Presence, or PoPs.
A large CDN provider might have hundreds of PoPs. You will find them in major cities, near internet exchange points, and in regions with high population density.
The goal is to ensure that a user is never geographically far from a PoP.
Connection Termination
The value of a PoP extends beyond just serving files.
One of the most critical functions of a PoP is terminating the connection.
Modern web traffic uses TCP (Transmission Control Protocol) and TLS (Transport Layer Security). Before any data is exchanged, the client and server must agree on how to communicate.
TCP Handshake: The client sends a SYN packet. The server replies with SYN-ACK. The client replies with ACK. This takes one full round trip.
TLS Handshake: The client and server exchange keys and certificates to encrypt the connection. This can take two or more round trips depending on the protocol version.
If the user is in Tokyo and the server is in New York, every one of those round trips incurs a massive time penalty. The user waits hundreds of milliseconds just to establish the ability to talk to the server.
With a CDN, the connection is terminated at the PoP. The user in Tokyo connects to a PoP in Tokyo.
The TCP and TLS handshakes happen over a very short distance. This is almost instantaneous.
Once the secure connection is established, the PoP communicates with the Origin Server.
Since the CDN provider likely owns or leases dedicated high-speed lines between the PoP and the Origin, that backend connection is optimized and maintained persistently. The user does not pay the “latency tax” for the handshake.
Anycast Routing: The Same IP Everywhere
If a CDN has hundreds of PoPs, how does the user find the correct one?
In a standard network setup, every server has a unique IP address.
This is known as Unicast routing.



