Web Performance Fundamentals and CDN Concepts
What a CDN actually changes
A content delivery network reduces latency by terminating client connections at an edge server close to the user, then using optimized long-haul paths back to origin. Understand the split: the edge-to-user leg is dominated by RTT, TCP/TLS handshake rounds, and last-mile bandwidth; the edge-to-origin leg is where cache hit ratio and mid-mile routing matter most. Key concepts: DNS resolution and anycast-style mapping, TCP slow start and congestion control, TLS handshake round trips (including TLS 1.3's reduction to one), HTTP/1.1 head-of-line blocking versus HTTP/2 multiplexing and HTTP/3 over QUIC, and the difference between first-byte time, download time, and render time.
Traps to watch
Questions often conflate latency with bandwidth: adding bandwidth does not fix handshake RTT. Another trap is assuming a cache hit still contacts origin - by definition it does not. Distinguish origin pull (CDN fetches on miss) from origin push (content pre-positioned). Also separate cacheable object delivery from dynamic acceleration, which uses connection reuse and route optimization rather than caching.
Rule of thumb
Budget roughly 100โ200 ms of unavoidable network RTT per round trip across a continent; every handshake round trip you eliminate is worth more than a marginal compression gain. If a page needs three round trips before the first byte of HTML (DNS + TCP + TLS), collapsing them into fewer is usually the largest single win.
Worked example
A user 150 ms RTT from origin loads an uncached HTTP/1.1 page: DNS (1 RTT), TCP (1), TLS 1.2 (2) = 600 ms before the request is even sent. Serving from a 20 ms edge and using TLS 1.3 with connection reuse cuts that pre-request cost to roughly 40โ60 ms.