DEV Community

Winston Puckett
Winston Puckett Subscriber

Posted on • Updated on

Making a free, fully-featured, infinitely scalable IaaS with predictable pricing

Pretty loud words, but it's what we need right now. Free tiers and usage-based billing make it difficult to visualize how cost will scale over time (search "cloud cost horror stories"). Creating a fully functional architecture based on a cloud provider takes a lot of learning or a lot of resources.

Solutions like pocketbase and coolify come close to solving these problems. However, I wouldn't choose either as I fear architecture lock-in as much as vendor lock-in. Especially in the case of pocketbase, I may be forced to rewrite my application if it were to scale overnight.

Likewise, Kubernetes comes close. It's free, extensible, "infinitely" scalable, and, when cloud hosted, is billed with consistent costs. The only drawback is that you start from scratch. Even if one reduces the needs of the application to the bare essentials, the number of choices and the amount of mental overhead exceeds what a developer should take on.

If Kubernetes had a template or even a list of reasonable defaults to bootstrap a new project, a developer could use this as a baseline, dive into learning Kubernetes at a more reasonable pace, and expand / replace the components without being strongly bound to a particular cloud or scaling strategy.

What should we do about it?

If people show interest, I'd like to pull together tools from across our industry to provide this IaaS to jumpstart independent developers with "best practices by default."

The solution will have:

  • Auth
  • NoSQL, SQL, and Key/Value database support
  • Reverse Proxy & Load Balancing
  • Static Sites
  • Backend Services
  • Frontend Analytics
  • Backend Metrics
  • Serverless functions (if requested)
  • Paging/Alerting
  • External Configuration
  • Source Control
  • Container Registry
  • Helm Chart Repo
  • CI/CD Pipelines

This might seem like a lot, and it is, but solutions for everything above already exist. We just need to pull it all together.

How would we do it?

Architecture Diagram

To ensure the platform is cloud agnostic and easily deployable, we start with Kubernetes. Every piece of infrastructure in the platform will be hosted on top of this.

There are a couple of key technologies which satisfy our needs.

  • NGINX works for static site deployment and ingress and reverse proxy
  • Gitea provides all CI/CD needs from source control to pipelines
  • Postgres, and Vallkey satisfy most of our database requirements.
  • Prometheus satisfies our observability needs.

For a full list of planned integrations, see the diagram above.

Unknowns

  • What auth solution will be best?
  • How does this get packaged for both ease and extensibility?
  • Should serverless functions be included? How much work would that be?
  • Most projects need to accept a form of payment. What can we do to help people bootstrap that aspect?

Milestones

At every step, everything needs to be scripted and reproducible. Some sort of IaC is required even if it's just a Makefile. Listen and adapt the project to feedback received.

  1. Measure interest by publishing a post and seeing if people respond positively. If they do, move to the next step.
  2. Create a fork-able repository with a single-command deploy script. Running this installs or deletes the platform.
  3. Add Gitea and documentation.
  4. Add auth, a service which connects to it, and documentation.
  5. Add databases, a service which connects to them, and documentation.
  6. Add NGINX, a static site, analytics, and documentation.
  7. Add NGINX as a reverse proxy, a site it exposes, metrics, and documentation.
  8. Add an alert for the metrics, and documentation.
  9. Refactor all IaC to be uniform.

How could one get involved?

Leave a reaction on this post to help me gauge interest. If you want to get involved further, leave a comment with suggestions, ideas, requests, or offers to help.

P.S. This is not in competion with AWS. I wouldn't want to take on hosting any of this.

Top comments (0)