Using CloudFlare to lower bandwidth and latency
Yesterday my blog was busier than usual, and it highlighted why you should be using CloudFlare's CDN to significantly lower the bandwidth to your web server
From around 11AM to 7PM my website used around 280GB of bandwidth thanks to very image heavy posts, and a lot more traffic than usual. Luckily less than 1% of that traffic actually came from my web server. It was all served through CloudFlare
Best of all, its free.
If I assume my website was this busy all the time, I would be using over 31GB of bandwidth per hour, over 740GB per day and over 22TB per month.
This could cause it to be VERY expensive to host. A $10 DigitalOcean VPS only comes with 2TB of total bandwidth
But since I am using CloudFlares CDN, only around 2GB actually hit my webserver. That works out at 222MB per hour, 5.3GB per day and just 159GB per month.
The traffic did level out eventually, but it still meant I was using 400GB of bandwidth within a 24 hour period. For a small blog just getting started, thats not good news if you are relying on your 2TB of total bandwidth...
Saving vast amounts of bandwidth isn't the only benefit though. My website is hosted in Texas, so you would assume the latency to somewhere very far away like Australia would be terrible. But since CloudFlare has my website cached all around the world, its actually fantastic. Here you can see the average latency over 24 hours is only 3.8ms to a monitoring probe
If you want to play around with a chart like this, you can view my monitoring service here
I also explained how I made my blog and enabled CloudFlares services here