Q26: What is a CDN, and how does it improve performance?
A content delivery network caches content at edge locations closer to users, reducing round-trip latency and origin load. It is especially effective for static assets, downloads, and cacheable API responses. Configure cache keys, TTLs, origin shielding, compression, and invalidation. Personalized or sensitive responses need careful cache-control rules to prevent one user's content from being served to another.
Key Takeaways
- CDNs reduce distance to cached content and protect the origin.
- Incorrect cache keys can leak personalized data.