Hacker News new | ask | show | jobs
by skybrian 40 days ago
The article assumes there are people who want clusters. But a single Linux VM in the cloud can scale pretty far. Separate VM's for different apps works well for isolation. Why do I need a cluster?
9 comments

> Why do I need a cluster?

Uptime, self healing, reproducibility, separating the system from app. There's probably a half dozen more.

K8s comes with resource consumption tax certainly but for anything beyond the trivial it's usually justified.

> Separate VM's for different apps works well for isolation

Sounds inefficient along with a lot more work doing the plumbing than simply writing a 100 lines of yaml.

Who wants to deal with YAML? Sometimes the easiest way to set up a VM is by talking to your phone:

https://commaok.xyz/ai/just-in-time-software/

I mean, I don't do that, but I'll type a prompt.

you won't have to deal with yaml for these clusters

let me draw this out the way i've been playing with:

a classic vm exists, and supports kvm — this means you can run stuff like firecracker in there

an ssh server runs on this vm, and when you connect to it, you're dropped into a repl/tui where you can list existing microvms, create new ones, or destroy existing ones, and, of particular use, you can attach to one.

as an added nicety, if you connect with `ssh user+dev@example.com`, your connection skips the management interface and you are dropped into the `dev` machine — if it didn't yet exist, you wait 3s, and now it does

vms can talk to each other internally, can connect out, and persist if the server needs a restart

what i don't have yet is proper multi-tenancy, it treats each ssh key as an account, which is fine since it's just me; incoming connections is not figured out, internal supervisor to keep services running inside each microvm, isolation inside firecracker, snapshoting or backups, and the whole shopping list that would make it an actual mvp

Sounds like a nice setup. The way exe.dev does things seems somewhat similar.
yep, a lot of this is based on what exe.dev already does, some of it takes more inspiration from sprites.dev, and others are wishlist items
Never understood the appeal of Kubernetes to developers, outside of a massive deployments. Always felt like a poor man's Linux for those that insist on using apple or windows desktop.
I am not sure I understand this argument. Kubernetes typically runs on Linux. I use an Apple laptop, work mostly with headless Linux VMs and Kubernetes. What is a “poor man’s Linux”?
Does your apple laptop run Linux or MacOS? Do you run Kubernetes locally or only when network permits? What was the reason for targeting Linux rather than MacOS? And what in this context is the value add of using Kubernetes for your development?
I build production Kubernetes and cloud infra for work. When I run Kubernetes locally, it is because I am developing operators or manifests for application workloads. Kubernetes is not the “value add” for my dev workflow, it is literally what I am developing.

I have run Linux laptops before. After running it for five years, I came to the conclusion that it did not make a good laptop for my use-case. Poor suspend-resume support, poor wireless networking support means I can not just pick and go. (And no one has yet to replicate Apple’s trackpad experience). So yes, I run Apple laptop with MacOS and use my TUI tools, sometimes with Linux running in an VM, sometime remotely to a full headless VM with my full dev suite via mosh because I use cli and TUI for dev.

Your turn. You still have not defined “poor man’s Linux”.

Yeah I’ve been doing this with tailscale and a single vps and it’s been wonderful. Unless you’re planning to have millions of users I don’t think there’s any reason to have a cluster.

Maybe they’re assuming some massive amount of compute will be necessary for future tasks? Self hosted LLMs? I’m currently finding it difficult to come up with more uses for my vps beyond hosting trillium and some personal applications I’ve made

> Why do I need a cluster?

I run a single-node K8s cluster on a dedicated server because it's way cleaner to manage than the previous mess and mix of docker compose + traefik routing + random stuff installed as package on the host.

I can create "vhosts" for practically anything in a declarative manner, and if the cluster blows up, I have 5 small scripts to bootstrap it and all I need is `kubectl apply -k .`.

I briefly played with k3s before realising than with a single machine I was maintaining a lot of complexity for limited benefits. Then I switched to NixOS, have everything declared in configuration and a much leaner and simpler setup
I think k8s starts making sense when you have to manage more than 10-15 machines. Better yet, 50-100 machines. Especially if these 200 machines actually run 3-4 types of containers total.

Usually it's rather unlike a sane dev setup. Even if your prod setup uses hundreds microservices (you're Google or Uber or something like that), you don't want to run all of them in your personal dev environment, you reuse 90%-99% of stable microservices running in the QA / integration / whatnot environment, and only run a handful locally.

>Why do I need a cluster Supposedly because a box with dual AMD EPYC 9965, 12TB of RAM, 10 x Nvidia H200and 1PB storage might not be enough to run the latest version of Solitaire or Minesweeper and you need more oomph.

Or maybe you want to run stuffz on 1000 x Raspberry Pi just for fun.

Configuring one box is enough of a pain. I guess AI fixes that though. I don't need to learn box wrangling if the boxes wrangle themselves.
Isn't there a meaningful sense in which "separate VMs for different apps" constitutes a cluster?

The "cooperative task" they're engaged in is just, broadly, meeting your needs, whatever they are.

The isolation is a desirable property, and I agree this is much preferable to a highly inter-coupled bunch of machines, and also that thia stretches the typical sense in which we refer to a "compute cluster", but I don't think it's an entirely invalid framing of the term.

> Isn't there a meaningful sense in which "separate VMs for different apps" constitutes a cluster?

Not really. In my experience clustering implies multiple compute elements serving the same function with a coordination mechanism to provide redundancy and/or enhanced capacity.

JBOD vs. RAID.

if you run firecracker inside the rented cloud vm, and you let a few of them run, and perhaps interact with each other, you have essentially created a cluster of microvms that's hosted on a single machine

as argued by OP, you can see this happening with exe.dev, and less explicitly with sprites.dev

MPI is kind of fun to write.