Server Scaling Resources
Sorry if this isn't the appropriate place for open ended stuff like this!
I'm curious - are there are any established resources (websites, wikis, blogs, groups) covering methods for scaling minecraft servers beyond a few hundred concurrent players (into the thousands)? I've been curious about a variety of things, including approaches for:
- hosting minigame networks
- maybe with K8s + Agones
- seems like hand-written systems are also common for more well established servers
- hosting large, 1000+ player (on the same world) survival servers seamlessly
- is Folia the state of the art for this?
- are there any new, lesser-known projects trying to tackle this stuff?
I understand some of this information is probably kind of behind closed doors since there's some money involved. I'm interested in consolidating information about this stuff so it's more approachable for everyone & getting an idea of what already exists so I don't reinvent the wheel.
20 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by bitcru.sh#0
@AeonRemnant will be all over this, he loves k8s.
Folia is kind of alright, it’s not stable and requires a very specific player base (everyone has to be spread out). Unsure if it will even do 1k, some did manage it https://cubxity.dev/blog/folia-test-june-2023 though.
Many popular servers actually use a sharding solution (obviously private and likely very expensive) where the server is split into multiple servers that run portions of the world independently (but still share data, inventories etc with something like HuskSync)
Cubxity's Blog
Breaking the Limits: How Folia Made 1,000 Player Minecraft Server a...
Check out the impressive results of the large-scale Folia test that took place on June 18th, 2023. Learn more about our findings and technical challenges in this post.
Skullian is correct, I'm all over this shit.
Basically in order to do 1k people on a single server you have exactly three options.
1. Use UniverseSpigot+ with some custom work from Machine and hope to dear fuck you can optimize hard enough to break 1k concurrent in a single server. It's technologically possible under the right conditions.
2. Use Minestom and REALLY optimize the fuck out of it on your own time since you can cut out everything you don't strictly need.
3. Use a server sharding solution ala Multipaper and hope you can fix enough things to work on it.
And now for scaling...
My first question, do you even have enough players to justify using Kubernetes in prod? For 99.99% of every server to ever live the answer is no, but do you?
-# Context: multipaper is highly unstable and janky. UniverseSpigot+ is arguably the most performant (paid) single-server software to exist for modern versions that’s semi-public. Iirc you must own the base version which is 60 or 70, then it’s ~60 a month for +
^
Like there's faster things, but you need connections to be able to get it.
yeah
Or of course go the hard route and build your own.
Not something you can commission from your average helpchat dev :KEKW:
Mhmm.
Minestom would be the best but you’d generally have to implement EVERYTHING from scratch
Eeeehh, well no.
Using a non Java fork like Ferrum would be technologically 'best', but you have to legitimately implement everything in a classically harder language than Java.
Yeah true, unfortunately minestom (or valence) are the only ones in aware of that are actually decently complete
I've seen and messed with Minestom, but wasn't aware of Ferrum or Valence... Fortunately I write java professionally and I'm a long time rust dev. I've contributed to Paper to learn the process and have somewhat of an understanding of how the server logic works, so I could feasably make server patches.
Oh not at all, just asking out of pure hobby curiosity. I brought it up because I work with K8s daily and hosting huge servers is an interesting topic to approach, even if it's theoretical
Ok yeah good, that's the other justification for using k8s for this. :LUL:
Yeah I wouldn't super bother with Agones, don't get me wrong Shulker is fine and all, but it's meh as a solution for Minecraft specifically.
Just gonna shill real quick and say I've been working with a guy on this lovely program and pretty soon we're adding k8s autoscaling with context aware features unlike Agones which is purely based off basic statistics. https://github.com/Aelysium-Group/rusty-connector
GitHub
GitHub - Aelysium-Group/rusty-connector: A player and server connec...
A player and server connection manager for Velocity based Minecraft Networks! - Aelysium-Group/rusty-connector
We could always use more k8s eager devs to help kick it over the line, v0.9.0 is so close.
Valence is very nice but like minestom it’s a framework.
Ferrumc is in heavy development and acts to be a full replacement once it’s finished (not a framework) with support for both rust and basic JVM plugins
But nowhere near ready
Looks super interesting! I'll take a closer look at the source when I have a chance
Hell yeah dude! :LUL:
For anyone who finds this and has similar curiosity, here are some interesting papers I've found on the topic after mulling with my own ideas and taking a look at Folia and MultiPaper:
https://www.sciencedirect.com/science/article/pii/S1389128620313177
https://inria.hal.science/hal-01079509/document
https://atlarge-research.com/pdfs/2023-donkervliet-icdcs-servo.pdf
https://www.usenix.org/system/files/hotcloud20_paper_donkervliet.pdf
https://dl.acm.org/doi/pdf/10.1145/3652212.3652216