When we started building UserApp we all agreed on one thing. Focus on the things that we did best and outsource the rest.
This played in well with our choice to go with a CDN instead of hosting our front-end ourselves. After all, our front-end is just HTML/JS, so why bother hosting it ourselves when someone else can do it for us? Less servers to manage = more time to spend on development.
But we had some requirements.
The CDN had to be backed by a trusted company, it had to serve content at blazing speed, and it had to have high availability and allow us to provide a custom SSL certificate.
This was the beginning of 2013, so couldn’t be too hard to find right…
Since we’re heavily Amazon driven, this was naturally what we started out with. And we were using it happily during development until we got to the step where we needed SSL. This was when we hit the brick wall.
To quote "We charge a fixed monthly fee of $600 for each custom SSL certificate you associate with your CloudFront distributions, pro-rated by the hour."…. And we needed two! That means if we were to use CloudFront, we had to put up $1200/mo.
Did I mention that we are funding UserApp from our own pockets? Even though we were really happy with CloudFront the additional $1200/mo for SSL was way over our budget. So we set out to look for a cheaper alternative.
After hearing about CloudFlare and reading a lot of positive feedback we decided to give it a go. After all, their $200/mo for custom SSL was a big difference from $1200/mo with CloudFront. Also, CloudFlare was more than just a CDN. It was more like reverse proxy. And it was really easy to use and configure. Unfortunately when doing performance tests it was mostly downhill. For static HTML/JS files we were seeing avg. requests with latency around 300-500ms. Even after support, tweaking settings, turning off most features + enabling heavy caching, we weren’t seeing any difference. And then there were those CloudFlare 521 errors. Essentially errors stating that CloudFlare was unable to connect to our servers. We were using an Amazon S3 bucket. Pingdom reported that the S3 bucket was reachable but that the services driven by CloudFlare was down. So for that reason we decided to skip CloudFlare as our main CDN provider. Though, CloudFlare’s AnyCast DNS and ability to act as a reverse proxy was great. Therefore we decided to look for another CDN but to keep CloudFlare in our service stack.
After a bit of searching and reading on forums we stumbled upon MaxCDN. The major selling point was the cheap custom SSL at only $39/zone/mo (we have 2 zones though) and it definitely played a big part that StackOverflow and TNW was using them. The performance was also a lot better, around ~130ms/request on avg. Not as good as CloudFront, but a lot better than CloudFlare. Unfortunately every aspect of MaxCDN isn’t that great. The GUI was really buggy, in some cases we saw errors like ‘foreign key constraint’ and ‘internal error’. Then when trying to purge the cache of a zone using their API we were intermittently getting 504 (Gateway Timeout) errors. Not that fun.
Though, after contacting their support, all of these errors were resolved. But we’re still keeping an eye open…
CloudFront: Fast and easy to setup. Cheap except when you want custom SSL, then you have to be prepared to pay up ($600).
CloudFlare: Easy, flexible, but not that fast and somewhat unreliable. Nice if you want a cloud-based reverse proxy. Page rules are really powerful.
MaxCDN: Cheap, delivers both in terms of availability and performance. Unfortunately a somewhat buggy front-end and API. But their fast support makes up for all of that.
What is your experience? Discuss below or on the HN thread :)