How To Run a Platform in The Cloud with Millions of Users for Just $3543.59 Per Month

You’ve heard that the cloud is the place to be. Run your enterprise apps or scale your startup. It is simple, easy to begin and inexpensive.

You go to AWS, Azure, Google or maybe Digital Ocean. You sign up and for just a few dollars (euros, pounds, pick your currency) you have up and running servers and a thousand more services at your disposal.

Your dream has come true and you can serve your users and reap the rewards.

Unfortunately, soon you realize that your enterprise apps actually require huge amounts of memory and processing power (just check the requirements for SAP HANA ).

Or maybe your startup takes up from the ground and you get more and more users. Hitting the first million users is fun, and then the second million is even better and more people are coming.

But just as the users hit your servers, your cloud provider hits your bank account, very hard.

Many startups defer profitability and even revenue until they find the right product market fit, which is great, except if you run out of money.

What happened to the lean startup?

Spending $150,000 on servers each year, doesn’t look very lean any more.

What would you do if you could instead spend those $150K to accelerate growth?

And the enterprise apps, they were supposed to increase your revenue, without hitting too much your bottom line. Maybe $150K more will help your sales team bring even more clients?

Sometimes, you don’t even have that many users, but you just gather so much data and then you mine it for relevant business signals. Big data requires just as much infrastructure but only less than 10% of it is actually useful.

Can you do better? Can you grow before running out of money? Wouldn’t it be nice if you could spend $150,000 on improving your business instead of throwing them to Amazon, Google or Microsoft?

This is exactly what we did with some of our clients.

The infrastructure

Let’s have a look at one of our clients. They’ve been serving over 5 million users a month with tons of content, images, traffic etc.

We assessed their requirements and came up with the following infrastructure:

  • Load Balancer – 1 server, 4 threads, 30GB RAM
  • Serving millions of images – 1 server, 8 threads, 120GB RAM, 4TB Disk
  • Front-end – 2 servers, 4 threads, 30GB RAM
  • Back-end, long running tasks – 2 servers, 4 threads, 30GB RAM
  • Internal Caching (Redis) – 1 server, 2 threads, 30GB RAM
  • Database – 6 servers, 4 threads, 240GB RAM, 1TB Disk
  • Search – 1 server, 4 threads, 30GB RAM
  • Back-end, image services – 1 server, 4 threads, 60GB RAM
  • Storage, database backup, images backup - 6TB
  • Traffic – 12 TB

All servers are expected to be virtual machines. Of course, there are additional automations and software to make this all work and to prevent significant downtime.

This system has been running now for several years and it has been handling over 5 million users each month, serving million images and other content worth in total about 12TB of traffic each month.

In the extremely rare case of a virtual machine crash, due to hardware failure or other reasons, the system has been very robust, and it has resulted in minimal or no downtime for the platform.

Now you know what we had to run and maintain. The next step is to decide where to run it.

Let’s look at some options and evaluate them

  • Amazon Web Services
  • Microsoft Azure
  • Google Cloud
  • Digital Ocean
  • OVH

For each of these options, here are the main pricing pages

I know that there are other providers like IBM and Oracle for example, but the goal is not to be extensive, just to show you what is possible.

AWS

The most famous cloud provider in the world and maybe the biggest depending how you measure it.

It started the cloud revolution and still leads, by adding more and more useful services.

We’ve used it with many clients, and we are running some of our own services on it, too.

Let’s have a look at the infrastructure that meets the requirements and its price.

  • Load Balancer – 1 r5a.xlarge server, 4 threads, 32GB RAM, $162.76
  • Images – 1 r5a.4xlarge server, 16 threads, 128GB RAM, $650.88 + $400 EBS
  • Front-end – 2 r5a.xlarge servers, 4 threads, 32GB RAM, $325.52
  • Back-end, long running tasks – 2 r5a.xlarge servers, 4 threads, 32GB RAM, $325.52
  • Internal Caching – 2 r5a.xlarge servers, 4 threads, 32GB RAM, $325.52
  • Database – 6 r4.8xlarge servers, 32 threads, 244GB RAM, $9192.96 + $400 EBS
  • Search – 1 r5a.xlarge server, 4 threads, 32GB RAM, $162.76
  • Back-end, image services – 1 r5a.2xlarge server, 4 threads, 64GB RAM, $414.72
  • Storage, database backup, images backup - 6TB, $138 on S3
  • Traffic – 12 TB, $1080

