Content Delivery Network (CDN)
Quick Reference: Cache | Replacement Policy
Quick Reference
| CDN Provider | Features | Use Case |
|---|---|---|
| CloudFlare | Security, DDoS protection | General purpose |
| AWS CloudFront | AWS integration | AWS ecosystem |
| Fastly | Real-time purging | Dynamic content |
| Akamai | Global reach | Enterprise |
Clear Definition
CDN (Content Delivery Network) is a distributed network of servers that cache content geographically close to users, reducing latency and improving performance.
š” Key Insight: CDNs cache static and dynamic content at edge locations, serving users from nearby servers instead of origin.
Core Concepts
How CDNs Work
- Edge Servers: Servers located near users
- Caching: Cache content at edge locations
- Origin Server: Original content source
- Cache Hit: Content served from edge (fast)
- Cache Miss: Content fetched from origin (slower)
CDN Benefits
- Lower Latency: Serve from nearby edge
- Reduced Load: Offload traffic from origin
- Better Performance: Faster content delivery
- DDoS Protection: Distribute attack traffic
Use Cases
- Static Assets: Images, CSS, JavaScript
- Video Streaming: Netflix, YouTube
- API Responses: Cacheable API responses
- Global Distribution: Serve users worldwide
Best Practices
- Cache Static Content: Images, CSS, JS
- Set Appropriate TTLs: Balance freshness and performance
- Purge When Needed: Invalidate cache on updates
- Monitor Performance: Track cache hit rates
Quick Reference Summary
CDN: Distribute content to edge servers for low latency and high performance.
Use For: Static assets, video streaming, global distribution.
Key Benefit: Lower latency by serving from nearby edge servers.
Previous Topic: Replacement Policy ā
Back to: Step 4 Overview | Main Index