AppFog vs. Heroku which is best?
Choosing a platform as a service (PAAS) for your new web application can be a difficult and confusing task. There are countless platforms to choose from, each having their own strengths and weaknesses. To aid in your decision, I have selected two of the best options available. I will go over some of the key aspects in each PAAS so that you can make a more informed decision.
For the unfamiliar, PAAS usually refers to a service that takes care of the underlying hardware and OS that comes with building a web application. As developers, these platforms allow us to easily build or prototype applications without handling any hardware or configuring servers.
You might think pricing between these two competitors are basically the same, but that couldn’t be further from the truth.
Your RAM is shared across all the applications in your account. The minimum RAM per instance is 128MB. So you can have up to 16 instances at 128MB, a single instance with a whopping 2GB, or anything in between.
Heroku, on the other hand, charges you for your instance’s CPU time; RAM comes free with each instance. Your applications do not share billing hours, and Heroku gives you 750 free hours per month per application. This is enough to run one instance for a month and still have time left over (30 days x 24 hours = 720).
It’s difficult to compare these pricing plans, because they both have their strengths and weaknesses. Let’s compare a few cases on both of these platforms and calculate how much you would pay. I’m going to calculate the prices based on 512MB RAM AppFog instances; this is what you get from Heroku. Naturally, optimizing your app’s RAM footprint will give you more out of your account.
I personally prefer Heroku’s pricing because of the “per app” model, as opposed to AppFog’s “per account”. This allows you to build both a full-time app and a part-time background worker while still being within the free plan’s limits. Of course, you would have to start paying for an app if it becomes popular. Contrast that with AppFog, where, eventually, you would have to start to shell out some cash before gauging the demand.
Consider for a moment that one instance of your app can handle 100 customers. At $36/month per instance, you can easily divide the cost among the customers and come up with a sustainable price that scales with your application.
This is another area where Heroku greatly differs from AppFog. Applications running on Heroku are self contained; all the workers and web instances are combined into one Git repository. This works by placing your whole application (Web server, background workers, scripts, etc) in a Git repository, and making a
web: python site.py emailer: python emailer.py
The first word of each line is the instance’s name. The second portion (after the colon) is the command to run the app. With a Procfile, you can scale any instance at will through the site, command-line, or API.
AppFog is a bit different. You must create a separate ‘app’ for each background process, making your app not feel completely cohesive. Additionally, all your apps on one account get mixed together. For example, if you have multiple apps in Heroku, then your app structure would look something like so:
App1 -web instance -worker_1 instance -worker_2 instance App2 -web instance -worker instance
This is straightforward, but compare that to AppFog:
App1_web App1_worker_1 App1_worker_2 App2_web App2_worker
In my opinion, AppFog’s approach is less clear, but this comes down to the fact that AppFog resources are shared across apps.
Database support is extremely important, and between these two PAASs, Heroku is the clear winner. Heroku only offers PostgreSQL, but their native PostgreSQL database is a superb, production-quality database. It’s not something they slapped together; they even offer it as a standalone product.
If your application is small, or if you’re not really concerned about downtime or disk space limitations, then you can really go with either PAAS. But if you are building a production application and need a reliable, feature rich database system, I suggest you use Heroku’s Postgres databases, even if you are planning to go with AppFog for your hosting. As I already mentioned, Heroku does offer their database as a standalone product at a very competitive price.
Both services provide many of the same add-ons, but Heroku provides considerably more, due to the fact that they’ve been in business longer than AppFog. Heroku offers over 100 add-ons, while AppFog, at the time of this wring, offers around 13. Do I think this should be a deciding factor? Not really. It’s certainly nice to set up a 3rd party service with one click, but you’ll want to directly signup for the add-on instead of going through Heroku or AppFog. Doing so sometimes gives you better features and clearer pricing information.
When it comes to support, AppFog is the clear winner. Heroku has been around a while, and you can probably find some information on what you need online, but their support feels outdated. You first have to search their knowledge base, and only then can you open a new ticket. AppFog, on the other hand, offers live chat support. It’s hard to beat instant results.
To help make your decision easier, I’ve created the following table to summarize all the points made above:
Does this mean you should go with Heroku, because it won 3.5/5 times? Not necessarily. Everything above is true, but can you compare a win in add-ons as important to a win in pricing? Ultimately, this is something that only you can decide based on your application’s needs.