CacheFly Sorry about lack of updates on this site. This is something that I’ve done last week — trying out CacheFly, the Content Delivery Network, to host some of my static files.

What is Content Delivery Network, and Why?

Why Content Delivery Network (CDN)? In layman’s term, it makes your website appears faster to your visitors with minimum change on your site. There are many reasons why a website appears to be slow. It could be a slow server that takes ages to generate that dynamic page. It could be a slow network or throttling on server’s outbound port. Or it might just be the connectivity between the server and its visitors. When you have high latency due to geographical separation, and have many Javascript, CSS or other media files on the page — a slow link between your visitor and your server can really slow down the website.

This is especially true with Javascript files. Many Javascript files alter the content of the current page so it is prudent for browsers to fetch only one Javascript file at the same time, whereas a browser can usually fetch multiple images concurrently. In other words, if your browser is downloading a Javascript file, it will basically stop rendering progressively as it waits for the download to complete. With modular CMS adding random JS files and many Javascript-based “applets” around, no wonder page will render slowly. I recommend using Firebug and YSlow to detect what is slowing down the page rendering. I have to admit that HostingFu is a good example on why page rendering is slow. Here’s my result from Firebug. Site is hosted at SliceHost in US, and I am browsing from Sydney Australia at ~220ms away.

As you can see those external Javascripts can only be downloaded serially, and the time downloading them really adds up. This is especially true when your website is miles away from your visitors, which is the case here between myself and SliceHost.

That is where the content delivery network can accelerate a website. It does not really make your webserver run faster (except for off-loading serving some static files). However by serving Javascripts, CSS files and images files from a server closest to your visitors, it can really shrink the page rendering time so your website will appear to be faster. By using techniques like anycasting, static file requests can be routed to the server closest to the visitors where ever they are (in theory).

This technique has actually been used by the “big guys” for a long time, and the most well known CDN provider, Akamai, is certainly marketed for those big guys — to a point that I cannot even find the pricing table without needing to contact the sales.

Introducing CacheFly

Sorry about the long introduction, but that’s where CacheFly comes in — a global CDN service that actually has a pricing plan for the small guys like me, who only needs around 50GB/month for JS files and small images/icons. They too are anycast-based CDN (*.cachefly.net all seems to resolve to 205.234.175.175 at the moment). They have servers around the planet. They have a plans table that makes sense and without me jumping through hoops to get it. Moreover their 30 days free trial seems to have a rolling date…

CacheFly pricing

Free trial is actually very useful, as it lets me to try out their technology to evaluate whether it is actually useful for my websites, before I commit to using it. I used this opportunity to test out static file serving for one of my sites moved from Australia to US. That site has 90% Australian visitors (70+% from Australia East Coast) and some Asian traffic. Serving everything from US certainly makes it a bit slower (relating to Australia-based sites) so I think it would be a good site to test out whether CacheFly’s CDN can fit the bill, especially when they have a node in Western Australia peered with WAIX.

And it turns out that it is actually not that good for my case. Thanks to the free trial I can test out the technology without paying a cent (except for time spent setting it up).

What’s Good

Before I talked about what is not working for me, I’ll say something good about CacheFly first.

  • Fast sign on and instant account activation. My account is set up pretty much right after I put in my details. I got a login to their control panel straightaway and got the credential to upload files via FTP.
  • Fast file mirroring. I used weex to upload my files to CacheFly, as it does has rsync-like checking against your local versions to ensure two are in sync. File mirroring occurs when you log off from FTP, and it gets onto my local mirror pretty quickly from what I can tell.
  • It works! No false advertisement here. After my files are mirrored, they can be downloaded pretty quickly around the globe.

If you have world-wide audience for your website, and you want to improve the static file serving performance, then CacheFly is indeed a good choice on a budget. But…

What’s Not So Good for Me

It turns out that CacheFly actually does not really work for my particular site, where 65-70% of visitors are from eastern states in Australia.

  • There is no point of presence in Australia east coast, despite the populate here is much greater than west coast. Well, they do have a presence in west coast, peering with WAIX. So I guess 55ms from Sydney to Perth is not too bad, compare to 155ms to LAX.

    Wrong. Instead of using the CacheFly POP in Perth (which I think is only available with ISP peered with WAIX), all Eastern states have their traffic routed to Tokyo Japan! All right. It is not that badonly 115ms return trip time there, but the benefit of CDN certainly does not look as good as it would have been.

  • Anycast does not always work. CacheFly’s trademarked BestHop is supposed to find the best POP. However, networking is a complicated thing, and finding the best POP for all visitors is definitely not trivial.

    Picking Japan over LAX is already an interesting decision, as historically Australia does not have very good pipe connecting to Asia. At least when it gets right, it appears to be faster than from LAX. However when tested from an alternate location in Sydney, traceroute to Tokyo actually route through Palo Alto resulting return trip time at the range of 270ms — it would be much faster by going to LAX directly!

  • No rsync/sftp access in low-end plan. The $15/month Basic Plan only comes with FTP access, which should not be used for file transport in the first place. It does offer rsync/scp/sftp access in Plus and Premium plans, but there is a big pricing gap between Basic and Plus. As I am going to use around 40-50GB/month, there is no point for me to commit to a plan that gives me 267GB/month just for its scp/sftp access.

Another “service is good, but does not work for me” story on HostingFu…

Alternative?

I actually do not know whether there’s any CDN service provider that has good plans for us small fries that also has good POP in Australia, otherwise I will be very interested in testing out.