For the Love of Free Bandwidth from MaxCDN

So, I just got an email from Eric at MaxCDN, the company I use to host static (images, stylesheets, javascript) assets for my numerous WordPress installations. He is offering me 1 terabyte of free CDN bandwidth for sharing this offer on my blog, so here goes. I’m not great at this shameless plug thing but I can honestly say MaxCDN has made it really easy and accessible for wealthy people like me (cough, cough) to run fun little projects and use a CDN without breaking the bank. Before MaxCDN, I used Amazon Cloudfront. It was expensive!

So, here goes- 25% off MaxCDN Discount Coupon. To add some substance to this, I’ll briefly share how I use MaxCDN on this blog.

Today, this blog is a WordPress installation and I host it on the free tier from Pagodabox. It provides me with a 200MB Apache instance, a 10MB MySQL instance, 10MB Caching (Redis or Memcache) instance, 10MB Writable Storage and 1GB of Outbound Bandwidth.

I’d love to go all Visio on you but I’m going to keep it simple.



Visitor  > >  Cloudflare  > >  Redis Frontend Cache (Yay! to Predis) > >  LAMP (Linux Apache PHP MySQL)WordPress (W3 Total Cache does the CDN rewrite, Apache does the gzipping to cut down on outbound data transfer)

By the way, Nginx/PHP-FPM is sooo much better for this application. I only used Apache here because that’s all PagodaBox offers for free (yep).

Needless to say, a lot of moving parts here. What I’d just like to emphasize is that its a light weight and pretty lean blog with occasional spikes in traffic. I need to keep it cheap and also be prepared for the occasional spike when the blogosphere likes something I write.

So, Cloudflare saves me a lot on bandwidth (which is truly my most limited resource since I’m on PagodaBox‘s free tier – God bless PagodaBox). About 1/3rd of the bandwidth gets saved at Cloudflare (God bless Cloudflare also. I’m on their free tier. Frugal much?). Then Redis caches so that I have a pretty awesome TTFB as Cloudflare passes the HTTP request on to them right away after shaving off the gravy. So, if I haven’t posted lately, the blog hasn’t changed so Redis has all that saved in a super fast in-memory key-value store.

At this point, W3TC has the page rewritten with references to the CDN resources so while data is being passed back on to your PC, reader, you’re downloading the rest of the gravy that Cloudflare didn’t catch (images, CSS, JS) from MaxCDN. Makes for a pretty fast loading blog most of the time, with scale up to 25,000 concurrent requests (don’t try me, I tested). At the end of the month, I’ve typically used a little over 150MB of the 1GB provided free of charge by the guys at PagodaBox max. My point? MaxCDN is a darn cheap way to offload all the data heavy, albeit, static resources off your server stack so it focuses on generating and serving dynamic resources. Feeling adventurous enough, cache the dynamic resources that don’t change a lot too, like I’m doing with my home page and single posts using the Redis cache.

Well, thanks for reading! You earned me 1TB in outbound BW from MaxCDN free of charge. Speaking about free stuff, I also forgot to mention that I offloaded search to an elasticsearch service with and this awesome plugin. I’m on their free tier too! So, MySQL doesn’t have to choke on RAM (remember I only have 10MB here) if some adventure seeker bots 500,000 search queries into my search box in 5 minutes. On that note, buy some CDN space and start playing around with fun projects on the web too!

1 Comment

  1. Justin Dorfman (@jdorfman) July 15, 2013 at 11:07 am

    Great read! Thanks for sharing. You earned every byte (1099511627776 to be exact).


Share your thoughts...