13 Reasons Why You Should Use Heroku in Your Next Project

DZone 's Guide to

13 Reasons Why You Should Use Heroku in Your Next Project

Using the theme of the popular Netflix series, this developer tells you why you should be using Heroku for cloud deployment.

· Cloud Zone ·
Free Resource

Heroku is a Platform-as-a-Service (PaaS) that exists on the cloud, allowing software developers to build and run complex web applications without having to worry about the underlying hardware or the networking aspects of it.

I've been using Heroku for more than three years for some personal projects (small and big ones) and I truly recommend it for several reasons that I will explain below. Of course, this tool isn’t a silver bullet for cloud deployment; you will always need to know your needs in a project before choosing a tool to achieve it. Also, this is not any promoted article by SalesForce, I’m doing it for free because this tool really helps me almost every day to get things done in an easy way. 

Check out below the 13 reasons why:

1 .  User-Friendly Tool

Since its first use, Heroku has proven to be an easy-to-adapt tool, even for those who haven't fully mastered cloud tool configurations. With a well-defined dashboard, you can perform tasks such as managing, deploy and tracking metrics without major difficulties. The UX of the tool comprises the use of both a technical person and an end user without problems.

2 .  No Infrastructure Needed

As a container-based tool in the cloud, it has the support of many programming languages, a great variety of add-ons, and deployment provisioning are provided by the tool, leaving developers free to focus on their project, without having to worry about infrastructure details such as what version the OS use or which libs to install or even how to configure the firewall or hardware. However, this abstraction comes with a price, where the average processing value is just above the big players like AWS and Google.

3 .  Useful DevCenter

I’m particularly a big fan of the DevCenter that Heroku provides. Since the first few times I have used Heroku, I have encountered small problems, either with deploy, configuration or even how to manipulate the UI of the tool. This is quite common when you’re experiencing a new tool, but I’ve always been able to find an answer in the DevCenter of the platform, where the configuration steps are always well-written and objective, always explaining what was done in the background. In fact, there is nothing like good documentation to keep us using a tool, because we must admit that, when we have problems (and we will have them), we will certainly find some solution there, giving the tool an extra boost of confidence. If you want to look further, you can access it here.

4 .  Great Community

The Heroku community is still small, compared to other giants like Azure and AWS. However, it is not the quantity that makes the tool, it is the quality and community, and all the people who contribute to the tool are highly active in it, whether it is divulging and sharing information, creating tutorials, or just using it in their day to day. Especially on Twitter, the Heroku community is very active, like Chris Castle (@crc) who will always be willing to help and talk about the tool. You can also always enjoy the tool’s new features here and here.

5 .  Heroku Is Not a Big Fish, and That's Good

When we come to cloud providers, the default these days is to use AWS, Azure, or Google Cloud. When a team starts thinking about the cloud, one of these big players always appears in suggestions. But why not consider another tool? Will you really need that entire AWS infrastructure to your project? Do you need to use GCP with Kubernetes for your small application? You really must consider question like this along the time your engineering team will need to learn a new tool or even the cost of hiring some AWS Expert or Google Specialist for simple production infrastructure. Sometimes the big names aren’t the best solution for your problem.

6 .  The CLI

Heroku has an incredible Command Line Interface to help us to manage and control our applications on it. Commands like heroku logs and heroku ps will be your best friends when you use them. It’s really simple to install and start playing with it. Go ahead and create your first application using Heroku CLI.

7 .  Multi-Language Support

Heroku is really agnostic about language support. Actually, the Heroku platform supports more than eight languages from scratch, which includes languages like Node, Java, and Python.

“But since I don’t use any of those languages, I will choose another tool.”

Wait. If you use, for instance, C, Heroku has what they call "buildpack," which allows you to build and deploy using any other language into the platform. Even if you didn’t find a buildpack for your purpose, you can customize and extend an existing one.

8 .  Supports Several Databases and Data Stores

Heroku allows developers to choose from several databases and data stores according to the precise needs of individual applications. The developers can take advantage of the Postgres SQL database as a service to make the application access data quickly and keep the data secure. At the same time, the developers can take advantage of specific add-ons to work with widely used databases and data stores like MySQL, MongoDB, and Redis. The add-ons make it easier for developers to store data, manage data stores, and monitor data usage.

9 .  Huge Toolbelt of Add-Ons

As I said above, we can take advantage of the amazing add-ons and plugins that Heroku provides out of the box. You can just select the add-on and link it to your application and the platform will do the job. Of course, this doesn’t work for all apps and plugins but is way easier than configuring it by hand.

10 .  Scale-Ready

The tool has some built-in commands to help you to easily scale and be ready for eventual traffic/resources changes. Here are some basic strategies on how to scale on Heroku:

  • Horizontal  Scaling: If you see increased request queue times in Scout or New Relic, you need to make your app faster or add more dynos. As soon as you’re using more than one, automate it.
  • Vertical Scaling: Because of Heroku’s random routing, you need concurrency within a single dyno. This means running more web processes, which consume more memory and may require a larger type.
  • Process Types: You’re not limited to just “web” and “worker(thread)” process types in your Procfile. Consider multiple worker process types that pull from different job queues.
  • App Instances: Heroku Pipelines make it relatively easy to deploy a single codebase to multiple production apps. This can be helpful to isolate your main app traffic from traffic to your API or admin endpoints, for example. Heroku will route traffic to the correct app based on the requested subdomain and the custom domains configured for each app.

11 .  Good Analytics/Reports Module

When you use the Hobby plan, you have access a user-friendly panel that shows some status of your application. You can see there some metrics about usage, throughput, memory usage, and events that happen (like Heroku's overall status and application-specific details, like the unwanted memory exceed problem). As I said, the sad part is that it's only available on Hobby plans, but for $7 a month, it's worth it.

12 .  Autoconfiguration and “Convention Over Configuration” For Most Features

The focus here is to be as minimally invasive as possible. For instance, if you deploy a Spring Boot application, you should not need to perform any further configurations than that existing one in your project. If some specific configuration was needed (like a specific port or Java version) you can create a Procfile which will help you in your application needs. Another case is that the majority of network configurations are already provided, and here again, you have the possibility of configuring the details if needed too.

13 .  Deploy from Different Sources

Heroku has as main option git-based deployment. You can "link" your app directly from GitHub and enable default deployment each time when you push some code into master (Heroku will be listening on this branch). It also has an option inside (Heroku git), and you can use it as your repository as well. Alongside these options, you can deploy using Docker Container Registry inside Heroku, which is great for those project who already has an image.

These are some reasons why I’m using Heroku as my first option when considering deployment on the cloud. There are some trade-offs (as with any tool) that can be discussed in the future or in comments. Comments and suggestions are appreciated!

aws, cloud (add topic), cloud computing, heroku, paas, salesforce

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}