The rise of self-hosted PaaS — is $5 VPS all you need?

fxck

Aleš

Posted on August 23, 2024

The rise of self-hosted PaaS — is $5 VPS all you need?

There's a little trend going on over at the developer community on X, jokingly called "$5 VPS" — every time Vercel has an oopsie and sends someone a $100k bill, people jump to replies shouting, "Stop using Vercel, just buy this $5 VPS, I use it to handle 100k visits, no problem". So let's explore this trend and see what it really means.

When hosting apps in 2024, out of the many different options for hosting, you have these four major groups — big cloud, dev-focused PaaS, "frontend" focused platforms and VPS/VDS hosting. Honorable mentions are managed Kubernetes platforms and specialized managed hosting, where nearly any open source software offers some sort of cloud managed version. Lines between these groups are blurry, as many providers branch out into multiple categories.

hosting segments


A little bit of history

How did we get here? The pioneer in cloud hosting was Amazon, with their AWS in 2006, followed by Azure and Google Cloud in 2010. Meanwhile Heroku launched properly in 2009, offering a fresh take on the cloud, using Amazon's infrastructure but offering a more user-friendly and focused approach. In 2013 DigitalOcean was founded, creating a mix between VPS and managed solutions. In 2014/2015, Netlify and ZEIT (eventually rebranded as Vercel) were founded, specializing in building and hosting serverless and frontend apps. Around 2019 a new generation of developer friendly PaaS started gaining traction, with Render and Fly leading the charge. Many smaller / narrowly specialized hosting platforms were founded since, many building on top of others.


Rise of the cheap VPS and self-hosted PaaS

Now self-hosted PaaS on cheap hardware is getting popular. You can get 8 vCPU + 16 GB RAM server node for yourself for about 29.99 euro, that's surely enough to run everything one needs, right?

Cheap VPS

On top of that, nowadays there are many popular open-source PaaS alternatives.

Self-hosted PaaS

And many dev-ifluencers are promoting them over PaaS.
Dev influencers


The perfect solution?

Sounds great in theory, you get the cheap hardware and you get all the functionality of a PaaS for free through open source software. But let's break down a couple of main differences between self-hosted PaaS and PaaS:

1. You don't have to deal with the infrastructure

PaaS providers typically run hundreds or even thousands of robust server nodes or use Amazon's EC2 infrastructure to provision resources for your containers. You don't have to monitor the infrastructure, handle the OS / Kernel updates, deal with faulty hardware, you never touch the actual underlying infrastructure.

2. You get managed databases and storage solutions

PaaS providers usually offer managed or semi-managed, production-ready services like Postgres, Redis (or open-source alternatives like Valkey), and an S3-compatible storage solution.

3. Build servers, High availability & backups

It turns out that setting up a good infrastructure isn't easy, especially if you need to go beyond simple sites or apps. Your apps should be highly available with a load balancer in front of them, running on at least two containers, your primary database should run on at least three containers (write/read/read) with proxy load balancers in front. Each of these containers and load balancers should run on a different physical server. Storage should run on a different node. Your backups should be encrypted and saved on a different node. Builds should run on a different node.


With a self-hosted PaaS you are responsible for the underlying infrastructure, scaling capabilities of the platform software don't really matter that much, because you still have to scale the hardware yourself. The database services on self-hosted PaaS will likely be nothing more than Docker Compose containers spun up on demand. While this might be fine as long as you properly handle the underlying file system, it's not the ideal solution for a production database. Database services simply require a little bit more care. You might also end up in a situation where you have too much RAM and not enough CPU, since the underlying infrastructure is not granular enough. The actual utilization of the paid resources might also vary, since you can't scale automatically on the fly or start your build servers only when you need to run builds. And the more applications you have, the messier things can get.

But, can't you just run everything on a single server? Well, yes—especially if you're hosting only a couple of small, mostly static (or server-side generated/rendered) sites, and everything might work just fine. That is, until it doesn't.

Ultimately, it comes down to whether the cost is worth the extra features and the comfort of not dealing with the infrastructure at all, while having a setup you can trust to scale with your needs.


Price comparison

Price differences might vary a little across different use cases, and you usually you wouldn't probably need to use dedicated CPU for all services. But to make the comparison as accurate as possible, let's choose a medium-sized real-life production project with a typical setup and try to configure a similar setup for each provider, considering both features and resources. And when possible, dedicated or performance CPU cores will be used to normalize performance levels, as shared CPUs can have varying overcommitting ratios across different providers.

 Reference setup

Setup

Prices for different providers

You can find the configuration details by hovering over the items on Zerops' website.

Image description


Zerops, the developer first PaaS

At Zerops, we recognize the need for an affordable PaaS. In the best-case scenario, what you'd want as a developer:

  • the ability to create as identical as possible, but also affordable environments for each project, one environment for development, one for production, even one for each developer to use locally

  • platform (and unified setup) that can support you no matter if you need to host a small static app, or a large project with multiple databases and microservices and anything in between

  • flexibility of VPS

An integral part of these requirements is that resources should be inexpensive, with all advanced features included by default. And so our vision is the perfect mix of developer experience, flexibility, robustness, and scalability, along with a pricing model that doesn't get in the way of good development practices.

You can get all the features you'd expect from a PaaS, but also automatic scaling, unified environments and prices of resources approaching those of cheap VPS providers.

Zerops dashboard

This pricing applies equally to both simple and complex projects, regardless of whether they have low or high traffic.

A 10-minute walkthrough of Zerops

Sign up at https://zerops.io and get up to $65 free credits to try Zerops out.

💖 💪 🙅 🚩
fxck
Aleš

Posted on August 23, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related