I keep the lights on at the Oklahoma Shooters Association
forums. Part of that job involves ensuring that pages load at a reasonable speed.
One of the overall cost-cutting measures I use is offloading as much static
content as possible to a CDN.
As everything that I host with Anrhizan is on
Rackspace, I have a preference for using Rackspace’s CDN. The pricing is very
straightforward ($0.12/GB at the time of this post) and thus easy to estimate
based on projected traffic load. In contrast, Amazon charges per GB transferred
and per request.
were provided by either vBulletin or a theme over Rackspace’s CDN. It had worked
rather well in reducing load on the webservers, but it still leaves the user-generated
content such as custom avatars, signature pictures, profile pictures, and attachments
served via the webserver itself. (If I could find a plugin for vBulletin for
FileConveyor, all except the attachments
could be handled by the CDN).
I decided to give CloudFront a shot, even though I knew it would cost more. The
main advantage to CloudFront is that it’s an origin-pull CDN. Basically, if it
receives a request for a file that doesn’t exist on the CloudFront edge server
that was hit, it pulls it from the original source and caches it.
The forums get around 100K page hits per day, with 70K of those being users who
accessed the site within the previous 30 days. The static files provided by
either vBulletin or the themes that we use total up to just under 20MB, so
storage costs are not an issue. However, this results in ~468MB of transfer per
day. On Rackspace, this cost was ~$0.057/day.
On CloudFront, using SSL (default cloudfront wildcard, not a custom certificate), the
cost is $0.19/day. That’s basically a 233% increase. The only real thing that
increase is buying is ease of use, and it does give me the option to add all
user-generated content (except attachments).
This is all the more incentive for me to finally get around to building a
decent Drupal-based forum application.