A content delivery network (CDN) is used to store local copies of files, in order to increase the speed of delivery to users near that point. These networks only cache files after a user’s request for a limited time. The latter can affect the delivery speed in two situations:
- The first time the file is requested (since it has not yet been able to be stored in the cache).
- After a long period of time in which no user has requested the file (since the time has passed and the file is no longer in the cache).
However, a CDN helps to optimize the path from the source to the endpoint. To understand how it works, let’s imagine that an Australian user wants to watch a video hosted in Spain. Since it can be slow to load, the CDN caches the video on an Australian server, so that other users who request it can load it almost immediately.
CDNs are used to decongest the Internet for video and audio playback. Some of the most common ones are CloudFront, Akamai, StackPath or Limelight.