Hosting on Amazon EC2

I've done a fair bit more investigation into using EC2 for web hosting and it seems to be something that people do with a fair bit of success. In addition to Geert who commented on my last post and who's site rifers.org is hosted directly on EC2, there's also hanzoweb.com and www.gumiyo.com all of which just have their DNS pointing at an EC2 instance.

I still wish Amazon had a preconfigured solution that acted as the web front end and load balancer with a static IP, but it appears that it's quite feasible to just point your DNS at EC2 and your server seems to stay put.

I've also done a bunch of development against S3 with some pretty fantastic results. With a little bit of simple caching it's actually feasible to run the server here in Australia and store the data on S3 without too much pain. Having very simple APIs is nice because it allows you to build a mock S3 quite easily to use for testing without having to jump through a lot of hoops.

Overall, I'm very impressed - building a web app entirely on S3 is not only feasible, it's fairly simple and can actually speed up development. There's even a couple of personal projects of mine that S3 may be a good fit for.

11 Responses to “Hosting on Amazon EC2”

  1. Shuki Says:

    Yes, we LOVE EC2 and S3


  2. Stephan Schmidt Says:

    A friend of mine wrote a nice webdav server which is using Apache virtual FS to access data. As a side effect (he wanted to backup data to S3 via WebDAV) he wrote a S3 Apache virtual FS backend. So with using AFS you can now easily access S3 as a file system from Java.

    http://thinkberg.com/space/code/Moxo+S3+DAV+Proxy

    Peace
    -stephan


    Stephan Schmidt :: stephan@reposita.org
    Reposita Open Source - Monitor your software development
    http://www.reposita.org
    Blog at http://stephan.reposita.org - No signal. No noise.


  3. Adrian Sutton Says:

    That looks really cool. I can see a number of uses for that actually, I’ll have to play around with it.


  4. Paul Stamatiou Says:

    So rebooting an EC2 instance retains the same IP? I’ve been using S3 for about a year and naturally my interest in EC2 has been piqued and I’m wanting to try it out. Although, through the poking I did on the AWS forums, setting up EC2 requires some heavy lifting. Have you had experience setting up EC2 from scratch? What’s involved; I know about loading up your own image, but that’s about it.

    great blog, subscribed.


  5. Adrian Sutton Says:

    It looks like EC2 instances that reboot keep their IP, but it’s technically not guaranteed. Since the sites I mentioned are directly pointing their DNS at EC2 instances it must be pretty stable. I’d be interested in hearing about their DNS setup and what kind of caching times they have set up.

    Setting up an EC2 server is more work than setting up on a standard virtual server because every time you make a change you’ve got to remember to bundle it up as a new version of your image. It also makes you think a lot more about backups compared to most virtual servers (where a complete image backup is just a click away).

    It’s definitely not so difficult that you should be put off if you need to scale your application though. If you don’t need to scale your application or your application isn’t designed to scale the way EC2 would need it to, then EC2 isn’t going to give you any real benefits. I’d say it’s worth playing with just for the learning experience - I’ve almost completely set up an app on EC2 and S3 for the princely sum of $0.82 so it won’t cost much to play around.


  6. Peter Beardsley Says:

    At $0.10 per processor hour, it costs roughly $70 per month to host a site 24/7 on EC2– hardly cost effective. If they move to a per-load pricing structure, I’m sure more people would consider it as a viable hosting option.

    Definitely fun for tinkerers, though.

    What I think EC2 is cool for is a scenario where you’ve got a load-balanced architecture with wild fluctuations in processing load. Since instance spawning is scriptable, you could monitor load and automatically spin up additional servers as load increases, and kill them off when no longer needed.


  7. Adrian Sutton Says:

    Peter,
    I agree, if you don’t need to scale your app Amazon is an expensive choice. Once you have to scale up to multiple servers though it becomes a lot more economical and simpler than building your own even if you don’t have fluctuating loads. I do agree that the real sweet spot is when you have or may have fluctuating loads, or when you have a need for batch processing that can be split over multiple machines and you don’t have a supercomputer handy.


  8. Brian Clancey Says:

    Actually, at 10 cents per instance hour EC2 is a very competitive option for people who use dedicated servers. Unmanaged economy servers with 2 gigs of RAM cost between US$79 and $159 per month, versus up to $74.40 per month for EC2. EC2 scales better and is a more economical solution if more than one server is needed and where additional web servers, for instance, are needed only some of the time.

    It is great to see that some people are using it as a full time solution. But, I am finding EC2 more of an intellectual hurdle than trying to ensure an unmanaged server is running when I am sleeping . . . though I suspect EC2 solutions might work better insofar as you only need to get new instances running instead of waiting for someone to find time to press a power a button or locate an unplugged cable.


  9. Wesley Tanaka's WordPress Says:

    Using Amazon’s EC2/S3 for web hosting…

    useful comments here which boil down to:
    possible, but only useful if you need at least one fully dedicated virtual server, and it’s also a hassle.
    ……


  10. Lamnk Says:

    I just want to add that Brian forgot about the bandwidth cost of EC2. A normal dedicated box often comes with 1000Gb/month, converted to EC2 it’s around $180 PLUS machine cost $72.


  11. Brian2 Says:

    Lamnk, yes others give you 1,000GB, but that doesn’t mean you are using that much. Since you only pay for what you use, it is very unlikely you’ll actually be paying $180 for bandwidth. And if you’re using that much, you are probably making enough loot to pay for it.


Leave a Reply

Alternatively, subscribe to the Atom feed.