Why we switched from Google App Engine to EC2
tophatmonocle.com
tophatmonocle.com
Since the included version is so bad, people try to get django-app-engine-patch or django-norel working. Those also suck.
There's a mindset that if Django runs, I can keep doing things the Django way.
Nope. Abandon your old frameworks. If you're going to use App Engine, you have to embrace its distributed, scalable way of doing things. Use something made for App Engine like webapp or tipfy.
Yeah, there are problems with App Engine. It has downtime and things slow down. So does every other hosting platform.
App Engine is getting better all the time. I've been working with it for about 6 months, and nearly every month there is a new release with great new features that make developing apps for the platform better. The new 1.4 release has tons of great features that will make working with App Engine easier, like reserved instances and warming requests.
You make a good point. I am not a Python programmer but I have tried a few AppEngine tiny experiments with Django and webapp. webapp was clearly designed for the platform. Similar case for Java: JDO or JPA never seemed like a good fit to the data store, but Objectify seems crafted to add a nice but thin layer on top of the low level APIs.
I like some of the basic infrastructure that Django gives me, so I make use of `use_library()` Django 1.1 on App Engine. It's not "full" Django but I find it more palatable than WebApp and the parts of Django that fit GAE fit it well. Models, etc should be done directly on top of the GAE APIs, in my opinion.
I think Guido's rietveld sample app is a good place to start if you're new to App Engine and want to use (the useful bits of) mainline Django.
Yes, you still have to adapt to the AppEngine way of doing things. But the adaptation is much simpler ... and I completely dislike the way webapp does a lot of things judging from the examples Google provides. I like my world nice and full of free-floating functions. Wrapping things into nearly meaningless objects hurts my brain.
One of the rarely-mentioned virtues of App Engine is that it's really, astonishingly, cheap — as well as removing the system administration burden, which is also a cost in either time or money.
For a large company, web application hosting is an insignificant cost, but for an unfunded startup it can be pivotal.
(I first used App Engine in 2009, in answer to a requirement for a simple application that had to be both massively-scalable and run on a close-to-nonexistent budget. It was a perfect fit for that scenario.)
We loved this fact when we were first starting out, but after we realized how much time the various limitations were costing us I really really wished they would just let us pay them a few $k per month so the damn thing would just work.
Probably the most serious challenge for the App Engine team has been dealing with the 95%+ of their userbase that will never pay them a cent for their services, but will suck all the life out of their platform.
* App Engine's TCO is high because of development time
* EC2's TCO is high because of operations time
Hosting costs are usually not that important (except outliers like file sharing.)http://code.google.com/appengine/docs/billing.html
What I see is Storage 0.15/GB/Month, CPU 0.10 / hr, Transfer 0.10/0.12 / GB. This seems basically on a par with EC2 except with EC2 you can get steep discounts for reserved instances or even use micro instances for some things.
So how is it that App Engine comes out so much cheaper?
So if you have 100k requests in one month and each request takes 0.1 seconds you only have 10.000 seconds(or 166.66 hours or 2.7 hours) so you only pay $0.27 for that month. EC2 would bill you for 720 hours(30 days *24 hours). At a rate of $0.10 you would pay $72 instead of the $0.27.
(For this example I'm not taking the free quota into account)
If you max out one instance, you would need to add another instance and as a result of that you would need a third instance as a load balancer. So if we take the numbers from the example I gave above and assume your instance maxes out add 100k requests and you get 110k request your cost would go from $72 to $216 ($72 for the load balancer and 2* $72 for the web/application server). That is 3x more but only an increase in traffic by 10% Of course the same math applies to your database server.
GAE pricing scales linear no matter how big you are and you never have to worry about maxing it out. Of course you have some trade off's because of that, but that is what the article was about.
I guess it's a question how you define heavy traffic. I've read somewhere that Zynga runs 10,000 EC2, at that scale adding another instance wouldn't have a huge impact, but I think if you have less than 15-20 instances (which is still huge) you're cheaper off with GAE.
(Even though it sounds like I'm affiliated to GAE I'm not, I'm going to use EC2 because of the trade off's mention in the original article)
The web app I run on AppEngine 24/7 is a low volume site so I never appreciated how much the daily free quota gets you until last summer when I took one of the Google Buzz firehose reading demos and modified it to extract what I wanted from the Buzz firehose (large volume of Buzz, Twitter, etc. social messages). I just used the daily free quota and my temporary app would run for 5 or 6 hours a day before hitting the quota. Lots of bandwidth and CPU use.
That said, I never mind my monthly Amazon AWS bill because its a good value (and, for a long time it was free because of two grants they gave me).
I also would like a plan from Google where I gave them some money every month; this may happen when version 1.4 is released because I am trying to decide between AWS and AppEngine for a new project. I am curious what having three instances always spun up will cost.
I'll tell you my story, a desktop developer gone web, starting with php and cheap hosting from godaddy, spending hundreds a month for my pet projects.
Then I learned GAE was free, so why pay for monthly hosting when you can get it for free for your pet projects? I have hundreds of them so I took the plunge and started to learn python. Damn easy, not going back to php, ever.
Don't waste your time with java unless your corporate overlords dictate it. Python is ten times easier and you can go from zero to ninja in one day. Or less.
I started with the hello world example using webapp, no need for frameworks at all, even if you come from django, drop it. Webapp can do it all with a couple of utilities and the template engine (same as django) in a couple of lines.
You'll be amazed at how simple it is to build an app, of any size, once you master the basics about models, sessions, authentication, etc.
You don't need sql connections, chmod configs, apache htaccess, and stuff like that. Just get some data and render it with a template. Fucking easy!
Don't believe me? You lose, not me. Give it a try, you'll be surprised.
I am a happy GAE user and my next startup (which I hope will have a million visits a day) runs on AppEngine and no worries at all about handling them all. Google will be there for me.
GAE 1.4 will come with Channel API, an easy way to send messages back and forth, we just got multitenancy, longer task queues and cron jobs, xmpp, etc.
You get it all at no cost, you pay only a couple of dollars when you need it, when you get slashdotted, dugg or techcrunched. No sweat, no sysadmins running like headless chickens, no server rooms burning.
And that, my friend, that is peace of mind.
I was a bit taken back by the criticism on the last app-engine article. Quite frankly, sometimes you don't realize you the limitations until you hit them despite what the manual says. ("Every one's job is easy but your own.") If you haven't used GAE, you don't realize how easy it is to just get up and get going. It's absurdly simple. However, when you hit limitations you might encounter the sunk-cost fallacy, and that might propel you to keep working around its limitations.
During the same time period we've had 100% uptime for m1.small servers in EC2's US East and West regions, 99.989% uptime for EU West and 99.997% for APAC.
I am not so bothered and actually appreciate the programming model. Actually reading the story, seems like some of their architectural patterns may have run contrary to asynchronous intent.
98% availability is a deal breaker for most betting thyeir business and image.
I'm a huge EC2 zealot (and customer) - but I'm also intrigued by the concepts behind App Engine. However, there has been a spate of negative posts such as these around App Engine.
I also would like to hear from someone who is successfully using App Engine for a large scale project, and what their lessons learned, best practices are.
I'm one of those "right tool for the right job" type of person so I'd love to see where App engine might fit in some of my business' architecture.
Bottom line for me is this: on gae one dude, sans team, can be dangerous.
I'd love to hear more about how you've leveraged GAE.
Sure, the first time I wrote a toy app on app engine I ran into the so-called "limitations" b/c I didn't understand the way the platform is designed. But once you get it, it's really just a series of quite reasonable tradeoffs that you make in order to get effortless scaling.
Yes, the platform could be a bit more reliable and in some areas a bit more mature, and yes, one of my projects almost failed b/c of the datastore issues over the last few months (angry users, etc.) But we made it through, and as of Nov 6, I get very few errors and things just work again.
Is App Engine ready for every prime time app you might want to build? No. But it's definitely a platform to know about and to watch carefully.
One other feature to note is the app versioning capabilities. You can simultaneously run lots of different versions of an app... useless at first, but extremely valuable later when you want to get aggressive and roll out updates gradually, etc.
And, there is ZERO sysadmin work and NONE of the usual web server setup yak shaving.
Walk Score uses AWS where it needs heavy compute back-ends, but all front-ends (including API "front-ends") are GAE-based.
It's been a good experience overall, but this last month I have spent weeks pulling my hair out trying to do a join. I have a work-a-round in place now, so hopefully it will be smooth sailing from here on.
If I do run into performance issues I may have to switch, but then it won't be to hard to migrate and I've still had a free development environment which has pushed me to learn and cost me nothing.
Google should get it, in that they need to offer support if they want to run this kind of business. But customers should also know that Google doesn't do support, and they will need support, so GAE is probably not a good fit.
If that's right, I agree as well.
As a college student who is looking to build a project on the side as a means for experience and a way to handle an issue we have, should I look into something other than GAE? I really do not intend to make our idea a startup or anything. Any help would be appreciated!
There have been a number of posts attacking App Engine recently, and a lot of good discussions have come out of them. The two things issues that seem to get brought up most are app design and reliability.
- Reliability: App Engine reliability used to be horrible, but it's getting better.
GAE was the first service I ever developed for where reliability was an issue. I've hosted apps on Linode, Slicehost, EC2, and my experience with those companies caused me to dismiss claims of downtime and the importance of an SLA.
Nothing sucks more then seeing your system go down for days at a time, and not being able to do anything about it. I'm glad that GAE is addressing this issue, but I'd be wary of running anything commercial on their services without buying a business plan.
- App Design: Pretty much everyone agrees that you have to write applications the way GAE wants you to, or you'll fail.
The built in GAE Python library is great for writing simple, highly scalable websites, but it's too limited to develop complex applications on. Our application has over 20KLOC and uses numerous third party libraries. In practice, we found that it was difficult and time-consuming to write our application without turning to a more established framework like Django. We were also concerned with the vendor lock-in that would be caused by building on library that could only be run on GAE. Projects like TyphoonAE (http://code.google.com/p/typhoonae/) are starting to make this less of an issue, but they aren't mature enough to provide an exit strategy.
We built our application on appenginepatch, a third party port of Django to GAE. Django was not designed to run on a non-relational DB, and GAE was not designed to handle a heavy framework like Django. Our decision to build things our application on Django ultimately lead to most of our problems, but eventually saved our skin when we decided to switch away from GAE.
I don't know if developing on the App Engine is still as bad as it was before. Maybe it's changed in the last few months that we've been on EC2
From what I've heard, things have dramatically improved from how they were a few months ago.
* http://www.espians.com/why-app-engine-is-not-appropriate-for...
But, despite the various problems, I still use App Engine for various applications. There are few platforms that can even compare to its power and simplicity. And good luck finding a NoSQL datastore which offers the power and scalability of App Engine's one.
In fact, if there was a decent open source alternative to the datastore, I'd switch away almost immediately.