The total cost for the infrastructure at the time of writing of this article would be $14633.88 per month.

Let’s look at a few questions.

Could we get cheaper by prepaying?

Yep, we could, and we can do that for all cloud providers in this list. However, this has one disadvantage, that it costs quite a lot in advance.

Wouldn’t it be more cost effective if we use serverless or other managed services?

We did that calculation, and the answer was that it is not. In this case it was much more expensive.

Azure

According to how you measure it, Azure might be bigger than AWS or it could be second.

In all cases, it is hugely popular.

They have tons of services, too, pretty much the same as AWS as well as a few unique ones.

We’ve used them before and we were pleasantly surprised by the ease of use.

Let’s have a look at the infrastructure that meets the requirements and its price.

  • Load Balancer – 1 A4m v2 server, 4 threads, 32GB RAM, $151.84
  • Images – 1 E16 v3 server, 16 threads, 128GB RAM, $776.72 + $450.56 4TB Managed Disk
  • Front-end – 2 A4m v2 servers, 4 threads, 32GB RAM, $303.68
  • Back-end, long running tasks – 2 A4m v2 servers, 4 threads, 32GB RAM, $303.68
  • Internal Caching (Redis) – 1 A4m v2 server, 4 threads, 32GB RAM, $151.84
  • Database – 6 E32 v3 servers, 4 threads, 256GB RAM, $9320.64 + $491.52 Managed Disk (4x1TB)
  • Search – 1 A4m v2 server, 4 threads, 32GB RAM, $151.84
  • Back-end, image services – 1 A8M v2 server, 8 threads, 64GB RAM, $319.01
  • Storage, database backup, images backup - 6TB, $110.4 on Azure Storage
  • Traffic – 12 TB, $1044

The total cost for the infrastructure at the time of writing of this article would be $13575.53 per month. This is about $1000 less per month then AWS, not bad.

Something that you will begin to notice is that the servers chosen are not identical.

Different cloud providers don’t always have the exact same configurations. However, the goal was to choose the configurations which best match the initial requirements.

Google Cloud

Extremely famous name, great technology, but in terms of size it is lacking far behind AWS and Azure and it is growing slower than them. I am not sure whether it is even in third place.

I’ve used them before and I have only good words to say about their technology. Particularly they have their own international highspeed network.

Let’s have a look at the infrastructure that meets the requirements and its price.

  • Load Balancer – 1 n1-highmem-4 server, 4 threads, 26GB RAM, $121.00
  • Serving millions of images – 1 n1-standard-32 server, 32 threads, 120GB RAM, $776.72 and $1600 4TB Persistent Disk
  • Front-end – 2 n1-highmem-4 servers, 4 threads, 26GB RAM, $242.00
  • Back-end, long running tasks – 2 n1-highmem-4 servers, 4 threads, 26GB RAM, $242.00
  • Internal Caching (Redis) – 1 n1-highmem-4 server, 4 threads, 26GB RAM, $121.00
  • Database – 6 n1-standard-64 servers, 64 threads, 240GB RAM, $9320.64 + $1600 4x1TB Disk
  • Search – 1 n1-highmem-4 server, 4 threads, 26GB RAM, $121.00
  • Back-end, image services – 1 n1-standard-16 server, 16 threads, 60GB RAM, $388.36
  • Storage, database backup, images backup - 6TB, $210
  • Traffic – 12 TB, $1320

The total cost for the infrastructure at the time of writing of this article would be $16062.72 per month.

There are two interesting things to notice here.

