Cloud Zone is brought to you in partnership with:

I am the API Evangelist. Not in the sense that I’m evangelizing a single API to you--In the sense that APIs are important for everyone to be aware of. I’m paying attention to not just the technical, but the business and politics of the web API movement. I share my insights by blogging on the business of APIs at apievangelist.com, politics of APIs at apivoice.com and you can find more information about me at kinlane.com. Kin is a DZone MVB and is not an employee of DZone and has posted 72 posts at DZone. You can read more from them at their website. View Full User Profile

Vertically Scaling Our Amazon EC2 World

04.09.2011
| 1486 views |
  • submit to reddit
Audrey and I each have two separate domains that we host on an Amazon EC2 instance.  To support these, I’ve been running a small Amazon EC2 instance which runs about .12 cents per hour.  I run 24/7 which is about 730 hours a month.  So I roughly pay about $88 / month for this server.

The traffic to our sites has been growing.  I’d like to think my blogs are growing as fast as Audrey’s, but she’s kick’n my ass with her Hack Education.  Its developed a rather large RSS subscriber following as well as an impressive assortment on high value inbound links.

Even though Hack Education is growing significantly, all 4 of our blogs are growing in traffic with both of us out on the road, actively attending Silicon Valley events and the amount of writing and social media activity we are involved with.

So its time to scale.  My first choice would to be scale horizontally using Elastic Load Balancing and Autoscaling.  Our sites use WordPress as the CMS, and our database is using Amazon RDS.   So in theory it shouldn’t be much trouble to scale across multiple servers.  The one problem is images that are uploaded through WordPress are stored locally.

I have been manually storing all files and images at Amazon S3 for about 3 years now, but Audrey has yet to start doing this.  So we have to solve this problem.  I’ve tried an Amazon S3 add-on (which sucked), I think just manually uploading to S3 as a habit is the best route for any content development.  However I still have legacy images on my blog and so does Audrey.

We could deploy some sort of version control for our WordPress and create scripts that could auto checkout when an instance deploys.  I’ve done this and it works.  It would be easier to just write a script to clean up legacy images and depend on the centralization of Amazon S3 for files and Amazon RDS for our data.   Then all that is left is latest version of WordPress which I can manage with Amazon Machine Images (AMI).  So nothing site specific is stored on the server, just a web server w/ domain pointing at a folder with common WordPress files.  Ok, there is a config file, but this doesn’t change, it can be managed with AMI as well.

Soooo…until we get these images cleaned up I am scaling vertically using a larger Amazon Instance.  We are going to a large 64 bit Windows instance.  I think a large instance is a better level to be operating from anyways.  It is 64 bit and when I’m ready to load balance and autoscale, it will handle overall loads much better.

The new Amazon Large Instance is running us .48 cents per hour which at 730 hours come to about $350.00 / month.  Hmmm….jump from $88 to $350.  Ouch.  It has to be done, so I went and looked at the Amazon Reserved Instances, and for a one year term it is $910.00.  So if I prepay a year I can get it for cheaper than what I’m paying currently for a small instance.  Pretty good deal…here we go.

References
Published at DZone with permission of Kin Lane, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)