Live data from Hacker News

How we built an auto-scalable Minecraft server for 1000+ players

worldql.com

71–80 of 145 posts

Re: How we built an auto-scalable Minecraft server for 1000+ players

#71
post #12
post #6

Hi, I made this! Was gonna wait until it was downloadable and the documentation was more complete before posting it on HN. Thanks for sharing it though. The Minecraft setup will be available and useable by anyone Wednesday of next week. More documentation and a roadmap will follow shortly after.

I rent a small Linode to run a minecraft server for my extended family. Sometimes it struggles to keep up with just a half dozen of us, and when I tried swapping from a spigot based system to a forge one so the kids could have mods it was basically unplayable. I can't imagine scaling out to thousands of users, this was some amazing work. While developing this did you come up with any best practice recommendations for…

Assuming the Minecraft server runs on Arm64, you may want to try out Oracle Cloud free tier.

You can spin up a 4 core 24GB instance, the CPU is 4 dedicated cores and quite fast.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#72
post #6

Hi, I made this! Was gonna wait until it was downloadable and the documentation was more complete before posting it on HN. Thanks for sharing it though. The Minecraft setup will be available and useable by anyone Wednesday of next week. More documentation and a roadmap will follow shortly after.

Have you looked at something like fly.io to do physical placement near players globally while still supporting consistency?

Re: How we built an auto-scalable Minecraft server for 1000+ players

#73

Earlier quoted context omitted.

> There are many hard problems in video game performance, but "games just can't make good use of multiple cores" is not one of them. That's not quite what I said. I'm happy you're using specs to work on an open source game. Specs and bevy and all the ECS work being done is super exciting and fun. I In the meantime there are no major games that effectively scale to, let's say, 64 cores. I don't know of anything shippe…

If you're just using ECS to parallelize disjoint subsystems then no, it won't get you there. But if you're using it (as Veloren is, and as I hope more people do) in a more deliberate way, to further parallelize within a system, you can indeed scale quite well to large numbers of cores. I've done some theoretical bottleneck calculations and we will still have tons of work to do with 64 cores available, if the game is…

The original question was:

> Is there a specific reason why Minecraft hasn’t been “adapted” from the original game to a robust design that could scale to larger worlds and player populations before your project ?

The answer is because it's a lot of hard work.

I am happy that a bunch of smart and talented people are working really hard to optimize Veloren. Good for you. I hope you help push the state of the art.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#74
post #20
post #6

Hi, I made this! Was gonna wait until it was downloadable and the documentation was more complete before posting it on HN. Thanks for sharing it though. The Minecraft setup will be available and useable by anyone Wednesday of next week. More documentation and a roadmap will follow shortly after.

Is there a specific reason why Minecraft hasn’t been “adapted” from the original game to a robust design that could scale to larger worlds and player populations before your project ?

The development priorities of Minecraft are a little strange. They have had a lot of opportunities to increase extensibility and performance (see modding API, cubic chunks, etc) but were too slow about it or focused on other things. AFAIK the long-term vision is to move the game entirely to the C++ clients which are much more performant, but a lot of the core playerbase is still on Java for modding and platform compatibility.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#75
post #43

Earlier quoted context omitted.

What were the specs of the server and which Spigot fork did you run? A month ago I ran a Paper instance from a Digital Ocean instance with about 4 GB of RAM and OpenJ9 JVM and it never dipped below 20 TPS even with a larger render distance. This was on Vanilla 1.17.

Have you noticed much difference between a HotSpot-driven JRE and OpenJ9? I am somewhat irrationally biased against J9 because they made us stick it in everything at IBM, but I'm willing to reconsider for better Minecraft performance.

I have yet to see hard data on it, but the folks that have been in the trenches doing client-side mods on Minecraft swear that J9 is the superior JVM for the latest versions of Minecraft (1.16+). I don't know that anyone has really done a proper benchmark.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#76

