- Views: 10
- Report Article
- Articles
- Computers
- Information Technology
Heroku or Amazon Web Services
Posted: Nov 04, 2016
Amazon Web Services (AWS) and Heroku are two commonly used cloud services that let us deploy, monitor, and scale web and mobile applications. Both services provide us with cloud computing resources and are great for hosting applications. But if you’re building your first mobile or web application, how can you decide which of these options – AWS or Heroku
- is best for your application?
Choosing a hosting service becomes even harder when we take a glance at the number of products AWS offers. It’s easy to get lost.
AWS provides a wide variety of products, making it difficult to quickly choose the right solution for your needs. And we haven’t even started considering Heroku!
Let’s dive into the features of AWS and Heroku – and consider the key solutions they offer – to figure out your best option!
Heroku vs Amazon Web Services for Startups
What are Heroku and AWS?
If we search for a comparison of Heroku and AWS, we’ll see a bunch of articles that juxtapose AWS Elastic Compute Cloud (EC2) with Heroku. But comparing EC2 and Heroku isn’t very logical for several reasons, as we’ll explain shortly.
AWS Elastic Compute Cloud
Elastic Compute Cloud (EC2) is an Infrastructure as a Service product, and is Amazon’s flagship AWS offering. Before we’re able to deploy an application on Elastic Compute Cloud, we have to develop server infrastructure that will suit our application.
But what does that look like? Put simply, we’ll need to manually configure and maintain virtualized servers that run our application. We also add database instances; choose and set up an operating system; and set up a load balancer to spread the load across multiple application servers. On top of that, we must select a CPU and amounts of RAM and storage that satisfy our application’s need. We’ll also install backup servers and hook them up to the main servers.
AWS Elastic Compute Cloud provides us only with the building blocks. Our task is to select the best blocks for our application and actively manage them, not only set them up. At RubyGarage, our dedicated DevOps engineer is responsible for provisioning EC2 instances, controlling application deployment, and orchestrating EC2 infrastructure (deciding how these ‘building blocks’ interact with each other).
Heroku
Now let’s see what Heroku offers. Heroku is a Platform as a Service (PaaS) product based on AWS, and is vastly different from Elastic Compute Cloud. It’s very important to differentiate ‘Infrastructure as a Service’ and ‘Platform as a Service’ solutions as we consider deploying and supporting our application using these two solutions.
Heroku is way simpler to use than AWS Elastic Compute Cloud. Perhaps it’s even too simple. But there’s a good reason for this simplicity. The Heroku platform equips us with a ready runtime environment and application servers. Plus, we benefit from seamless integration with various development instruments, a pre-installed operating system, and redundant servers.
Therefore, with Heroku we don’t need to think about infrastructure management, unlike with AWS EC2. We only need to choose a subscription plan and change our plan when necessary.
This is how a conversation with Heroku might go:
- Hey, Heroku, we need to rapidly send a lot of cached data to our users!
- Here you go: Redis is ready!
- Hey, Heroku, we need more dynos to handle HTTP traffic!
- Yeah, just run the following command in CLI and specify the number of instances, e.g. three web dynos:$ heroku ps:scale web=3
- And what about a PostgreSQL instance?
- You need one – you get one! Run this command in CLI: $ heroku addons:create heroku-postgresql:hobby-dev
- Thanks, Heroku!
- Heroku, we need to restart our dynos! A new app version is coming!
- Just deploy your updated app, I’ll handle this.
As we can see, Heroku conveniently takes care of the details. Thus, we can throw all our efforts into application development. You only need a web developer – or multiple developers – to create an application and push it to Heroku using Git. All management is done via the Heroku Command Line Interface or in the Heroku Dashboard.
?omparing AWS Elastic Compute Cloud to Heroku is like comparing a microwave to a toaster. Both devices are used for heating food, but they work differently. Maybe this metaphor isn’t the most apt, but it gets across the general point: We use AWS EC2 and Heroku to reach different goals.
So, to be reasonable, we must mention another AWS product that is a direct competitor to Heroku. This product is called Elastic Beanstalk, and it’s also a Platform as a Service product.
AWS Elastic Beanstalk
AWS offers Elastic Beanstalk to simplify application deployment.
Similar to Heroku, we deploy applications on AWS Elastic Beanstalk by running commands in a Command Line Interface (provided by AWS) or by using the Management Console. After deployment, Elastic Beanstalk manages infrastructure without our control.
We generally don’t need to set up capacity provisioning, load balancing, or scaling, although we’re still able to get access to the infrastructure, if necessary, and save multiple configuration options for our application. Elastic Beanstalk uses EC2 instances to host your application, so migrating from AWS Beanstalk to EC2 is easy. And that’s great.
Originally published here
Sviatoslav Andrushko is a content manager at RubyGarage. Sviat adores writing about web development, web design, testing, and other IT-related topics.