Lobbies and limbo
Lobbies are your hub servers. Limbos are small waiting rooms where players sit while their target server boots. VPP can pick between several of each, keep a minimum number of lobbies running, and start or stop extra lobbies as load changes.
VPP does not choose the server for a player's first join. Velocity's try list in velocity.toml still does that.
Quick start
- Pick the Velocity server names for your hubs and waiting rooms.
- Edit
plugins/velocity-ptero-power/config.yml:
lobbyBalancer:
lobbies:
- lobby
- hub
limbos:
- limbo
strategy: "ROUND_ROBIN"
minOnline: 1
autoScaleEnabled: true
sendToLimboOnStart: true # defaults to true when limbos is not empty
forcedHostOfflineBehavior: LOBBY_OR_LIMBO- Add every lobby under
servers:with its panelid. VPP ignores lobbies that are not managed. Limbos can be managed or just registered invelocity.toml. VPP can only start the managed ones. - Restart the proxy or run
/ptero reload.
Keep limbo running
Add the limbo to alwaysOnline so the waiting room does not need a cold start of its own.
Start simple
Begin with ROUND_ROBIN and minOnline: 1, and tune later.
How the holding server is chosen
- Waiting for a server to start (
sendToLimboOnStarton): a reachable limbo first, then a reachable lobby. - Forced-host join with
sendToLimboOnStartoff:forcedHostOfflineBehaviordecides.LOBBY_OR_LIMBOtries a lobby first, then a limbo.LIMBO_ONLYtries only limbos.DISCONNECTdisconnects the player. - Server in maintenance: a reachable limbo, or the connection is denied.
With sendToLimboOnStart on, forced-host joins use the limbo-first order too, whatever forcedHostOfflineBehavior says. VPP treats any connection without a previous server as a forced-host join, including the first server from the try list.
If no holding server is found, a player who was switching servers stays where they are and waits in the queue. A player who was joining the proxy is disconnected with a message saying the server is starting.
A managed lobby or limbo counts as reachable when VPP's online check passes. An unmanaged limbo counts as reachable whenever it is registered in Velocity.
Strategies
ROUND_ROBINtakes the next server in the list each time.LEAST_PLAYERSpicks the server with the fewest players.LEAST_CPUpicks the managed server with the lowest CPU usage from the panel, which costs one resource request per candidate (cached forresourceCacheSeconds). If no CPU data is available, it falls back toLEAST_PLAYERS.
While a target starts
- A player who runs
/serverto an offline managed server goes to a limbo (or a lobby if no limbo is reachable) whensendToLimboOnStartis on. - A player who is already on the limbo stays there and stays in the queue.
- A forced-host join to an offline server follows the rules in the previous section.
- Once the server is online, VPP waits
startupJoinDelayseconds, then transfers the queue. If the backend kicks a player withSERVER_DISCONNECTEDright after the transfer, VPP requeues them (see Core mechanics).
Lobby scaling
Every healthCheckInterval seconds VPP checks the lobbies:
- It starts lobbies until at least
minOnlineare up. - With
sendToLimboOnStarton and no limbo reachable, it starts a limbo. - With
autoScaleEnabled: true, it starts another lobby when players on the online lobbies reachpreStartThresholdPercentof their combined capacity (playersPerServerper lobby). WithLEAST_CPU, it also starts one when any lobby goes abovecpuScaleUpThreshold.maxOnlinecaps the number of lobbies (0 means no cap). - If a lobby VPP started is not up after
startFailureFallbackSeconds, VPP leaves it alone forstartFailureCooldownSecondsand starts a different lobby. - With
scaleDownEnabled: true, VPP stops a lobby aboveminOnlineonce it has been empty forscaleDownIdleSeconds. It stops one lobby per check.
lobbiesToUse limits all of this to the first N lobbies in the list (0 uses all of them).
Managed and unmanaged
- A managed server is listed under
servers:with a panel ID. VPP can start and stop it. - An unmanaged server is only in
velocity.toml. VPP can send players to it as a limbo but cannot start it, and does not use it as a lobby.
Example layouts
Two lobbies, one limbo
lobbyBalancer:
lobbies:
- lobby
- hub
limbos:
- limbo
strategy: "ROUND_ROBIN"
minOnline: 1
sendToLimboOnStart: trueMany lobbies with scaling
lobbyBalancer:
lobbies:
- lobby-1
- lobby-2
- lobby-3
lobbiesToUse: 0 # 0 = consider all listed
strategy: "LEAST_PLAYERS"
playersPerServer: 80
minOnline: 1
maxOnline: 0 # 0 = no hard cap
autoScaleEnabled: trueCommon questions
Do lobbies need to be under servers: too?
Yes. VPP skips any lobby that is not listed underservers: with a panel ID. Limbos do not need to be, as long as they are registered in Velocity. Which strategy should I use?
Start withROUND_ROBIN. If player counts end up uneven, switch to LEAST_PLAYERS. If CPU load matters more than player count, use LEAST_CPU. What happens when every lobby is down?
For a player waiting on a start, VPP tries the limbos first anyway. If no lobby or limbo is reachable, a player who was switching stays on their current server and waits, and a player who was joining the proxy is disconnected.Do lobbies and limbos count toward maxOnlineServers?
Not by default. SetcountLobbiesInMaxOnline or countLimbosInMaxOnline to true to count them. What is the default forcedHostOfflineBehavior?
The shippedconfig.yml sets LOBBY_OR_LIMBO. If you remove the key from a lobbyBalancer section, VPP uses DISCONNECT. Limbo checklist
lobbyBalancer.limboslists names that exist invelocity.toml.sendToLimboOnStart: true, or leave the key out. It turns on when limbos are listed.- Optional:
forcedHostOfflineBehavior: LOBBY_OR_LIMBOandalwaysOnline: [limbo]. - Run
/ptero reload, then join an offline managed server. You should land on the limbo and move to the target afterstartupJoinDelay.
All lobbyBalancer options are listed in Configuration.
