Definition of PaaS
Heroku and Elastic Beanstalk are both cloud platforms. A cloud Platform-as-a-Service (PaaS) simplifies the process of deploying and managing web applications, so that developers don’t have to be concerned about provisioning and managing cloud infrastructure. Cloud hosting, in general, frees companies from managing physical infrastructure; cloud computing services house infra in data centers.
For a more detailed explanation of what a PaaS is, read on here.
Heroku
Overview of Heroku:
Heroku provides web application hosting and simplifies the process of testing, deploying, and managing web applications. Founded in 2007, the Heroku platform features support for a wide range of programming languages and manages DevOps needs like continuous integration and delivery, allowing users to focus on application development. It also supports database management and web hosting services.
Pros of using Heroku:
Ease of use & abstraction of infrastructure:
The Heroku platform is known for its user-friendly interface and simplicity. It manages DevOps tasks, resulting in convenience for developers, and allowing for easy deployment.
By abstracting away the underlying infrastructure, Heroku allows users to focus solely on app development and acts as a convenient solution for infrastructure management. Users can perform most aspects of the software development process through Heroku's dashboard or command line interface.
Review apps:
Heroku's review apps feature enables users to run code in disposable applications, making it easy to merge changes to the codebase.
Add-ons:
Heroku offers many add-ons that support the development and operation of applications.
Cons of using Heroku:
Flexibility:
As companies grow and their infrastructure becomes more complex, the convenience of Heroku may limit their control over their cloud infrastructure. For startup founders working on a minimum viable product (MVP) version of their app, this simplicity is invaluable. But some companies may require more granular control or specialized configurations that Heroku may not provide, especially large enterprises.
Security and compliance:
Heroku hosts data on the public cloud, which can be a concern for companies that have security and compliance requirements. While Heroku offers premium options like Heroku Private Spaces to address these requirements.
Elastic Beanstalk
Overview of AWS Elastic Beanstalk:
Elastic Beanstalk is a PaaS offering by Amazon Web Services (AWS), similar to other cloud platforms offered by cloud providers such as Google App Engine by Google Cloud Platform (GCP). However, despite the label as a PaaS, it is really more of a management layer on top of Amazon Elastic Compute Cloud (AWS EC2) as its capabilities are severely limited compared to third-party PaaS offerings. It does offer automated application deployment and allows users the freedom to configure their infrastructure.
Some details on the differences between IaaS and PaaS cloud solutions in this article.
Pros of using AWS Elastic Beanstalk:
For customers of AWS’ IaaS offering, AWS Elastic Compute Cloud, Elastic Beanstalk provides the main benefit of a PaaS; that is, abstracting away infrastructure so building out an entire DevOps team isn't necessary.
More about the advantages and disadvantages of PaaS here.
Cons of using AWS Elastic Beanstalk:
While Elastic Beanstalk does provide users with much greater flexibility than Heroku, its UI isn't nearly as simple to use; the PaaS is not straightforward in general, with a steep learning curve. Beanstalk also does have some limitations at the point of scale. It would be extremely difficult to orchestrate a complex microservices architecture just using Elastic Beanstalk, as it can only handle application hosting. Furthermore, it doesn't handle worker processes well; worker processes aren’t scalable due to Elastic Beanstalk’s abstraction of capacity management. For example, you may have a different start command for a web versus a worker instance, and Beanstalk can only run one at a time since multiple containers are defined as one task.
Elastic Beanstalk breaks down if you load it up with a lot of custom configurations, such as environment variables. Also, its alerting and metrics are pretty basic; if there's an issue with a specific AWS EC2 instance in an Elastic Beanstalk deployment, your only way to diagnose it is to download and look through the deployment's log files. Essentially, utilizing AWS Elastic Beanstalk isn't a substantive PaaS solution and more of a management layer.
Comparison: Heroku vs AWS Elastic Beanstalk
Cost
One of the main differences between these two cloud-based services is cost. Although Heroku pricing used to include a free tier, it no longer exists. Furthermore, Heroku can become expensive as companies scale. Upgrading to containers with more CPU and RAM availability can be costly as can its managed Database service, Heroku Postgres, so the platform's pricing model may not be cost-effective for all use cases.
There is no additional cost for Elastic Beanstalk; users only pay for the underlying EC2 instances (an Amazon EC2 instance is composed of compute and memory resources in the form of virtual CPUs and RAM) and Amazon Simple Storage Service (S3) buckets (and any additional storage, data, and bandwidth needs like load balancing). Startups and other institutions can receive AWS credits to save on these resources, as well.
Overall
Essentially, Heroku and Elastic Beanstalk are on opposite sides of the convenience and flexibility spectrum, with the former offering convenience at the expense of control and the latter the opposite.
Porter: the drop-in Heroku alternative
If you’re looking for a cloud platform that allows for the flexibility of and more configurability than Elastic Beanstalk while providing the convenience of Heroku, there’s Porter. Porter is an open source, drop-in alternative to Heroku; you can connect to your Git repository and use Heroku buildpacks to build and run apps in Porter (or connect to a Docker registry and use a Docker container image instead). Furthermore, unlike Elastic Beanstalk, Porter's UI is extremely familiar for devs who are used to Heroku, allowing for a seamless transition to AWS. It's a true lift and shift, with no overhead and no learning curve. Porter also supports many add-ons that serve the same purpose as Heroku’s, and has a feature called Preview Environments which is equivalent to Review Apps. Porter also provides robust alerting and metrics.
Just like Elastic Beanstalk, users have access to their underlying cloud infrastructure and can configure it to meet compliance requirements as Porter runs in their own private cloud. Unlike AWS services, however, users can choose their preferred cloud provider and so aren’t limited to AWS; if users obtain credits for a different cloud service provider, it is easy to switch. Porter's pricing is pay-as-you-go and resource usage based as well, so users pay only for what they use (with volume discounts available for users with greater resource allocation needs). Porter also runs on Kubernetes (which shine with complex microservices architectures) under the hood, allowing for greater scalability and flexibility than Elastic Beanstalk, especially in the case of more complex infrastructure, while still providing the convenience of Heroku. Users gain all of the benefits of Kubernetes (such as Kubernetes event-driven automatic scaling) but don’t need a large team of DevOps engineers or even a single DevOps engineer to manage the container orchestrator. If users with DevOps skills want to configure the underlying infrastructure, however, they are not limited in being able to do so.
DevOps Mode