CDN - Content Delivery Network
Inspired by Google system design interview: Design Spotify (with ex-Google EM)
Spread out servers that store copies of content.
Page load will be faster as there will be a server closer to the user's location, usually.
These usually store and cache content like images, songs or even text/html.
It can take off the load of servers.
For example if you have an image stored in S3, querying S3 can sometimes be slow so if it's done only when needed (cache empty), then it'll be faster and cost less (don't need to query S3)
Tools like AWS Cloudfront, or Cloudflare also provide security tools to prevent bots, attacks, etc.
← Comes after
- CachingEstablished
Cache = trade off speed vs freshness. You can also use the CDN as a cache for api results. Short term. Ok if only a few. Consider how often it changes, how…
Sources
- Google system design interview: Design Spotify (with ex-Google EM) inspired this note