Arrow Down
Web Development

What Is The Best Place To Host A Ruby On Rails Web Application?

Amit Ashwini
-
May 30, 2017

It can get tiresome when faced with the amount of research you need to complete before building an application or website. The frustration associated with research is sometimes an indication that you’re not doing the right kind of research. Consuming a lot of content in a day does not equate to valuable research because you end up finding a lot of contradictory material out there, putting you back to square one. I hope this content proves useful and cements the little research you’ve already done about hosting your Ruby on Rails (RoR) application. If this is where your journey begins, then I hope this sets your foundation.

Skip the next three sections if you’ve already built your Rails app and you’re just looking for hosting advice.

What’s Rails?

Ruby is a programming language used on the web application framework Rails.RoR is meant to be coupled with an agile development methodology, which enables small development teams to build and extend features fast. Rails paves the way for rapid development of Don't Repeat Yourself and emphasizes Convention over Configuration, allowing developers to code naturally.

Why Rails?

Twitter, Bloomberg, SoundCloud, Goodreads and many other successful companies use Rails as their backend development framework of choice. There are still many websites out there that use PHP, but it is more suited for basic sites like blogs. On the other hand, RoR is meant to build more robust web applications that are easy to maintain, efficient and scalable. Rails is also a good choice if you want to focus on a small-scale high-quality application first and grow it over time. Ruby is a flexible and forgiving language, which helps your developers save a lot of time. It’s ready to use elements means less coding, leading to shorter development cycles, which translates to lower expenses.

Conflicting advice

Ruby on Rails is a beautiful marriage that couples the simplicity and versatility of Ruby with the Rails framework, allowing programmers to code naturally. To add to that, Rails is a free open-source framework with enough documentation to last a lifetime of coding, so of course, it gave birth to a passionate and helpful community. This has lead to lots of conflicting advice about your hosting options. Looking at endless pages open across your browser with differing opinions is an overwhelming experience. Sadly, there’s no getting around the research you need to do, but we hope the advice that follows helps with your decision.

Your Needs

You’ll have figured out by now that most hosts provide you with at least a basic support for Ruby on Rails due to its popularity. Let’s start by discussing your requirements:

  • You are new to Rails, so you need a hosting service kind to you.
  • You want to make use of your domain while hosting.
  • You are looking for a hosting company that supports the latest versions.
  • You’re short on cash, so you want a service that’s easy on your wallet.
  • Scale. Scale. Scale. You have big plans for the future, and the hosting infrastructure you select must allow you to embrace all those big plans.

Now pay close attention to those requirements. You must consider whether it is the hosting service itself that’s meant to shoulder this responsibility. For instance, scalability has less to do with infrastructure and more to do with the architecture and code you’ve employed. If your code has lots of bottlenecks, adding more servers or instances won’t help your application scale to support more users.

The Deployment

OK, now we’re all caught up on your requirements for your hosting service and your application is just waiting to meet the people of the world and make the Internet its home. Time for deployment. Once you’ve prioritized your needs or anticipated the needs of your users, it gets a lot easier to narrow down.

If you’ve decided to go for a dedicated Ruby on Rails host, they will be optimized to run more efficiently, providing you with pre-installed features and fast updates to keep up with the new versions of Rails. When it comes to the pricing, it’s consistent. Although, if Ruby on Rails support is included, it usually won’t influence the price of service. Furthermore, always make use of a Content Delivery Network (CDN) and configure your Rails app accordingly.

  • Amazon Web Services (AWS) EC2: The Elastic Compute Cloud (EC2) is the AWS flagship product meant to meet all your scaling demands. You’ll have to set up things yourself, so this is not a very appealing option for newbies. Since AWS is designed for intermediate to advanced developers, it offers less free support. The benefits that come with this choice are: it can be customized to perfection, and AWS secure servers are reasonably priced. Heroku is built on top of EC2. We’ll tell you more about that option in a bit. AWS also offers you a lot more services than DigitalOcean.
  • Google Cloud: Google Cloud handles most of your system administration while the option to scale up is always available. It comes with detailed and easy tutorials that guide you through the entire process. The documentation is clear, but the installation might be a bit rocky. Nevertheless, it is powerful. In a way, it’s a trade-off between usability and customizability. This platform is for the beginners out there, and it will guide you through the whole process, which helps you set it up quite fast. The integration with Rails is excellent and comes at extremely affordable rates. Google Cloud also boasts of some of the fastest Virtual Machines (VMs) on the market.
  • Microsoft Azure: Azure is another cloud provider that handles all the technicalities for you, using an infrastructure that already exists and is constantly updated. You don’t have to oversee the virtual servers and other virtual infrastructure running beneath your application. Azure too comes with a robust and reliable storage service, but the resources aren’t even close to what Amazon has to offer. This is one of the reasons why Google and Microsoft have an edge on the price though. Azure also comes with extensive coverage and good support for Asia. Although, it doesn’t come with a good platform when it comes to documentation and APIs and it does tend to put you in a “Microsoft-lock”, meaning it’s designed to be used with .Net and other languages and frameworks supported by Microsoft.
  • Heroku: If you’ve read through some articles on the topic before you landed here, you would have come across Heroku. Heroku is recommended by so many developers because it’s the easiest application hosting service for deployment. All you have to do is tell the server what you want, and your Rails app masquerades as a Git repository to their server. Some would have you convinced that it's the cheapest. Well, that’s true in the beginning, but the prices soar as your application grows. Having said that, it’s still a great option if you want to save time and skip the sysadmin work. Also, if your application grows, so should your budget because having too many users is a good problem to have. With Heroku, you don’t have to worry about replication, horizontal scalability or infrastructure. Also, you can use your own domain, and it’s kind to newcomers. To bring down the prices, you could scale out vertically as much as possible, so you end up reducing the need to scale horizontally. Heroku has enough documentation to help you with configuring CDNs to your Rails app, but it has limited plugins, limited locations, and no static storage.
  • DigitalOcean: DigitalOcean is advertised as a hosting service tailored for advanced developers. It’s a cloud VPS provider at affordable hosting rates and comes with decent documentation and computing power. Its customer support is lacking though. It has servers in USA, London, Amsterdam, and Singapore. It’s relatively new on the market but growing. You should go for this if you are bent on economizing your hosting needs, but our experience with DigitalOcean hasn’t been great.

Shared hosting

There are lots of shared hosting providers, but it’s not the best way to host most applications. Ruby Gems system helps RoR with dependency management, which means your Rails application will be downloading and installing a bunch of individual gems to keep your application up to date. The permission to do this might become a problem within a shared hosting environment. You also get limited CPU and RAM while Rails makes quite heavy demands on these resources. Don’t fall for the “unlimited resources” gimmick because there’s always a catch. In these cases, I would advise you to opt for a VPS, although it’s cheaper to use a shared host. You’ll also get a good amount of traffic and disk space. Shared hosting is like sharing an apartment. You split the rent and share the responsibility with the other occupants. This is where your advantage ends though. Even so, as long as you educate yourself about the pros and cons of Shared Hosting, you’ll be fine.

Before we wrap up, let’s not forget to monitor your application once it’s live. Deploying Rails is just the beginning. You must monitor your application when you release your production application. Just remember to install some lightweight plugin, and you’ll be updated about any issues if and when they come up. Happy Hosting.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Need help with product design or development?

Our product development experts are eager to learn more about your project and deliver an experience your customers and stakeholders love.

Amit Ashwini
Bangalore