Scaling your Ruby on Rails application with cloud computing : Heroku case study

18 April 2013 by Koustubh Sinkar 1 comment

As a business visionary, you know the problem you want to solve and you have a clear idea of how to solve it. But there’s one thing that nobody knows: Will people pay you to solve that problem? A well-built MVP (Minimum Viable Product), perhaps with a pivot or two, will lead you to the answer.

Ruby on Rails (“Rails” or “RoR” for short) enables software developers to build better software in less time with fewer errors. Rails is ideal for web-based MVPs. In fact, many ventures continue to use Rails well past the MVP stage. Groupon, Hulu, and Twitter are a few that come immediately to mind. Ruby on Rails helps developers write better webware in less time. Clients appreciate results, and Rails enables developers to deliver in a big way.
Once you have decided on how to develop your app, you have now to decide how to host and where to host it. There is a lot of buzz surrounding cloud web hosting these days and if you are researching various hosting options, you will have certainly run across this term.

So what exactly is cloud web-hosting?

Cloud web-hosting basically means hosting your web application to the cloud. The web application uses the resources of several clustered servers. This means that your website uses the virtual resources of several servers to accommodate all the aspects of hosting your site. The load is balanced, security is taken care of and hardware resources are available virtually so they can be used when needed. The cluster of servers is the cloud.


Advantages of Cloud hosting

One of the primary advantages to cloud web hosting is its scalability. When you need additional resources you do not have time to wait for customer service to assist you by increasing your bandwidth allotment if needed. If you really have a spike in resources then you risk having your site suspended for causing degradation in services to other sites on your shared server. You may experience down-time or slowness on your site caused by the increased traffic. But with cloud hosting you can increase your available resources immediately, when you need it. This can save you a lot of stress and may even save some customers from drifting away because the process is seamless. Customers or users on your site will not see any change.

There are many ways to put your application on the cloud, some of the major ones being Amazon EC2, Linode, Rackspace and more recently Heroku.

Heroku: The way for cloud

Heroku is a cloud application platform. It means that Heroku only helps you host web applications. There is a catch though, you can use Heroku only if your web-application stack is supported by them. Do not worry, Ruby on Rails is supported by Heroku. In fact, they started their business supporting only RoR deployments. One of the biggest advantages of using Heroku is that you can scale very easily. Also you do not need to have a dedicated Devops team for maintaining your server. If your MVP turns out to be a success and you need to scale very quickly, then Heroku allows you to do that as well. Heroku has been architectured in a fashion such that you can easily add resources to your webapp as the load on your server increases and you can reduce the resources when the load has decreased. Heroku has the concept of workers, which they call dynos. You can increase or decrease the number of dynos your application needs based on the load that your server needs to handle. Your cost of hosting to Heroku is proportional to the number of dynos you need to support your application load. Hence, you only pay for what you use!

Koustubh Sinkar

Follow me on Twitter

1 thought on “Scaling your Ruby on Rails application with cloud computing : Heroku case study”

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe To Our Blog

Get access to proven marketing ideas, latest trends and best practices.

Next up home


Lets build cool stuff

Share your contact information & we will get in touch!

I want (Tell us more about your dream project)