First, while AWS & Azure were very similar, Google’s machines seem to get more processing power and a better price.

However, the deal breaker seems to be their persistent storage, which is very expensive.

Digital Ocean

Digital Ocean came a little bit later on the party, but they sure crashed it. They had two very unique offers.

Unlike, AWS, which might be overwhelming and complicated to setup, Digital Ocean and their droplets (how they call virtual machines) are dead simple to setup and run.

They’ve also been writing tons of really good articles on how to run different software stacks and services on their machines.

These two advantages are great, but the biggest one was that every droplet came with access to a large SSD.

In the time when AWS was providing relatively slow and expensive disks, DO begun providing access to super-fast SSDs for a great price.

Let’s have a look at the infrastructure that meets the requirements and its price.

  • Load Balancer – 1 server, 8 threads, 32GB RAM, $160.00
  • Images – 1 server, 24 threads, 128GB RAM, $640.00 + $400.00 4TB Block Storage
  • Front-end – 2 servers, 8 threads, 32GB RAM, $320.00
  • Back-end, long running tasks – 2 servers, 8 threads, 32GB RAM, $320.00
  • Internal Caching (Redis) – 1 server, 8 threads, 32GB RAM, $160.00
  • Database – 12 servers, 24 threads, 128GB RAM, 2.56TB, $7680.00
  • Search – 1 server, 8 threads, 32GB RAM, $160.00
  • Back-end, image services – 1 server, 16 threads, 64GB RAM, $320
  • Storage, database backup, images backup - 6TB, $120.00
  • Traffic – 12 TB, no additional fees, included in machine pricing

The total cost for the infrastructure at the time of writing of this article would be $10280 per month.

Digital Ocean don’t have as big machines as we wanted for the database, so instead we replaced each machine by two others half its size, which results in the same amount of resources, but a little bit more complicated to manage.

Of course, the biggest thing to notice is that you get much better prices than AWS, Google and Microsoft.

At the same time, you get big SSD storage included while the three other providers are providing very little storage by default and most of the time it is a slower type.

However, it is not only storage, but also a lot of included traffic per machine, so that you don’t have to pay it additionally like you do for the top 3 providers.

The main disadvantage is that Digital Ocean doesn’t provide many other services which you can find at providers like AWS and Azure.

So far, Digital Ocean are providing the best solution, saving almost $6000 compared to Google. Can we do better?

OVH Cloud

OVH is the best kept secret in the cloud world.

Maybe you’ve never heard about it. You maybe even think that it’s a new cloud provider so that is why you don’t know it.

In both cases you will be wrong.

OVH is a French company with datacenters all over the world.

They are actually the biggest dedicated bare-metal servers provider in the world!

We are going to look into that, but right now, let’s have a look at their virtual machines. They call them cloud instances.

Let’s have a look at the infrastructure that meets the requirements and its price.

  • Load Balancer – 1 B2-30 server, 8 threads, 30GB RAM, $102.00
  • Images – 1 R2-120 server, 8 threads, 120GB RAM, $174.00 + $180.00 4TB Disk
  • Front-end – 2 B2-30 servers, 8 threads, 30GB RAM, $204.00
  • Back-end, long running tasks – 2 B2-30 servers, 8 threads, 30GB RAM, $204.00
  • Internal Caching – 1 B2-30 server, 8 threads, 30GB RAM, $102.00
  • Database – 6 R2-240 servers, 24 threads, 240GB RAM, 2.56TB, $2052.00 and $270 disks
  • Search – 1 B2-30 server, 8 threads, 30GB RAM, $102.00
  • Back-end, image services – 1 R2-60 server, 4 threads, 60GB RAM, $86.39
  • Storage, database backup, images backup - 6TB, $67.20
  • Traffic – 12 TB, no additional fees, included in machine pricing

The total cost for the infrastructure at the time of writing of this article would be $3543.59 per month.

Yep, these numbers are correct. The price is almost 5 times less then Google and 3 times less then Digital Ocean!

