midCDN
How does Cache-Control: max-age differ from Expires header?
Updated Apr 28, 2026
Short answer
max-age is relative (seconds), while Expires is an absolute date/time.
Deep explanation
Mid-level CDN management requires understanding how HTTP headers influence the cache lifecycle. Using Anycast ensures high availability. When a request hits an Anycast IP, the Internet's routing protocol (BGP) sends it to the 'nearest' node. Within that node, the CDN logic looks at Cache Keys (Path + Query Params) to find data.
Real-world example
Using Origin Shield for a high-traffic e-commerce site during Black Friday to prevent thousands of edge nodes from hitting the database simultaneously.
Common mistakes
- Not including query parameters in cache keys when content changes based on them, leading to incorrect content delivery.
Follow-up questions
- What happens if the Origin is down?
- How does BGP determine the 'shortest' path?