Marc Hughes


Home
Blog
Twitter
LinkedIn
GitHub
about
I am a developer from a bit west of Boston.

Amazon EC2 - I'm sold...

29 Aug 2008

Since finding out about EBS, I've been playing with it and Amazon's EC2 (their Elastic Compute Cloud) and am very impressed.

          <p>After my intial tinkering I'm to the point where with a couple keystrokes, I can start up an instance of a virtual machine anytime I want.&#160; It can range from a &quot;good&quot; machine to an  insanse server with copius amounts of CPU and RAM.&#160; So far I've only been using the smallest instance type since that beats out my current dedicated server box by a good margin.&#160; </p>
          <p>I'm about 90% sure I'll be switching my hosting over to this.&#160;&#160;Here's my short analysis that I did while deciding.</p>
          <p> Right now I have a dedicated server.&#160; It's a Celeron 2ghz with a 1GB ram and a single 160GB hard disk.&#160; A comparison between that and EC2 yields the following: </p>
          <p><strong>Pros:</strong></p>
          <p>Reliability - Right now I'm one hardware fault away from a weekend rebuild of the server.&#160; I've got plenty of backups and wouldn't lose any data, but there would be a royal pain in the ass in reconfiguring a new server.&#160; Under EC2, I'd be one command line away from launching a brand new instance that has the exact configuration as the original server.&#160; The EBS storage is on a more reliable, redundant, platform than the current single-disk configuration that I have.&#160; And even if that were to fail I have the same level of backups that my stand-alone server has.&#160; So worse-case, I have to launch a new instance and restore some databases. </p>
          <p>Performance - The smallest EC2 instance has more ram and more CPU power than my dedicated server.&#160; The largest EC2 instance is equivalent to about 15x of my current server which means I can scale quite a bit without even thinking about clustering, which leads to... </p>
          <p>Scalability and scaling speed- Imagine I get on the front page of some very busy site and have a traffic explosion.&#160; With EC2, In 20 minutes I could  provision a much beefier machine to act as my server.&#160; With the stand-alone option, I'm looking at ordering a new server, waiting for it to become available, configuring it, moving data over, waiting for DNS to propogate to it, that's probably a few days at the least.&#160; Beyond that, with EC2, I believe I could set up a cluster in a weekend instead of who knows how long.&#160; But more importantly, EC2 allows me to scale back down just as easily when the traffic dies down so I'm not stuck paying for the peak possible usage forever.&#160;&#160; This is the &quot;Elastic&quot; part of &quot;Elastic compute cloud&quot; </p>
          <p><strong>Cons:</strong></p>
          <p>What if EC2 or EBS becomes unavailable for some reason?&#160; Amazon had an S3 outage last month and it could happen to these services.&#160; I have no good answer here.&#160;&#160; Amazon doesn't have an SLA for EC2 yet, I assume they will eventually.&#160;The only solutions for a problem like this are:</p>
          <ol>
            <li>Create an instance in a different EC2 availability zone (Each AV is supposedly seperate and hopefully outages own't span them).&#160; Unfortunately the EBS volumes aren't shared across zones, so I'd have to restore a DB from a backup. </li>
            <li>Boot up virtualization software, such as VMWare, on a dedicated standalone server and run it on there. </li>
        </ol>
          <p>What if Amazon discontinued EC2?&#160; Luckily, the images can be converted to other virtual machine formats.&#160; So I could go to another hosting cloud provider or get a dedicated server running VMWare and boot up my server on it. </p>
          <p>Cost-wise, with EC2, I'll be spending about $10 less a month than I do now for a dedicated server.&#160; (Sounds like a &quot;Pro&quot;, huh?)&#160; But, I'll be on metered bandwidth so that cost will raise over time whereas the dedicated server had the first 1500GB free so it'll cost more eventually (assuming my traffic continues to grow).&#160; But then again, the per-gig cost of Amazon is lower than my hosting provider.&#160; So if I started to break the 1500GB barrier (unlikely for the foreseeable future), EC2 would start to win again.&#160;&#160;</p>
          <p><strong>Conclusion:</strong></p>
          <p>For me, the  reliability is the tipping point one way or another.&#160; I have more confidence in Amazon's datacenter than I do in a single stand alone dedicated server so I believe it'll be more reliable.&#160; But I have no way of knowing that for sure.&#160; </p>
          <p>Either way I need a decent disaster recovery plan.&#160; With EC2, that plan can be a couple steps from really-easy (starting a new EC2 instnce), to a medium ground (Starting an new EC2 instance and restoring a database), to fairly difficult (provisioning a physical stand alone server and configuring it).&#160; With a stand alone server, that plan is a single step jumping right to the &quot;configure a new server&quot; stage. </p>
          <p> <br />
        </p><p></p>