Using a free CDN, Cloudflare

Published 08-08-2011 00:00:00

CDN: Content delivery network

A CDN act as a cache for static ressources of your web server. One famous CDN is Akamai but is quite expensive.

CDN architecture is quite complex with a set of multiple proxies located in multiple datacenters around the world. The goal is to reduce the distance to the minimum between the served ressource and the user asking for the ressource.

A CDN not only saves the bandwith and load of your server but also global Internet peers involved between the client and the server.

Finaly it can acts as a cache when your server is down.

Because the CDN is between the client and the server it can do many intermediate processing:

  • optimising images
  • minifying javascript/css
  • collect statistics about requests (country/browser/…)
  • do attack detection
  • present a capcha when suspicious behaviour

Cloudflare

Cloudflare is a free CDN.

Actions needed to use Cloudflare:

  • create an account on Cloudflare
  • because Cloudflare will act as your DNS servers you need to change your main authoritative DNS for your domain (lady.ns.cloudflare.com and rob.ns.cloudflare.com)
  • copy your zone to the Cloudflare DNS
  • wait for registrar modifications

Checks:

  • Do a whois on your domain to check the authoritative DNS change.
  • Do a dig @lady.ns.cloudflare.com your.domain.tld, it should give your the ip of CloudFlare CDN servers.
  • After DNS propagation, a simple host your.domain.tld should give you the ip of CloudFlare.

Links