Twitmart ported OFF of Google App Engine

I discussed a few weeks ago how I had ported the site to Google App Engine for Java as an experiment.  This was an excellent learning experience.  Unfortunately, the performance on App Engine was simply unacceptable, so now the site is back off of App Engine and running on one of my own servers again.

You can actually compare the difference side-by-side by comparing the performance on a native Java web server (Jetty) platform vs. the exact same code running on App Engine:

Java Jetty –>
Google App Engine –>

This shows pretty clearly that the performance issues aren’t Twitter (most of the time) nor are they in my Java webapp implementation. The same code is running on both platforms. Nor is it hardware – the machine running is a very modest server that is hosting a large number of other sites.

The showstopper problem for Twitmart on App Engine is that is a Twitter mashup using the the Twitter API. It turns out that Twitter API calls from App Engine fail frequently. I’m not sure why. It should not be due to throttling as the app uses authentication but on the other hand it could possibly be that Twitter is overwhelmed by API calls from the App Engine platform and therefore throttles the entire Google infrastructure. I think the most likely answer is just that App Engine has problems making API calls (HTTP requests) in general, because I’ve seen this same problem to other APIs besides Twitter from App Engine, such as the issues we had with the Taglets API.

Regardless, it’s bad for App Engine and Twitter Mashups. It means Google’s platform is not useful for Twitter mashups or any kind of mashups. That sucks and makes the platform much less useful in general.

Beyond that showstopper issue for (and all Twitter mashups considering using Google App Engine), is the performance / consistency in general. For no clear reason, about 20% of requests just take a ridiculous amount of time on App Engine, even to do the simplest thing. E.g. a url that simply renders a template, that usually takes sub 100ms, will about 20% of the time, take 3-5 seconds or more. That’s simply too high of a “near-fail” rate for a “serious” application.

I hope that Google does address these issues and start to take serving “important” applications seriously. The idea of cloud computing in general, and Google’s “App Engine” approach specifically, is really cool. It’s very attractive to have someone else taking care of the servers, the network, patches, etc. However, there is a certain performance bar the service has to meet too, and unfortunately, Google isn’t making it yet, even for the price of “free”.

3 comments for “Twitmart ported OFF of Google App Engine

  1. Interesting post (the performance difference is amazing)…I guess there’s no such thing as a free lunch! The link to the appspot implementation is incorrect, it should be (no ‘r’).

    What is your new ‘super speedy’ hosting solution? Does it have the scalability App Engine promises? It would be really useful to know as I’m making a decision about architecture for a project very soon.

    Many thanks,

  2. Hi James,

    Thanks for the link correction, I’ve updated the post.

    The ’super speedy’ hosting solution is just some linux machines running in a datacenter. I think it performs better more as a result of some kind of delays or rate-limiting that Twitter is imposing on the Google AppEngine infrastructure.

    Although there are also issues with AppEngine (a) often taking a long time to apparently “reload” the app in some way every X number of hits to the site – not clear exactly what, but it seems to relate to the app being “swapped out” for lack of a better word. And (b) with URL-fetch operations, so any time an app uses external web services, such as REST APIs, it seems to suffer on AppEngine.

    I would be reluctant to build anythign too serious on AppEngine, but it can be a good way to prototype and host smaller, less critical apps. If I prototype on AppEngine, I would be thinking from day one about how it moves to a stand-alone or alternative platform when it reaches a certain level of importance or scale.

Comments are closed.