How the Cloud Saved Me from Hacker News

If you’re reading this post, we probably have one thing in common: we both spend at least some of our free cycles perusing Hacker News. I know this because it has driven most of my blog traffic over the past week. I have a habit of submitting my recent blog posts, and the other day I was surprised to see one particular post climb to number three on the Hacker News homepage. My excitement quickly gave way to panic, however, as I realized that the sudden rush of traffic had taken my blog down in the middle of it’s shining hour.

Back up a couple of months. I started blogging back in 2009 on Blogspot. At some point I was tempted by the offering of a free AWS EC2 Micro Instance; I had been thinking about setting up a private Git Server and running a few other servers in the cloud and I decided that like all of these guys, I would migrate my blog to Self Hosted WordPress on EC2. The whole migration was rather painless, I’ll spare the monotonous details because there are quite a few blog posts out there on getting the setup up and running, and how to move content. I will say that the one issue that I ran into is that I had issues with the existing BitNami AMI’s preinstalled with WordPress, so I ended up picking a vanilla Ubuntu AMI and installing LAMP + WordPress myself. Suffice to say that I’m still relatively new-ish to the Linux world, and I pulled it off without much trouble.

But now, my blog was down. Fortunately I was able to cruise over to AWS Management Console and stop my EC2 Instance, upgrade temporarily to a Large Instance, restart it, and then update my Elastic IP. Just like that I was back in business, and my blog that previously got a couple hundred hits on busy days suddenly fielded over 20k hits in a day and another 6k over the next few days.

I figured I would throw together a quick post on my experience for a few reasons. First, because some folks who posting to Hacker News may not have an idea exactly what to expect if they make the homepage. Read: If you’re EC2 hosted, upgrade your Instance size ahead of time. And second, I just wanted to marvel at the power of the cloud. A decade and a half ago I remember ordering a physical Dell rack server and hauling it over to a local ISP where I collocated it for a couple hundred bucks a month and used it host a few websites and custom applications. The fact that I can now spin up a virtual machine in the cloud in minutes, have my software stack up and running in less than an hour, and instantly scale to accommodate huge traffic variance (and all for cheap) is a testimony to the infrastructure underneath modern cloud offerings.

  1. I truly love your blog.. Pleasant colors & theme.
    Did you create this amazing site yourself? Please reply back as I’m attempting to create my own
    personal site and would love to find out where you got this from or
    just what the theme is called. Kudos!

    • Tyson Trautmann

      Thanks a ton! The WordPress theme that I’m using was created by Orman Clark (and I’ve tweaked it a bit). He’s got lots of good stuff. Good luck with your site!

  2. Nick

    I’m just starting to look into self hosting. I’m curious, what’s your normal monthly expense and hire much was it when you got the traffic spike?

    • Tyson Trautmann

      If you get by with WordPress on an EC2 t1.micro with low traffic you’re probably under $20/mo. To handle traffic spikes you have to either scale up your instance size or throw the backend on something parallelizable (not local MySQL) and setup Reactive Autoscaling. Or if you don’t mind less customizability, you can just go with hosted WordPress. All the best with your endeavors!

  3. It’s a shame you don’t have a donate button! I’d certainly donate to this brilliant
    blog! I guess for now i’ll settle for bookmarking and adding your RSS feed to my Google account.
    I look forward to new updates and will talk about this website with my Facebook group.
    Talk soon!

Leave a Reply