A
Admincraftโ€ข3mo ago
Ashank

Theoretical question: Run 100k players within a 1k worldborder

Budget: Unlimited, what's your approach? Gamemode: UHC Version: Latest / Close to latest
79 Replies
Admincraft Meta
Admincraft Metaโ€ข3mo ago
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 ashanki#0
Ashank
AshankOPโ€ข3mo ago
Latest version btw
Tamz
Tamzโ€ข3mo ago
100k PLAYERS? in 1 server??
Ashank
AshankOPโ€ข3mo ago
Imagine How would it happen tho
Tamz
Tamzโ€ข3mo ago
:hmm: maybe minestorm? but sharded in a way that it can run 10k players on a select amount of cores with like a 96 core thread ripper so 12 cores is dedicated to 10k players, or divide equally youd need to develop something entirely new for 100k concurrent 1 server you could do like sharded 100k diff servers but not 1 for what we have
๐๐ข๐ช๐ฎ๐š๐ญ๐ž๐ซ๐ง๐ข๐จ๐ง๐ฌ
Pumpkin :very_nice: If the only objective is to keep the players around (no plugins, no proxy, no whatever other important stuff could be), I'd probably use the most minimal and closest to metal implementation
codertommy
codertommyโ€ข3mo ago
do you fathom how much 100,000 players is
๐๐ข๐ช๐ฎ๐š๐ญ๐ž๐ซ๐ง๐ข๐จ๐ง๐ฌ
There was another experimental alternative to Pumpkin, not I don't remeber what it was called
codertommy
codertommyโ€ข3mo ago
this isn't how many players anymore, it's how much players
Skullians
Skulliansโ€ข3mo ago
oh my god pumpkin ๐Ÿ˜ญ honestly not rooting for them they focus on features, they donโ€™t give a shit about their codebase or rather perf Ferrumc? you also have valence & minestom
Skullians
Skulliansโ€ข3mo ago
those are the only two rust ones that arenโ€™t frameworks Iโ€™m aware of hold Hyperion? Bamboo? Feather or MCHPRS?
๐๐ข๐ช๐ฎ๐š๐ญ๐ž๐ซ๐ง๐ข๐จ๐ง๐ฌ
When I get bored and want to get myself lost in minecraft implementations, I usually look for those that dare to implement the whole game in C, Rust or whatever low-level language they like I'll try to look in my browsing history
Skullians
Skulliansโ€ข3mo ago
could be zeppelin or dynamite
Skullians
Skulliansโ€ข3mo ago
ah
๐๐ข๐ช๐ฎ๐š๐ญ๐ž๐ซ๐ง๐ข๐จ๐ง๐ฌ
Hyperion doesn't sound me, but look cool according to their architecture in their readme
Skullians
Skulliansโ€ข3mo ago
yeah
๐๐ข๐ช๐ฎ๐š๐ญ๐ž๐ซ๐ง๐ข๐จ๐ง๐ฌ
Without reading the code, ofc, not sure what they actually have inside
Skullians
Skulliansโ€ข3mo ago
xd
Skullians
Skulliansโ€ข3mo ago
:Sadge:
Ashank
AshankOPโ€ข3mo ago
gamemode is UHC, so its a bit of a requirement for vanilla features to be there + pvp capability
Ashank
AshankOPโ€ข3mo ago
It... Was Wtf discord U refuse to edit my message ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ Anyway ๐Ÿ’€๐Ÿ’€๐Ÿ’€
EternalHell
EternalHellโ€ข3mo ago
Why do people say minestorm. Its minestom
Tamz
Tamzโ€ข3mo ago
huh i swear it was minestorm
EternalHell
EternalHellโ€ข3mo ago
Nuh uh Minestom
Tamz
Tamzโ€ข3mo ago
odd, thanks
Loudbook
Loudbookโ€ข3mo ago
Whatโ€™s minestorm https://minestorm.net
Tamz
Tamzโ€ข3mo ago
LOL ok thanks
Ashank
AshankOPโ€ข3mo ago
Multipaper?
Casper
Casperโ€ข3mo ago
no
Snowz
Snowzโ€ข3mo ago
hell no
Ashank
AshankOPโ€ข3mo ago
๐Ÿ’€๐Ÿ’€ Why
Casper
Casperโ€ข3mo ago
unstable platform
๐๐ข๐ช๐ฎ๐š๐ญ๐ž๐ซ๐ง๐ข๐จ๐ง๐ฌ
Has anyone played Wynncraft? You can see some players from other servers running around even if they're on a different backend Maybe that could be an approach? Not sure what they use or if the latency induced will be permisible for an uhc tho I don't think java can handle 100k players tbh Probably using one of these but modified to work as an UHC instance -# Assuming all of them properly handle players and chunk loading using thread pools or other concurrency good practices, not gonna read their src or try them all, literally just learned of their existence ๐Ÿ’€
AeonRemnant
AeonRemnantโ€ข3mo ago
To do this I'd setup a fully custom C++ or Rust based server designed to be sharded. I'd run it in containers and try syncing everything with replicated databases. I'd go ahead and subshard the server, say we have a 50kx50k area, we can shard this a few times and treat that as its own little cluster microshard having its own database and server setup. We then take this design and horizontally scale it up and out until reaching 100k player capacity sustained. Setup however many shards and subshards are required, and if needed implement a dynamic scaling system that's able to change how much of the world is loaded by each server, say shard1 subshard2 has too many players, the area that server governs would shrink and the excess is given to the surrounding servers, in the worst case we can spawn an extra shard and split subshard2 into subshard2-a and subshard2-b. The architecture would look roughly like this:
cluster:
shard1:
subshard1: 50kx50k area
subshard2-a: 25kx50k area
subshard2-b: 25kx50k area
shard2:
subshard1: 50kx50k area
subshard2: 50kx50k area
shard3:
subshard1: 50kx50k area
subshard2: 50kx50k area
cluster:
shard1:
subshard1: 50kx50k area
subshard2-a: 25kx50k area
subshard2-b: 25kx50k area
shard2:
subshard1: 50kx50k area
subshard2: 50kx50k area
shard3:
subshard1: 50kx50k area
subshard2: 50kx50k area
A gross oversimplification since it doesn't take into account the network stack, georeplication, routing of any kind, or how you'd manage the bandwidth to make it stable, but that's outside the scope of here.
Jenkins
Jenkinsโ€ข3mo ago
it's minestom.
Tamz
Tamzโ€ข3mo ago
i see that now
Jenkins
Jenkinsโ€ข3mo ago
also how exactly do you manage to find 100K players I mean, in theory, if everyone can't see each other then you can easily manage 1M without any server logic Just a pure limbo
ProGamingDk
ProGamingDkโ€ข3mo ago
Well he did say 1k worldborder
AeonRemnant
AeonRemnantโ€ข3mo ago
Yeah, the thing there is you just don't do that. Computers simply are not fast enough to do 100k people in that small of an area, to try and shard it successfully you'd run into issues with overhead where you'd lose more trying to replicate than you'd gain.
Ashank
AshankOPโ€ข3mo ago
makes sense ig, so as of rn its physically impossible to run 100k players in that area
AeonRemnant
AeonRemnantโ€ข3mo ago
It's not physically impossible for a server, it would just need to be absurdly well written and multicore, never mind the hardware. It's more than impossible for a client to try that though.
Ashank
AshankOPโ€ข3mo ago
๐Ÿ’€ yeah a client to load all those people that'd be an insta crash
1whoยกssus?
1whoยกssus?โ€ข3mo ago
WHAT lmfaoooo
MachineBreaker
MachineBreakerโ€ข3mo ago
Be prepared to do your own networking handling The client would die with like 200-500 players around them with constant actions So you need to do fancy tricks to reduce the network load for these little guys
Ashank
AshankOPโ€ข3mo ago
๐Ÿค” what if we assume the client is on a supercomputer and has 30TB of bandwidth but we only have today's server parts etc
Jenkins
Jenkinsโ€ข3mo ago
won't matter
Ashank
AshankOPโ€ข3mo ago
really?
Jenkins
Jenkinsโ€ข3mo ago
yes
MachineBreaker
MachineBreakerโ€ข3mo ago
you're running minecraft client
Ashank
AshankOPโ€ข3mo ago
assuming java isnt java fixed it?
MachineBreaker
MachineBreakerโ€ข3mo ago
java isnt the problem ?
Jenkins
Jenkinsโ€ข3mo ago
won't matter
Ashank
AshankOPโ€ข3mo ago
neeeeevermind then whats the bottleneck here
MachineBreaker
MachineBreakerโ€ข3mo ago
the whole codebase is not made for that the networking impl isnt even fully async its semi async
Jenkins
Jenkinsโ€ข3mo ago
well you can make it but at that point you just made your own game
MachineBreaker
MachineBreakerโ€ข3mo ago
no at that point you just broke all expectations
Jenkins
Jenkinsโ€ข3mo ago
both
MachineBreaker
MachineBreakerโ€ข3mo ago
of plugins or client syncing
Jenkins
Jenkinsโ€ข3mo ago
the client would still be a bottleneck
MachineBreaker
MachineBreakerโ€ข3mo ago
a lot of packets are synced due to working with the world state
Ashank
AshankOPโ€ข3mo ago
p much... so even if the server was figured out the client is the biggest issue
MachineBreaker
MachineBreakerโ€ข3mo ago
yes
Ashank
AshankOPโ€ข3mo ago
GG
MachineBreaker
MachineBreakerโ€ข3mo ago
you could write an algorithm that runs off-main
Jenkins
Jenkinsโ€ข3mo ago
i meant rewriting the client too
MachineBreaker
MachineBreakerโ€ข3mo ago
that based on distance and raytracing you show/hide players
ProGamingDk
ProGamingDkโ€ข3mo ago
30 tb is nothingg oh the client
MachineBreaker
MachineBreakerโ€ข3mo ago
otherwise you will keep multiplying your packet sending
ProGamingDk
ProGamingDkโ€ข3mo ago
still not much 1k diameter doesnt leave much distance
Ashank
AshankOPโ€ข3mo ago
wait so what was the conclusion for fixing server side again
MachineBreaker
MachineBreakerโ€ข3mo ago
cap the player tracking amount you only show near players no need to show the 99k players at the end of the border :catcry: there are also a few tricks but wont disclose funny how you can improve networking on minecraft
Ashank
AshankOPโ€ข3mo ago
lmfao
Jenkins
Jenkinsโ€ข3mo ago
we love gatekeeping
MachineBreaker
MachineBreakerโ€ข3mo ago
ofc

Did you find this page helpful?