I used to play on a pretty popular MMO-style server called [CivCraft]( https://www.reddit.com/r/Civcraft/ ) that unfortunately became a victim of its own success due to the large player count. It would often have 250+ players who would build these massive redstone machines and the server TPS would grind to a halt making it unplayable. After a few years it attempted a re-launch using an approach similar to to the firs…

FWIW the sharding at worldborder approach is still the preferred way to shard in CivCraft-inspired servers. IIRC the CivCraft 3 sharding happened in the middle of a continent, so you could feasibly be chasing someone and both would be switched to a separate world mid-chase.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#78
post #6

Hi, I made this! Was gonna wait until it was downloadable and the documentation was more complete before posting it on HN. Thanks for sharing it though. The Minecraft setup will be available and useable by anyone Wednesday of next week. More documentation and a roadmap will follow shortly after.

Does this solution handle PvP style play? Interesting project, keep up the great work!

So obviously I have not actually played PvP on a worldql server but looking at the videos, even if there is some delay: playing at 20tps with some small overhead is much much better than playing at 4tps with no overhead. The PvP experience should be much better than the alternative.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#79
post #20

Earlier quoted context omitted.

Is there a specific reason why Minecraft hasn’t been “adapted” from the original game to a robust design that could scale to larger worlds and player populations before your project ?

Pretty much no video game engine scales with cores. There are too many dependent systems. There's no game engine that I'm aware of that effectively uses more than a couple of cores for gameplay simulation. Distributed physics is a well understood problem with no "solution". Just different trade-offs. This solution is cool, but it's not novel or anything. Minecraft is particularly challenging because the entire world…

There are no general solutions to any of this. Just a bunch of custom one-offs. SpatialOS is trying. My opinion on it is extremely, extremely negative. And I'll leave it at that.

I'd like to hear more about that. nagle at animats.com, if you don't want to say much in public.

This ties into the "metaverse" business. Lots of metaverse talk about big seamless worlds full of user-created content, but not much is running. So far, nothing with user created content really scales. There are lots of little shared worlds, like Breakroom/Sinespace, Facebook Horizon, IMVU, etc. There are big-space voxel worlds, such as Dual Universe and Roblox. There are general purpose region-oriented big "seamless" worlds such as Second Life, which have trouble at the seams and can't handle crowds in one place, the same problem these Minecraft improvers hit in round 1.

Spatial OS was going to fix all this. Their system is basically objects which can be accessed remotely and which migrate to where the most accesses are coming from. It cost over $100 million to develop, they had to do the hosting, and the first four games all went broke due to the high cost of hosting. So, since they had too much venture capital, they set up an in-house game studio and created Scavengers, which is reportedly a so-so shooter.

Roblox has plans to solve this, somehow, by sheer money power. When you have a few billion dollars to spare, that might work.

If we're headed for the "metaverse", this has to be cracked. Somehow.

(I've been writing a multi-threaded Rust/Vulkan client for Second Life / Open Simulator so I'm painfully aware of these problems.)

Re: How we built an auto-scalable Minecraft server for 1000+ players

#80
post #12

Earlier quoted context omitted.

I rent a small Linode to run a minecraft server for my extended family. Sometimes it struggles to keep up with just a half dozen of us, and when I tried swapping from a spigot based system to a forge one so the kids could have mods it was basically unplayable. I can't imagine scaling out to thousands of users, this was some amazing work. While developing this did you come up with any best practice recommendations for…

Assuming the Minecraft server runs on Arm64, you may want to try out Oracle Cloud free tier. You can spin up a 4 core 24GB instance, the CPU is 4 dedicated cores and quite fast.

It does run on arm64, I am currently running a forge server with a few mods on this exact setup. It's just for a few friends, I don't think we've had more than 5 or 6 on at a time but it seems to be performant enough.

It's not perfect but it ended up being a better experience than we were having with minecraft realms.

Post reply on HN