Google AppEngine or Amazon EC2 for my web app?

Lately I’ve been investigating how to host a web application I’m building.  Being a personal project I’ve also been debating what technologies I’d like to use to write it.  I pay for a hosting account for this blog that includes Ruby on Rails and Django but it’s really a developer account.  I’m also not sure that I want to use Rails or Python.   I’m a Java developer during my day job and I have been thinking about expanding my skills in that area with this project because I don’t have that option at work.   In the end I think it boils down to two options:  Google AppEngine or Amazon EC2.  The question is which one?

Amazon EC2 certainly gives the most flexibility since it is essentially my own machine(s) running my own operating system choice and whatever software I want to run.   I can use whatever language I want.   It is easy to scale up when necessary and the charges that apply only apply to the actual resources used.   It is also a lot of work and it’s not cheap.   There is no free tier that would be appropriate for this project given its status.  To keep an instance up full-time would be cost-prohibitive right now.

On the other hand there is Google AppEngine.  It isn’t as flexible because I don’t have most of the choice I would have with Amazon EC2.  The flip side is that they do have a free tier.   500MB of storage and 5 million page views a month (as far as CPU and bandwidth goes) is a lot for just starting a project.   The pricing is hard to compare to EC2 because not everything compares equally but for most things the pricing is relatively equal.   On Google AppEngine I don’t have to worry about running an instance full-time.  Charges are only incurred when an application is accessed as far as bandwidth and CPU time are concerned.

Google also gives a pretty nice choice as far as development languages go.   Python and Java are the two main languages that are supported with Spring support for Java and Django support for Python.  Database storage is a bit different but they enable ORM storage for Java using JDO.   They also pretty much support any language that runs on the Java VM with some restrictions.  People are running Groovy/Grails, JRuby/Rails, Jython, Scala, etc.   It isn’t as flexible ultimately as EC2 but it’s pretty damn good.

I think I’ve made my choice.  Google AppEngine seems to be the way to go considering all sides of the decision.  Good options, good pricing, the tools I’m already used to using (Eclipse or NetBeans).  Is there any reason I wouldn’t choose AppEngine over EC2?

11 thoughts on “Google AppEngine or Amazon EC2 for my web app?

  1. I have looked into both. The thing that kept me from GAE was
    the cold start problem. I visited this months ago and
    started to look into improving my “cold start” times
    replacing some of my favorite technologies (e.g. Spring,
    Hibernate, JSP, etc) thus moving away from frameworks
    I also use, thus the flexibility I had pressumed
    went away. I hope things have changed with the latest
    announcements on Spring Roo-GWT-GAE integration.


    1. Thanks Alberto. I also read about this after posting this blog post. Not so sure it would be an issue at the moment given I’m just starting development. Something I need to think about though.

      Thanks for the reply!


    2. It would appear that pay-for “warm instances” are on the horizon. Python is also an option. The reading I’ve done indicates that the Python subsystem is much quicker on cold start.


  2. wait until you want to start your own Thread or need to use a third party library that needs to start a Timer thread or some other restricted resources Google enforces.


    1. Well, I think the prudent thing to do (which I have done) is to take a look at those types of issues prior to starting up an app to be deployed to AppEngine. They aren’t hiding anything so those are known quantities.


  3. Cold start problem: I setup a cron job (in GAE) that pings my site every 1 second to keep it warm… so far it works OK 🙂

    Java ORM: I personally do not care for JDO, and I felt the GAE documentation for it is just good enough to get you going but as soon as you run into one of the many random issues that JDO has, it leaves you hanging. For my next GAE project I am going to try to use something closer to the Data Store model, or just use the Data Store API perhaps.


  4. You comparison was very shallow, there is a lot more to compare than what you mentioned in the article.


    1. I don’t recall saying I was going to do an exhaustive review of both systems. The comparison was valid even if it was not at the depth you would have hoped for.


Comments are closed.

%d bloggers like this: