Blogthedata.com is 1714% faster!!! Now people in Jakarta, Indonesia, can ping my site faster than a sip of coffee.
This site lives on a Linode server based in Dallas, TX because I guessed most site traffic would come from the US. Dallas is a midpoint, nearly equidistant from NYC and Los Angeles, the two most populous US cities.
Last December, I added likes and views to blog posts. I track views by counting unique IP addresses that visit at least one post. The logic gets confused by VPNs, but it's a good approximation. It shocked me to discover 776 IPs have visited blogthedata.com, spread across 46 countries and 203 cities!
Now it was time to discover how blogthedata.com performs in other countries. I ran an online audit tool, Speed Vitals, to measure TTFB (Time to first byte) from 35 locations in the world. For cites in America, the speeds weren't too bad.
But for cities far from Dallas, it was slowwww. Most took over a second, some over 2 seconds!!!
To speed things up, I used CloudFlare's edge network to cache pages on different servers around the world. Instead of only being in Dallas, Blogthedata.com could be EVERYWHERE. Best of all, CloudFlare's edge network is free with up to three page rules.
CloudFlare's Edge network
There is a big drawback to using an edge network. CloudFlare does not guarantee each node will have the latest snapshot of your site. The smallest value possible is two hours. This means site changes can take up to two hours to propagate. For websites requiring up-to-date content, this is a deal breaker. Still, with page rules you can be smart and only cache the static portions of your site and leave out dynamic content.
For static sites, it's a non-issue. If it takes two hours to see new posts, I guess you'll just have to wait!
The way the caching works is that CloudFlare caches pages on the edge based on page rules
I cached every page on blogthedata.com using a wildcard matching all subpages. After applying the rule, I eagerly waited two hours for a TTFB re-test. I was delighted to see massive speed increases across the board. 5-10x increases in the US.
The gains are even more apparent in Asia with 10-15x increases. In Jakarta, Indonesia, users went from a 1,200ms TTFB to 70ms.
You can see CloudFlare's edge network in play by checking HTTP response headers. If you see 'cf-cache-status HIT', that means CloudFlare served the resource instead of your hosting server.
Adding your website to a CDN edge network can improve page load dramatically for users accessing your site around the world. After adding my site to CloudFlare, some locations had a 17x faster TTFB (time to first byte). The drawback is that it can take up to two hours to see new content.
Add some (or all) of your site to a CDN edge network and reap the benefits of a faster TTFB for your users!