A CDN stands for Content Delivery Network.


It’s a series of servers distributed all around the globe, all linked together.


In the context of helping speed up a website, their job is to distribute assets (like images, JavaScript files, CSS, also HTML) so that they are reasonably near - physically - to every user that might want to access your website, in order to improve the speed of the connection and reduce the latency.


CDNs are the ultimate cache, and the cheapest way to serve content all around the world.


Visitors will never access the actual web server that hosts your files, but instead they will hit those CDN servers, helping to reduce the load.


A CDN provides


  • Speed, being closer to a user’s network improves speed and reduces latency

    速度 ,更接近用户网络可提高速度并减少延迟

  • Redundancy, if a node of the CDN fails, other nodes can handle the traffic

    冗余 ,如果CDN的某个节点发生故障,则其他节点可以处理流量

  • Reduced costs in bandwidth and server power compared to serving all the traffic from a centralized location that might not be optimized for serving lots of traffic

    与从集中位置为所有流量(可能未针对大量流量进行优化)提供服务相比, 降低了带宽和服务器功耗成本

  • Security by adding additional levels of protection at the CDN node level. Not all CDNs do this, but most do and also introduce DDoS attack protection mitigations

    通过在CDN节点级添加额外的保护级别的安全性 。 并非所有CDN都这样做,但是大多数CDN都这样做,并且还引入了DDoS攻击防护缓解措施

A CDN gets the original resource from an origin server, and as long as the origin does not change, it will continue serving its local copy of an asset:



Each CDN server is located in different continents, and depending on how the CDN is built, in different parts of a continent as well.


Every major company uses CDNs for serving assets, and you can too, by leveraging the services of companies like Cloudflare, Amazon CloudFront, Google Cloud CDN, Azure CDN or others.

每个大型公司都使用CDN来服务资产,您也可以利用Cloudflare , Amazon CloudFront , Google Cloud CDN , Azure CDN或其他公司的服务。

CDNs might be integrated directly by your web hosting as well. I use Netlify for example, and they integrate an automatic CDN, which makes my site fast in every location of the world.

CDN也可以通过您的虚拟主机直接集成。 例如,我使用Netlify,它们集成了自动CDN,这使我的网站在世界上的每个地方都可以快速运行。