Is On-premises hosting cheaper than the Cloud?

Is On-premises hosting cheaper than the Cloud?

One of the many topics that fuelled debates among developers and people that work with infrastructure either cloud or on-premises, for a long time now, is the price tag for cloud services. Many consider moving to the cloud a no-brainer, others feel it’s too expensive to even start with.

So what is it? Well, the short answer is “it depends”, but let’s dive deeper on when & why choose a cloud provider or on-premises.

Disclaimer: We’re not here to advocate one or another, we’re just writing this post to help you decide what’s the best choice for your project. Also, this post does not refer to enterprise projects.

The numbers are right, sometimes on-premise is cheaper

Yes, it’s true. The price-tag is different and sometimes you can get a hosting offer with better specifications than an instance on some cloud provider with the same price. However, there are some costs that you are signing up for, by default:

  • Scaling & over-provision: Projecting traffic for a web service can be an exceptionally difficult task, especially when you’re starting out a new project. Setting up multiple server instances or replacing them with bigger ones, will take some time (hence, money). You might also end up paying for more than you need, something which is very common. A cloud provider on the other hand, will help you start small and scale (hence, pay) as you scale up.
  • Additional services: Running on-premise infrastructure means that you probably need to set up and configure any other service that your application might need by yourself. You also have to make sure that the services can access one another in a secure and efficient way and this can prove to be a task that requires a lot of time and expertise. For example setting up a load balancer or a mail sending server is a daunting task, while on the other hand most cloud providers offer similar, managed services without the hassle.
  • Automations: Most of the times, automating simple tasks like database backups or file backups are non trivial. One has to write scripts or use services that come with a cost for on-premise resources. Most of the times, cloud providers offer such automations out of the box (usually with a very small fee), making essential maintenance tasks seem trivial.
  • Disaster recovery: Disaster recovery is no easy task either. There has to be an expert in place, that will be able to for example, roll back the database to a point in time. On the other hand, many cloud providers, offer such utilities out of the box. For example, it takes a few minutes on AWS to recreate a database or a disk from a snapshot and plug it to an instance.

So when to use an on-premise infrastructure?

We recommend on-premise infrastructure if your traffic is highly predictable and you can project your usage for a long period (eg. more than 6 months). It’s very cost-efficient for services that deal with an even amount of traffic throughout the day as well.

We also recommend using on-premise infrastructure if your application’s dependencies rely on services you or someone in your team can properly manage, (for example databases or cache servers).

But why is the cloud price-tag higher?

Value. They provide value by solving problems that us, engineers have struggled with, for ages. Whether it’s auto-scaling, user-management, running managed services, plugging disk volumes, providing solutions that saves time for developers and operation teams, is what cloud providers have been doing for years.

It has also enabled engineers not to over-think about operational costs when it comes to integrating another service in their stack. Service elasticity is also another key factor. For example one doesn’t have to make projections over disk usage, when object store is in place and can grow or shrink (along with the price) according to the project’s needs. Finally, they provide APIs that enable automations which would otherwise require a lot of effort to build and would be prone to human error.

Ways to save money on AWS

There are ways to save money in the cloud. At Stackmate, we work with AWS so here are the three main ways to save money when using AWS.

  • Free-tier for new signups – https://aws.amazon.com/free/ You’ll get 12 months of decent AWS horse power without paying anything. Important note though: If you exceed the free tier (for example if you provision a larger instance), you will have to pay for it.
  • Spot instanceshttps://aws.amazon.com/ec2/spot/ By default, every instance deployed on EC2 is “on-demand” which means you pay as you go. If you wish to use a specific instance type for longer, you might reserve the instance and pre-pay part of its cost in order to save more.
  • AWS Activate for Startupshttps://aws.amazon.com/activate/ If you’re a startup you can sign up for AWS and get $1,000 in credit.

Conclusion

As everything in our field, having to choose over on-premise vs cloud, is a tradeoff. On-premise may look a bit cheaper but it will require some extra time to run it properly, while on the other hand the cloud might seem initially more expensive but saves quite a lot on operational cost and there are ways to save money.