Hacker News new | ask | show | jobs
by andai 56 days ago
This is relevant to what I have been learning about recently!

I'm getting ready to launch an online game and I'm dealing with "how do I just run my game server on dozens of boxes without dealing with linux stuff".

I don't really have an answer yet (leaning into "just get one really powerful box" lol), but my investigation into the problem so far has been pretty interesting.

You can conceptualize the "my program + the OS" as a single program. It's not a pretty picture. Lots of global mutable state. (Also it randomly modifies itself??)

The whole point of Docker appears to be "I just want to run my program", in the least painful way possible. Immutable Linux extends the "lean in the direction of sanity" idea. (The programming and OS worlds seem to be learning the same lessons, from different angles.)

And then there's "it turns out the OS solves problems I don't have, while creating many new problems", which leads to Unikernels. Fun stuff ;)

In a perfect world, I wouldn't need the OS at all. Docker gives me two Linuxes to worry about! The number of operating systems I want to worry about is zero!

Which brings us to Unikernels! Just ditch the OS! Technically the right answer, except... now I'm a kernel developer? Maybe that's the least bad option, long term.

2 comments

I'm biased, but I could see Lightwhale play a key role in this setup. You could start small, two nodes with Lightwhale in a Docker Swarm cluster. Run your server in a container. Leverage Swarm's load balancing to distribute connections to the nodes. You go l can even experiment with this in Proxmox and run the Lightwhale nodes as VMs if you like.

You get a minimum effort OS to host your game on, and the option to distribute it.

> "how do I just run my game server on dozens of boxes without dealing with linux stuff"

A good first question to ask yourself is why you need to run it on dozens of boxes. You probably don't.

The point of Docker is not "I just want to run my program", the point is to bundle an application with its dependencies. It's one way to distribute applications, and far from the only one (despite what talking to some people might make you think).

As for the last part of your post, none of it is correct. Docker is not a "second linux to worry about" and considering unikernels in your use case is insane.

Terry Davis once said that "an idiot admires complexity, a genius admires simplicity". You say you're "getting ready to launch an online game", then launch it. The best way to do that is the simplest way, which in my opinion is running it as a systemd service on _one_ Linux VM. When that actually creates problems for you, solve those problems, and only those problems.

Yeah, I already did that, the current problem is "now I need ten thousand times more players so it pays the bills."

Well, that's several problems, of course :) but one of them is latency and capacity (i.e. servers).

My actual dependency is whatever it takes to get data in and out of a network card.