An Interest In:
Web News this Week
- April 19, 2024
- April 18, 2024
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
AppFog vs. Heroku
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.
Applications running on Heroku are self contained…
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.
Now enough about what PAASs are, let’s get down to the two chosen candidates: Heroku and AppFog. At a glance, these services may seem quite similar. They both have support for multiple languages, provide databases and add-ons, and allow you to run your application in the cloud. But these companies took a very different approach from one another, in terms of execution.
Pricing
You might think pricing between these two competitors are basically the same, but that couldn’t be further from the truth.
AppFog’s pricing revolves around RAM. You can create as many apps and instances as you want as long as you stay within your RAM limits.
The free AppFog plan comes with 2GB of RAM. The next plan gives you 4GB of RAM, but at a steep $100/month.
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).
The cost for additional time is $0.05 an hour, and time is tracked by the second. So if you have a background worker that can do its job in 15 seconds, you will only be charged for that 15 seconds at the price mentioned above.
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.
Database support is extremely important, and…Heroku is the clear winner.
- Scenario #1 – You have one app running four instances for a complete month. This would be free on AppFog, but you would pay $107 on Heroku.
- Scenario #2 – You have more than four apps, each running only one instance. On Heroku, this would be free, while this could start to add up (5-8 apps = $100, 9-32 = $380, 33-64 = $720) on AppFog.
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.
Again, please note that this is only my personal opinion. I like to build random apps and tools in my spare time without any funding, and Heroku is better suited for that purpose. However, if you plan to build only one app, or need instances that have more than 512MB RAM, then AppFog may be the better fit.
Heroku’s pricing is also more predictable, and you can easily calculate how to make your applications profitable.
When it comes to support, AppFog is the clear winner.
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.
AppFog, on the other hand, may be a bit cheaper, but the payment thresholds seem to be spread too far apart. Using the above example, when you switch from eight instances to nine, you have to pay an extra $180 for just one instance. But then again, you don’t pay anything until you reach 33 instances, at which point you basically double your bill from $380 to $720. Therefore, sometimes you pay over $42 for each instance, and other times you pay under $12 each.
Project Management
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 Procfile
. This is where you assign names to the different instances along with how they are started. For example, if you have a Python project that serves as the web instance and a file for a background emailer, then your Procfile might look like the following:
web: python site.pyemailer: 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.