1. Global Content Delivery Networks (CDNs)
Serving global customers from a single origin web server introduces geographic network latency. A CDN caches static assets (images, CSS, JS) and HTML pages across hundreds of Edge Points of Presence (PoPs) worldwide, bringing server response times under 30ms regardless of user location.
2. Advanced Cache-Control Headers
# Nginx Optimal Cache-Control Headers for Static Assets vs HTML Pages
location ~* \.(js|css|webp|avif|woff2)$ {
add_header Cache-Control "public, max-age=31536000, immutable";
}
location / {
add_header Cache-Control "public, max-age=60, s-maxage=3600, stale-while-revalidate=86400";
}
3. Frequently Asked Questions (FAQ)
1. What is the stale-while-revalidate directive?
It allows CDN edge servers to return cached content immediately while fetching fresh updates asynchronously in the background.
2. How does HTTP/3 QUIC protocol reduce mobile latency?
HTTP/3 uses UDP-based QUIC connections, eliminating TCP head-of-line blocking and reducing handshake round-trips to 0-RTT.
Suggested & Related Reading
Explore related engineering guides from Kenneth D'Silva:
-
Performance Optimization for Magento & Shopify: The Engineering Blueprint
Varnish VCL and Redis session offloading.
-
Multi-CDN Architecture Strategies for High Availability
DNS failover and traffic steering across CDNs.