Content Delivery Network

Content Delivery Network
By J. Toman / on 31 Jul, 2019

Content Delivery Network

A Content Delivery Network (CDN) is a collection of connected data centers around the world that sit between your web visitor and your server, which we’ll call your origin server. When a web page is visited the CDN first checks the edge or proxy server at the data center local to your visitor to see if a cached version of the page or any other resources they requested are available there. If they are not, then the edge server will relay the request to the origin server which will supply the missing resources to the edge server. The edge server caches them for future use and sends them on to the web visitor. If the visitor is in luck and the edge server has a copy of the page, then it delivers that local copy. That is usually much faster than asking your origin server to rebuild and serve those resources every time a request is sent.


It also provides a bit of security if configured correctly. The visitor to your website only sees the IP address of the CDN and its edge servers and not your origin server. On the origin server you can configure it to accept requests from the CDN, making it more difficult for a would be hacker to poke at the boundary of your origin server.

Edge Computing

Edge computing. Image originally by NoMore201 [CC BY-SA 4.0]

Because the topology of the CDN is designed to make the edge server serving your data relatively close to your visitor, there’s an opportunity there for the CDN to modify the requested resources as they are being returned to the visitor, or even process the requests locally without involving any origin server in a remote data center. This decentralized processing allows the application to be scaled out over smaller, local servers. It reduces the demands that would be placed on the network and allows the request to be serviced faster than it would be from the origin server. A simple example of edge computing is that arrow in the lower left side of this page. That’s a little javascript app to scroll back to the top of this page. The code for that app is inserted as a Cloudflare App, the CDN that Lillibolero uses. That’s a pretty handy way to add functionality to a website without having to clutter the code for it. Much more sophisticated applications of edge computing are possible, including whole applications that run mainly on the edge and store their data in the browser.


Another example of the value of a CDN, and the application of edge computing we just talked about, is the rise of video streaming services on the edge like Cloudflare Stream. Video data is large and costly to move around the Internet, but like all data it’s cheap to store. Using their Stream service, which stores local copies of the video material, you can stream to a user relatively inexpensively. This opens up a world of possibilities for video publishing by small organizations without significant resources to invest in video marketing or training.


For all these reasons, having a CDN as part of your content delivery system is a very good idea, even for small sights that don’t expect a lot of visits. Perhaps especially for small sites as they usually are not hosted on powerful servers and can be easily overwhelmed by a spike in traffic. A CDN like Cloudflare usually offers a free plan with unlimited outgoing bandwidth for personal sites and small companies.