Content Delivery Networks (CDNs)

Content Delivery Networks are distributed networks of proxy servers that allow for high-availability and high-performance distribution of common or popular web resources. These resources can be web objects such as text, images and scripts, including CSS and JavaScript libraries, downloadable objects, such as files and software, and live-streaming or on-demand streaming media. CDNs can therefore be used as a sort of internet common cache. Indeed, by using a CDN to host all of your library files, you are combining browser HTTP caching with HTTP Reverse Proxy caching. This means that if another website or web application is using the same library files as you, your user's browser will either use its cached versions of the libraries or submit a request to refresh the files to a CDN and not your web server. This not only reduces network latency by reducing the number of requests needed globally to render the same content, but also takes away a part of the workload from your web server by delegating the responsibility of refreshing expired browser caches to the CDN's Reverse Proxy cache.

This Faster Web solution is very easy to implement. It is often as simple as redirecting web traffic to the CDN by modifying your DNS configuration. For example, Cloudflare (https://www.cloudflare.com/) does not require any changes to your web server configuration in order to start using its HTTP reverse proxy cache. Once you have registered the original domain name and IP address of your web server in the Cloudflare interface, you only have to modify your DNS settings by having the domain name point to the Cloudflare servers in order to start using it immediately. Let's use cURL to query the https://linuxforphp.net/ site, which uses Cloudflare:

# curl -v https://linuxforphp.net 

Querying the website should yield the following result, which confirms that it is now only accessible through Cloudflare:

Confirmation that the linuxforphp.net website is available through Cloudflare

As we can see, Cloudflare is indeed enabled and has added Cache-Control and Expires to the response headers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset