-
Notifications
You must be signed in to change notification settings - Fork 1
Initial Join Balancing
Tip
New in v4.0.0 (updated in v4.1.0) — Load-balance players the moment they connect to the proxy, bypassing the rigid configurations of vanilla Velocity!
By default, Velocity uses a static try list in velocity.toml to decide which server a new player joins:
[servers]
try = ["lobby-1", "lobby-2"]Velocity always tries the first server in the list. If lobby-1 is online, every single player joins lobby-1. The second server is only used if the first one crashes or shuts down. This means your expensive second lobby sits entirely empty while the first one bears the brunt of your entire community's weight.
VelocityNavigator intercepts the PlayerChooseInitialServerEvent and applies its routing logic before the player's client lands on any server.
sequenceDiagram
participant Player
participant Proxy as Velocity Proxy
participant VN as VelocityNavigator
participant L1 as Lobby-1 (80 Players)
participant L2 as Lobby-2 (0 Players)
Player->>Proxy: Join Network
Proxy->>VN: PlayerChooseInitialServerEvent
Note over VN: Runs Async Health Checks<br/>Finds Lobby-1 has 80 players<br/>Finds Lobby-2 is empty
VN->>Proxy: Override Default -> Send to Lobby-2
Proxy->>L2: Connect Player
L2-->>Player: Successfully Connected!
-
least_playersmode: The server with the fewest players is selected. -
power_of_twomode: Two random candidates are picked; the emptier one wins. -
round_robinmode: Players alternate between lobbies in strict rotation. -
randommode: Each player gets a random lobby assignment. -
weighted_round_robinmode: Servers with higher weight receive proportionally more players. -
least_connectionsmode: Uses EMA of connection rates and load for bursty traffic. -
consistent_hashmode: Player UUID deterministically maps to a specific server.
Open your navigator.toml:
[routing]
balance_initial_join = true| Value | Behavior |
|---|---|
true |
Players are load-balanced immediately upon initial join. |
false |
Velocity's native try list is used (default Velocity fallback). |
Warning
You might want to temporarily set balance_initial_join = false if you have a dedicated "Welcome/Auth" server that all unverified players must join first unconditionally.
- Subscribes to
PlayerChooseInitialServerEvent(fires immediately afterPostLoginEvent). - The routing ping-health tests run concurrently to prevent artificial sign-in latency.
- When
verbose_logging = true, every balanced initial join is debug-logged.
Home · Quick Start · Configuration · Operations · FAQ
GitHub · Support / Discord · Report a Bug
VelocityNavigator v4.3.0 · by DemonZ Development
![]()
Getting Started
Routing
- Routing Algorithms
- Algorithm Visualizations
- Initial Join Balancing
- Contextual Routing Guide
- Player Affinity
- Health & Circuit Breakers
- Retries & Fallbacks
Player Experience
Configuration
Network & Operations
- Advanced Proxy Systems
- Redis & Multi-Proxy
- Storage & Databases
- Server Management
- Backend Lifecycle States
- HTML Dashboard
- Operations Runbook
- Prometheus & Grafana Setup
- Troubleshooting Guide
- FAQ
VelocityNavigator 4.3.0