New App Engine pricing model

Luca Matteis / Friday, September 2, 2011

So a couple of days ago App Engine officially announced that they were leaving preview. This has been a moment we've been waiting for and a lot of controversy has been flowing around the internet about the new prices. Specifically App Engine has released a page where you can compare your current monthly fees with the ones that will be effective by mid-september.

The major difference with the new pricing model is that you'll be charged based on how many hours each one of your instance has been running. An instance is basically a single web process running your code and responding to HTTP requests. The power of App Engine comes with these instances that host your code and are able to startup and shutdown based on the amount of traffic your site is getting - this is very powerful, and they have a scheduler that takes care of these logistics.

An instance costs $0.04/Hour. This is actually cheaper than some of the competition (look at Heroku's web dynos which cost $0.05/Hour). App Engine also gives you control on the maximum amount of instances that can idle, helping you minimize your cost.

Now, since instances are the major bottleneck with the new pricing model, we need to understand how many requests an instance can process, so that only in worst case scenarios a new instance is brought up. This might sound ridiculous but, if you're using Python 2.5, an instance can only process one HTTP request at a time.

This single fact will lead to the creation of new instances for a concurrent request, adding to your billing cost.

Fortunately for Java users, and for Python 2.7 (which should be coming out soon) users, we have the ability of creating concurrent instances - this means that a single instance can process multiple requests at the same time, effectively working as a regular web server. This will allow the scheduler to only bring up a new instance when there's no more room on the other instances, instead of bringing it up when concurrent requests are being made.

I will be doing some tests along the weekend that will compare the newly multi-threaded environment to see how many instances we can save. Hopefully the result will be drastically less than what the Python users are experiencing with their fees increasing 4x.