Estimate project
← All posts

Should we be leaving the cloud now?

Revisiting widely accepted patterns and practices is always worthwhile. Is the cloud the right choice in every case? Should all of us consider running infrastructure of our own?

6 min read
CloudAWSGCPAzure

Over the past few months, social media has been buzzing about a series of articles by David Heinemeier Hansson on leaving the cloud and purchasing their own bare metal servers. He explained why they decided to do it, covered the costs, and published something like a manifesto of the values that drive the cloud exit.

Revisiting some widely accepted patterns and practices is always worthwhile. Is the cloud the right choice in every case? Should all of us consider running infrastructure of our own?

Let’s give it some thought.

What is Cloud, actually?

First, a key question: what exactly is the Cloud? Is it just – as a fairly popular t-shirt puts it – “someone else’s computer”?

I don’t agree.

Of course, if you dig deep enough, you will find bare metal machines at the bottom. Yet cloud computing is far more than that. In fact, it is mostly software that helps you manage compute resources. Quite often you never even see the machines – for example with serverless applications or with Kubernetes on Fargate or Autopilot.

Fun fact – in almost 30 years of working as a sysadmin/devops engineer/platform engineer/you-name-it, I can’t recall the last time I needed to log in to a server over ssh. That is why I want to go through a few really important things the cloud provides that DHH doesn’t mention at all.

IAM

Once your organization has more than a handful of people, controlling access to infrastructure can get complicated. At some point you will need a single place where you add/remove users and assign them the right permissions – and by “right” I mean in line with the least privilege principle. All the major providers offer such tooling “for free”.

Multi AZ and multi regions

If your business has grown beyond an early-stage MVP and you treat it seriously, you most likely don’t want to depend on a single Data Center, even one with several power and internet providers. A lot can go wrong – from a blackout all the way to a fire that wipes out the DC entirely.

What’s more, two DCs often aren’t sufficient. When you run a distributed system, you usually need the smallest odd number of AZs that is greater than 1.

Is operating 3 DCs, each with multiple power supplies, multiple internet connections, and redundant cooling, a simple task? Not at all.

You might reply that this is the vendor’s job. The vendor’s? And what happened to independence, the value DHH considers most important?

Multi-region is harder still. It works fine if you live in a bubble and your customers are nearby, and plenty of services are country-specific. But when your business sits on the west coast while your customers are in central Europe (as I am) – trust me, those few dozen milliseconds of latency make a difference.

Network

Every cloud vendor offers something comparable to AWS VPC. What is a virtual private network? It lets you manage the network itself (IPs, routing, firewalling) as well as network appliances such as routers, NAT gateways or load balancers through API calls. It can be easily automated and described as code with tools like terraform or pulumi.

Can you achieve that with a handful of servers plugged into a switch?

Load balancers are a similar case – in the cloud, provisioning and configuring an LB, including L7 routing, SSL termination etc., takes just a few API calls.

Storage

Any server can have storage – that’s no big deal. However, disks attached to one specific machine are very different from a network block device that can be dynamically attached to a server. Storage systems like that are extremely costly and complex. Yes, there are OSS projects such as Ceph that aim to deliver fairly cheap storage on commodity hardware, but running a full-scale, highly-available ceph cluster is hard (I’ve been there and lost many nights to it).

A fairly simple, stateless application is easy to move between servers. Storage, though, makes everything much more complicated.

Scaling

A mature business with a steady number of users doesn’t need to scale fast. For some applications, however – e-commerce, for instance – scaling up quickly for a short time (think Black Friday) is essential. Auto-scaling is fairly easy to set up in the cloud. If your infra has to scale out and in, that alone rules out going bare metal only.

Kubernetes

Kubernetes isn’t for everyone. Personally, though, I love it. Why? Because it abstracts not only the hardware (like a VM does) but also all the resources mentioned above – network, storage, load balancing, and many more.

Naturally, you can run a Kubernetes cluster on-premise, but then you must supply many of the resources that the cloud gives you OOTB.

Creating a PVC? Providing a volume is the operator’s job.

Creating a service of type LoadBalancer? Providing one is the operator’s job.

And that operator is you.

HA for the control plane? Your problem. Certificates? Same story. Consider yourself warned.

Costs

7 million dollars across five years sounds impressive. But hold on.. are we only counting CPU/Memory/Internet/Power?

What about all the resources I listed above? What about all the software that lets us manage them? Building a system that delivers management automation, HA etc. is possible, but estimating the effort and cost of such a project is extremely hard. IMVHO, comparing server amortization costs with cloud bills is wrong – they are simply different things.

DHH says they will handle all of this with an ops team of the same size. But will it be the same people? Can an AWS cloud architect manage a network built on Cisco devices? Can they run an HA storage cluster?

There are more questions than answers.

So - should we exit the cloud?

If you have read those articles and are asking yourself whether your business should leave the cloud now – my advice is to think twice. Or even more.

Could you swap your cloud resources for bare metal servers? My bet is that in most cases you couldn’t. Unless all you use in the cloud are plain servers (like AWS EC2) – but who does that nowadays? Hardly anyone.

That said, there are some fairly important questions worth answering.

What about independence? Am I locked into a vendor already? Could I migrate to a different cloud with limited time and resources? Perhaps Kubernetes – which adds an abstraction layer over the cloud vendor – is the right path?

And the costs? If your business requires a lot of computing power, a hybrid setup may be a good option.

Let me say it again – revisiting the solutions you use and looking for optimizations is always a good idea.

Wrapping up

Should clouds already be considered harmful? I firmly disagree. The question in the title has just one answer: it depends. Every business is different, and in most cases moving legacy infrastructure to the cloud can bring plenty of benefits. By “moving”, though, I don’t mean “let’s run it on EC2 rather than on bare metal”. Perhaps it’s time for containers? Or Kubernetes? Or perhaps some of your application could run as really cheap lambda functions?

If questions like these are on your mind, our team will gladly help you find the answers and support you through the transition.

And the costs? Comparing what the cloud costs with what bare metal servers cost is comparing apples to oranges. They are not the same thing. The cloud is more than just someone else’s computer :).