15.May.2019 General CDN 10 minutes read 181 views Loading...
Picture Source : https://www.digitalplatforms.co.za/what-is-a-cdn/
A content delivery network (CDN) is a system of distributed servers (network) that deliver pages and other Web content to a user, based on the geographic locations of the user, the origin of the web-page and the content delivery server.
To explain how the system works, imagine you have a website (yourname.com) and it's running an a server with the following IP address (22.214.171.124).
Before CDN, if someone typed your website's domain (yourname.com) into their browser, or clicked on a link that pointed to your website, the first thing that visitor's computer would do is a query to the DNS system and get back your web server's IP address (126.96.36.199)
In order to make CDN easy to setup, CDN providers take advantage of how this basic function of the Internet works. Rather than having you add hardware, install software, or change your code, instead they have you designate their name servers as the authoritative for your domain (e.g., bob.ns.cloudflare.com / sara.ns.cloudflare.com). You make this change with the registrar from which you bought your domain (e.g., GoDaddy, Network Solutions, Register.com, etc.).
Note that designating CDN as your authoritative name servers doesn't change anything else about your website's ecosystem. Your registrar remains your registrar. Your hosting provider remains your hosting provider. However, because CDN server are your authoritative name server, they can begin cleaning and accelerating your traffic.
To make this happen CDN providers use a network routing technology called Anycast, and some other fancy tricks, to route initial DNS lookups for your domain (yourdomain.com) to the data center nearest the visitor.
The CDN data center that receives the request returns an answer, in the form of an IP address (188.8.131.52), which directs the visitor's subsequent requests to the best data center for them.
After a visitor's browser has done the initial DNS lookup, it begins making requests to retrieve the actual content of a website. These requests are directed to the IP address that was returned from the DNS lookup. Before CDN technology, that would have been 184.108.40.206, with CDN technology as the authoritative name server that would be 220.127.116.11 (or some other address depending on what CDN data center is closest to the user). CDN's frontline servers running on that IP address receive the request and perform analysis on it
If the request is for a type of resource CDN don't cache, or if we don't have a current copy in its cache, then it make a request from it’s data center (18.104.22.168) back to your origin server (22.214.171.124). Because its relatively high scale, it can get premium routes from its data centers back to most places on the Internet. As a result, while it may seem counter-intuitive, it is sometimes the case that the number of "hops" a visitor request makes going through the CDN network is less than the number of "hops" that they would have made going to the origin webserver directly, even when its not able to return a result from its cache.
The combination of these systems means that CDN can protect sites from malicious visitors by stopping them before they even get to the origin web server, save over 60% of the bandwidth that a site would otherwise have to pay for, save over 65% of the requests that would otherwise have to be handled by a site, and cut in half average page load times. In order to make performance even better, it also do some web content optimization.
Here’s another major advantage of CDN: it’s cheaper! The decreased expense is because CDN saves on bandwidth, rack space, power, and cooling Since the CDN provides the configuration and hardware, you save money and the headache of maintaining that infrastructure.
A simple Internet search will reveal CDNs that you can use with your website regardless of its degree of complexity. Finding a suitable CDN solution does not need to be a complicated process. But it is a recommended process if you are looking to improve your site’s overall functionality.
Happy to provide more detail on any of the above if you still have questions, then freely to ask.