The Triad of Web Performance

Designing a site? You need to understand how these three interact.

Step 1: DNS (The Phonebook)

User asks "Where is example.com?". DNS replies "Go to 1.2.3.4".

Optimization: Use a DNS provider with a global Anycast network for fast answers.

Step 2: CDN (The Cache)

User goes to 1.2.3.4 (The CDN Edge). CDN checks its cache. "Do I have this image?".

If YES: Return immediately (10ms).
If NO: Ask the Load Balancer.

Step 3: Load Balancer (The Logic)

CDN requests content from the Origin LB. The LB decides which specific server is healthy and least busy to generate the response.