Content Delivery Network (CDN)
Preview mode. Log in to write architecture notes, save your answer, and get feedback.
Content Delivery Network (CDN)
Design a Content Delivery Network (CDN) that serves static and dynamic content with low latency globally. Functional Requirements: - Cache and serve static content (images, CSS, JS, videos) from edge servers - Origin pull: fetch from origin server on cache miss - Cache invalidation / purging - Support for custom domains and SSL certificates - Analytics: hit rate, bandwidth, latency per edge location Non-Functional Requirements: - Sub-100ms response time for cached content globally - 99.99% availability - Support for terabytes of cached content per edge node - Handle traffic spikes (e.g., viral content) Scale: - 200+ edge locations worldwide - 10M requests per second globally - Petabytes of content served daily
Examples
How would you handle video streaming (large files, seek support, adaptive bitrate)?
Approach hint
Think about how a user's HTTP request gets routed to a server that's geographically close to them. DNS plays a key role here.
Common mistake
Skipping assumptions, edge cases, or trade-offs can make an otherwise good answer feel incomplete.