ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Internet & the Web

Introduction to Heroku

Updated on July 9, 2012

Primer

This is to be the first of hopefully many articles detailing Cloud services. It is designed to help new developers learn about what resources are available, as well as outline some of the pros and cons associated with each system when it comes time to scale.

What is Heroku?

Heroku is a platform-as-a-service for hosting web applications. It provides a layer of abstraction over Amazon Web Services (which is technically infrastructure-as-a-service), handling much of the more tedious IT tasks, such as database management and load balancing. While this layer comes at a price, Heroku offers users a unique service. Additionally, thanks to the free service tier, their platform is a great place for fledgling developers to start.

Heroku | Cloud Application Platform

Source

Getting Started

Heroku-based applications have essentially two components: processes and database. By design, Heroku's file system is read-only. Application state control is via the database, which ranges in price from free to $6,400/month.

Processes, or what Heroku calls "dynos", come in two flavors: web processes and workers. Web processes serve your application's pages and may be increased/decreased to suit demand for your site. Workers are for administrative tasks, such as database I/O. Regardless of type, all workers cost $0.05/hour each.

Free Tier

To promote the platform, Heroku offers a free usage tier that includes 750 dyno hours per month and a 5mb database. While not huge, you might be surprised how much one can do with a 5mb.

Databases

The next step up from the free tier is a 20gb shared database for $15/month. "Shared" means that the database is available to all applications running under the account.

After the 20gb shared database comes a slough of production databases. These are available on a per-application basis and run from $50/month up. All production databases have a maximum storage capacity of 1tb, but differ by cache size.

Production Databases

Application Development & Deployment

Originally, Heroku was available only to Ruby-on-Rails developers. However, they have since expanded to include, among others, Python frameworks. For Python developers interested in test driving the system, they provide a Flask tutorial. The only requirement for applications is that any included modules be available via pip installer. Deployments are with git and application control (dyno management, resource deployment) is through Heroku's command-line interface (the "toolbelt").

As for developer operating systems, Heroku supports Linux, Mac, and even Windows. As a Linux developer for the last 8 years, I found the deployment cycle incredibly smooth and very robust. After pushing code with git and starting a dyno, the system automatically picks up revisions and restarts the app. All logging is handled automatically and is accessible from the command-line.

Conclusions

Heroku's platform offers a phenomenal system for application deployment and scaling. This does, however, come at a considerable cost. Databases and processes are cheap to start, but prices escalate rapidly. Add in a few bells and whistles, such as NoSQL or memcached, and your bill can grow substantially.

While I would not call myself a veteran application builder, I do have a strong background in production software engineering in C++ and Python. I found Heroku's design/deploy process very easy to learn, very powerful, and fun. If you're looking for a hobby project or introduction to web apps, I can't suggest a better choice than Heroku. For an early stage company, the advantages are still there (assuming database demand is moderate to low, which allows you to keep your costs down). However, given such inexpensive resources directly available from AWS, my gut tells me there are definitely better opportunities to reduce costs and maximize profitability.

Comments

    0 of 8192 characters used
    Post Comment

    • DakshaDesign profile image

      DakshaDesign 5 years ago from Chandigarh, India

      Great read here! I appreciate you making this nice lens