And it is not just the price. Their network traffic is unmetered, so you don’t need to spend a fortune for the traffic you get.

Is this some kind of scam? Is it reliable?

It is totally real. We’ve been building services and platforms serving millions of users every month for years on OVH.

We trust them as much as we trust AWS, Azure, Google or Digital Ocean.

The client we’ve told you about has been using OVH for everything they need and it has been a great experience.

Just as with Digital Ocean, the main drawback is the lack of many managed services like AWS, Azure and Google have.

OVH Dedicated

I told you already that OVH is the biggest cloud provider in the world for dedicated bare-metal servers.

You get the full disk speed, the full cpu and memory access, as well as the lowest possible latency.

Guess what? These servers are priced really well.

Let’s have a look at the infrastructure that meets the requirements and its price.

  • Load Balancer – 1 EG-32 server, 8 threads, 32GB RAM, $119.00
  • Serving millions of images – 1 EG-128 server, 8 threads, 120GB RAM, 4TB, $269.00
  • Front-end – 2 EG-32 servers, 8 threads, 32GB RAM, $238.00
  • Back-end, long running tasks – 2 EG-32 servers, 8 threads, 32GB RAM, $238.00
  • Internal Caching – 1 EG-32 server, 8 threads, 32GB RAM, $119.00
  • Database – 6 EG-256-L servers, 24 threads, 240GB RAM, 4TB Disk, $2946.00
  • Search – 1 EG-32 server, 8 threads, 32GB RAM, $119.00
  • Back-end, image services – 1 EG-64 server, 12 threads, 64GB RAM, $185.99
  • Storage, database backup, images backup - 6TB, $67.20
  • Traffic – 12 TB, no fees, traffic is not metered

The total cost for the infrastructure at the time of writing of this article would be $4301.19 per month.

It is more expensive than OVH Cloud, but the performance is amazing, and it is still much cheaper than Google, Amazon, Microsoft and even Digital Ocean.

However, I have to admit one thing. The infrastructure selected expects virtual machines and not bare metal servers.

When a virtual machine dies, usually you can start an exact replica within seconds, as if nothing happened.

When a dedicated bare-metal machine dies, if there are no other machines, you might need to wait. If there are, you can then get a new machine in a few minutes. It is not much, but in some cases might be unacceptable.

What’s more, it requires more redundancy, so the actual infrastructure will need a few more servers and the total price will possibly go up to $5000. Not too bad.

Next

Just selecting OVH Cloud over Google will save you $150,000 for a year, which you can then spend where it matters.

This is why our client, with the platform above, has been using OVH for years in both dedicated machines and the cloud instances, with great success.

I know that AWS, Azure and Google are the places to go for many entrepreneurs and enterprise businesses. Most people just have so much confidence in them because they are very well known brands.

Yet, we’ve worked extensively on OVH, for several years, and their services have been nothing short of amazing. You get great value for an amazing price.

We’ve been using AWS for years. We have clients running their platforms on Azure and Google, too. However, I have found several issues that bother me.

First, as soon as you begin to grow your expenses go through the roof. Often the biggest surprise for many businesses is what they pay for traffic going in and out between AWS’s network and the Internet.

Second, the supposed advantages of managed services (AWS RDS for example) are not that great.

You still require a lot of knowledge to use those services effectively and you have a lot to manage them. You don’t need to install anything or to patch, but this is pretty much the only advantage.

If you want to run a lean startup, or improve your bottom line, OVH is great place for you to try.

Did you like this article?

Please share it
Enter your email and get our NPM Cheat Sheet for NodeJS Developers and the links to our 5 most popular articles which have helped thousands of developers build faster, more reliable and easier to maintain Node applications.

We are Stefan Fidanov & Vasil Lyutskanov. We share actionable advice about development with Node, Express, React and other web & mobile technologies.

It is everything that we have learned from years of experience working with customers from all over the world on projects of all sizes.

Let's work together
© 2019 Terlici Ltd · Terms · Privacy