Which PaaS Hosting to Choose?
In the process of elaborating a web project be it a pure API or a thoroughgoing web app, a product manager eventually comes to the point of choosing a hosting service.
Once the tech stack (Python vs. Ruby vs. Node.js vs. anything else) is defined, the software product needs a platform to be deployed and become available to the web world. Fortunately, the present day does not fall short of hosting providers, and everyone can pick the most applicable solution based on particular requirements.
At the same time, the abundance of digital server options is often a large stumbling block many startups can trip on. The first question that arises is what type of web hosting is needed. In this article, we decided to skip such shallow options as shared hosting and virtual private server, and also excluded the dedicated server availability. Our focus is cloud hosting which can serve as a proper project foundation and a tool for deploying, monitoring, and scaling the pipeline. Therefore, it’s worthwhile to review the two most famous representatives of cloud services namely Heroku vs. Amazon.
Dedicated and shared hosting services are two extremes, from which cloud hosting is distinct. Its principal hallmark is the provision of digital resources on demand. It means you are not limited to capabilities of your physical server. If more processing power, RAM, memory, and so on are necessary, they can be scaled fast manually with a few clicks of a button, and even automatically (e.g., Heroku automatic scaling) depending on traffic spikes.
Meanwhile, the number of services and a type of virtual server architecture generate another classification of the host providing options depending on what users get – function, software, platform or an entire infrastructure. Serverless architecture, where the server is abstracted away, also falls under this category and has good chances of establishing itself in the industry over the next few years, as we suggested in our recent blog post. The options we’re going to review here are considered hosting platforms.
Platform as a service
This a cloud computing model features a platform for speedy and accurate app creation. You are released from tasks related to servers, virtualization, storage, and networking – the provider is responsible for them. Therefore, an app creator doesn’t have any worries related to operating systems, middleware, software updates, etc. PaaS is like a playground for web engineers who can enjoy a bunch of services out-of-the-box. Digital resources including CPU, RAM, and others are manageable via a visual administrative panel. The following short intro to the advantages and disadvantages of PaaS will be a good explanation of why this cloud hosting option has been popular lately.
The following reasons make PaaS attractive to companies regardless of their size:
- Cost-efficiency (you are charged only for the amount of resources you use)
- Provides plenty of assistance services
- Dynamic scaling
- Rapid testing and implementation of apps
- Agile deployment
- Emphasis on app development instead of supplementary tasks (maintain, upgrade, or support infrastructure)
- Allows easy migration to the hybrid model
- Integrated web services and databases
These items might cause you to doubt whether this is the option for you:
- Information is stored off-site, which is not appropriate for certain types of businesses
- Though the model is cost-efficient, do not expect a low budget solution. A good set of services may be quite pricey.
- Reaction to security vulnerabilities is not particularly fast. For example, patches for Google Kubernetes clusters take 2-4 weeks to be applied. Some companies may deem this timeline unacceptable.
As a rule, the hosting providers reviewed herein stand out amid other PaaS options. The broad picture would be like Heroku vs. AWS vs. Google App Engine vs. Microsoft Azure, and so on. We took a look at this in our blog post on the best Node.js hosting services. Here we go.
Amazon Web Services
Judging from the article’s title, the Heroku platform should have been the opener of our comparison. Nevertheless, we cannot neglect the standing and reputation of AWS. This provider can not boast an unlimited number of products, but they do have around one hundred. You can calculate the actual number on their product page if needed. However, the point is that AWS is holding not only the PaaS niche. The user’s capability to choose solutions for storage, analytics, migration, application integration and others lets us consider this provider as an infrastructure as a service. Meanwhile, the AWS’ opponent within this comparison cannot boast the same set of services. Therefore, it would only be fair to select the same weight class of competitor and reshape our comparison into Elastic Beanstalk vs. Heroku, since the former is the PaaS provided by Amazon. So, in the context of this article, AWS will be represented by Beanstalk.
You can find this product in the ‘Compute’ tab on the AWS home page. Officially, Elastic Beanstalk is a product which allows to deploy web apps. It is appropriate for apps built in RoR, Python, Java, PHP, and other tech stacks. The deployment procedure is agile and automatized. The service carries out auto-scaling, capacity provisioning and other essential tasks for you. The infrastructure management can also be automated. Nevertheless, users are in control of resources leveraged to power the app.
Among the companies that chose this AWS product to host their products, you can encounter BMW, Speed 3D, Ebury, etc. Let’s see what features like Elastic Beanstalk pricing or manageability attract and repel users.
Pros & Cons
|Easy to deploy an appImproved developer productivityA bunch of automated functionalities including the scaling, configuration, setup, and othersFull control over the resourcesManageable pricing – you manage your costs depending on the resources you leverageEasy integration with other AWS productsMedium learning curve||Deployment speed may stretch up to 15 minutes per appLack of transparency (zero information on version upgrades, old app versions archiving, lack of documentation around stack)DevOps skills are required|
In addition to this PaaS product, Amazon can boast an IaaS solution called Elastic Compute Cloud or EC2. It involves detailed delving into the configuration of server infrastructure, adding database instances, and other activities related to app deployment. At some point in your activities, you might be want to migrate to it from Beanstalk. It is important to mention that such migration can be done seamlessly, which is great!
In 2007, when this hosting provider just began its activities, Ruby on Rails was the only supported tech stack. After the lapse of over 10 years, Heroku has enhanced its scope and is now available for dealing with the apps built with Node.js, Python, Perl, and others. Meanwhile, it is a pure PaaS product which makes inappropriate to compare Heroku vs. EC2.
It’s a generally known fact that this provider rests on AWS servers. In this regard, do we really need to compare AWS vs. Heroku? We do, because this cloud-based solution differs from the products we mentioned above and has its own quirks to offer. These include over 180 add-ons – tools and services for developing, monitoring, testing, image processing, and cover other operations with your app, an ocean of buttons and buildpacks. The latter is especially useful for automation of the build processes for tech stacks. As for the big names that leverage Heroku, there are Toyota, Facebook, and GitHub.
Traditionally, we need to learn what benefits of Heroku you can experience and why you may dislike this hosting provider.
Pros & Cons
|Easy to deploy an appImproved developer productivityFree tier is available (not only the service itself but also a bunch of add-ons are available for free)Auto-scaling is supportedA bunch of supportive toolsEasy setupBeginner and startup-friendlyShort learning curve||Rather expensive for large and high-traffic appsSlow deployment for larger appsLimited in types of instancesNot applicable for heavy-computing projects|
Which is more popular – Heroku or AWS?
Heroku has been in the market four years longer than Elastic Beanstalk and has never lost in terms of popularity to this Amazon PaaS.
Meanwhile, the range of services provided by AWS has been growing in high gear. Its customers have more freedom of choice and flexibility to handle their needs. That resulted in a rapid increase in search interest starting from 2013 until today.
Heroku vs. AWS pricing through the Mailtrap example
Talking about pricing, it’s essential to note that Elastic Beanstalk does not require any additional charge. So, is it no charge? The answer is yes – the service itself is free. Nevertheless, the budget will be spent on the resources required for deploying and hosting your app. These include the EC2 instances that comprise different combinations of CPU, memory, storage, and networking capacity, S3 storage, and so on. As a trial version, all new users can opt for a free usage tier to deploy a low-traffic app.
With Heroku, there is no need to gather different services and set up your hosting plan as LEGO. You have to select a Heroku dyno (a lightweight Linux container prepacked with particular resources), database-as-a-service and support to scale resources depending on your app’s requirements. A free tier is also available, but you will be quite limited in resources with this option. Despite its simplicity of use, this cloud service provider is far from being cheap.
We haven’t mentioned any figures here because both services follow a customized approach to pricing. That means you pay for what you use and avoid wasting your money on unnecessary resources. On that account, costs will differ depending on the project. Nevertheless, Heroku is a great solution to start, but Amazon AWS pricing seems cheaper. Is it so in practice?
We decided to show you the probable difference in pricing for one of Railsware’s most famous products – Mailtrap. Our engineers agreed to disclose a bit of information regarding what AWS services are leveraged and how much they cost the company per month. Unfortunately, Heroku services are not as versatile as AWS, and some products like EC2 instances have no equivalent alternatives on the Heroku side. Nevertheless, we tried to find the most relevant options to make the comparison as precise as possible.
At Mailtrap, we use a set of the on-demand Linux instances including m4.large, c5.xlarge, r4.2xlarge, and others. They differ in memory and CPU characteristics as well as prices. For example, c5.xlarge provides 8GiB of memory and 4 vCPU for $0.17 per hour. As for Heroku, there are only six dyno types with the most powerful one offering 14GB of memory. Therefore, we decided to pick the more or less identical instances and calculate their costs per month.
|Cloud computing||EC2 On-Demand Linux instances:t3.micro (1GiB) – $0.0104 per hour|
$7.48 per montht3.small (2GiB) – $0.0208 per hour
$14.98 per monthc5.2xlarge (16GiB) – $0.34 per hour
$244.8 per month
$50.00 per month performance-m (2.5GB)
$250.00 per month performance-l (14GB)
$500.00 per month
The computing cloud costs for Mailtrap per month are almost $2,000 based on eight different AWS instances with the memory characteristics from 4GiB to 122 GiB, the costs for Elastic Load Balancing, and Data Transfer. Even if we chose the largest Heroku dyno, Performance-l, the costs would amount to $4,000 per month! It is important also to mention that Heroku cannot satisfy the need for heavy-computing capacity because the largest dyno is limited to 14GB of RAM.
For the database-related purposes, both hosting providers offer powerful suite of tools – Relational Database Service (RDS) for PostgreSQL and Heroku Postgres correspondingly. We picked two almost equal instances to show you the price difference.
|Database||RDS for PostgreSQL:|
db.r4.xlarge (30.5 GiB) – $0.48 per hour
$345.6 per month
EBS Provisioned IOPS SSD (io1) volumes – $0.125 per GB
$439.35 per month (at the rate of 750GB storage)
Standard 4 (30 GB RAM, 750 GB storage)
$750.00 per month
In-memory data store
Both providers offer managed solutions to seamlessly deploy, run, and scale in-memory data stores. Everything is simple to compare. We took an ElastiCache instance used at Mailtrap and set it against the most relevant solution by Heroku Redis. Here is what we’ve got.
|In-memory storage (i.e., cache)||ElastiCache:|
cache.r4.large (12.3 GiB) – $0.228 per hour
$164.16 per month
$1,450.00 per month
In addition to RDS instance, you will have to choose an Elastic Block Store (EBS) option, which refers to HDD or SSD volume. At Mailtrap, the EBS costs are almost $600 per month.
As the main storage for files, backups, etc., Heroku has nothing to offer, and they recommend using Amazon S3. You can make the integration between S3 and Heroku seamless thanks to using an add-on like Bucketeer. In this case, the main storage costs will be equal for both PaaS (except for the fact that you’ll have to pay for the chosen add-on on Heroku). At Mailtrap, we use a Standard Storage instance “First 50 TB / Month – $0.023 per GB”, as well as instances “PUT, COPY, POST, or LIST Requests – $0.005 per 1,000” and “GET, SELECT and all other Requests – $0.0004 per 1,000”. All in all, the costs are a bit more than $800 per month.
Though this point has no relation to Mailtrap hosting, we decided to show the options provided by AWS and Heroku in terms of real-time data streaming. Amazon can boast of Kinesis Data Streams (KDS), and Heroku has Apache Kafka. The latter is simple to calculate since you need to choose one of the options available (basic, standard or extended) depending on the required capacity. With KDS, you’ll have to either rack your brains or leverage Simple Monthly Calculator. That’s what we’ve got for 4MB/sec data input.
|Data streaming services||KDS:|
4 shard hours – $0.015 per hour
527.04 million PUT Payload Units – $0.014 per 1,000,000 units
$50.58 per month
$175 per month
Heroku offers three support options – Standard, Premium, and Enterprise. The former is free, while the price for the latter two starts from $1,000. As for AWS, there are four support plans – Basic, Developer, Business, and Enterprise. The Basic one is provided to all customers, while the price for the others is calculated according to AWS usage for a particular amount of costs. For example, if you spend $5,000 on Amazon products, the price for support will be $500.
Now, let’s sum up all the expenses and see how much we would have paid if Mailtrap was hosted on Heroku.
In-memory data store
These figures are rough, but they fairly present the idea that less haste with infrastructure management is rather pricey. Heroku gives you more time to focus on app creation but drains purse. AWS offers a variety of options and solutions to manage your hosting infrastructure and definitely saves the budget.
Below we compared the most relevant points of the two cloud hosting providers.
|PaaS||AWS Elastic Beanstalk||Heroku|
|Programming language support||Ruby|
|Key features||AWS Service Integration|
App Health Dashboard
Code and data rollback
Smart containers (dynos)
Full GitHub Integration
|Management & monitoring tools||Management Console|
Command Line Interface (AWS CLI)
|Featured customers||BMW, Samsung Business, GeoNet||Toyota, Thinking Capital, Zenrez|
Why use Heroku web hosting
In practice, this hosting provider offers a lot of benefits like a lightning-fast server set up (using the command line, you can make it within 10 sec), easy deployment with Git Push, a plethora of add-ons to optimize the work, and versatile auxiliary tools like Redis and Docker. A free tier is also a good option for those who want to try or experiment with cloud computing. Moreover, since January 2017, auto-scaling has been available for web dynos.
It’s undisputed that Heroku cloud is great for beginners. Moreover, it may be good for low-budget projects due to the lack of DevOps costs needed to set up the infrastructure (and potentially hire someone to do this). However, many startups choose this provider as a launching pad due to its supreme simplicity in operation.
Why choose Amazon Web Services
This solution is more attractive in terms of cost-efficiency. At the same time, it loses out as for usability. Users can enjoy a tremendous amount of features and products for web hosting provided by Amazon. It’s easy to set up and deploy, and definitely provides everything that Heroku does but for less money. However, Elastic Beanstalk is not as easy-to-use as its direct competitor.
Numerous supplementary products like AWS Lightsail, which was described in our blog post dedicated to Ruby on Rails hosting providers, Lambda, EC2, and others let you enhance your app hosting options and control your cloud infrastructure. At the same time, they usually require DevOps skills to use them.
So, which provider is worth your while – Heroku servers that are attractive in terms of usability and beginner-friendliness or AWS products that are cheaper but more intricate in use?
|Heroku is the option for:||AWS is the option for:|
|startups those who prioritize time over money;|
those who prefer dealing with creating an app rather than devoting yourself to infrastructure mundane tasks;
those whose goal is to deploy and test an MVP;
products needed to be constantly updated;
those who do not plan to spend money on hiring DevOps engineers.
|those who have already worked with Amazon web products;|
those who want to avoid numerous tasks related to app deployment;
those whose goal is to build a flexible infrastructure;
those who have strong DevOps skills or ready to hire the corresponding professionals;
projects requiring huge computing power.