Repository navigation
Player Affinity

You configure player affinity to prefer the healthy lobby a player used recently. You use it when returning to the same backend is desirable.
[routing.affinity]
enabled = true
stickiness = 0.7stickiness ranges from 0.0 to 1.0:
| Value | Behaviour |
|---|---|
0.0 |
You always use normal routing |
0.7 |
You prefer the recent lobby 70% of the time |
1.0 |
You always return when the lobby remains eligible |
You require the remembered lobby to be registered, healthy, below capacity, allowed by routing context, and out of maintenance mode or drain. You choose another candidate and update the affinity record when any filter rejects the lobby.
You expire affinity records after ten minutes. The configured storage backend persists unexpired records; file storage uses player_affinity.json.
You share affinity updates between Velocity proxies when you enable Redis. You review Redis and Multi-Proxy for setup.
You map a player UUID to a stable backend with consistent_hash, skipping the affinity preference. You pair consistent_hash with stickiness = 1.0 to use affinity as a backup when the hashed backend goes offline.
You balance familiar routing and load using power_of_two with stickiness = 0.7.
You store only UUID and lobbyId in affinity records. You do not store IP addresses, session tokens, or chat history. You keep affinity in the affinity SQL table for other plugins to read.
Home · Quick Start · Configuration · Operations · FAQ
Website · GitHub · Support / Discord · Report a Bug
VelocityNavigator v4.5.0 · by DemonZ Development
![]()
Getting Started
Routing
- Routing Algorithms
- Algorithm Visualizations
- Initial Join Balancing
- Contextual Routing Guide
- Player Affinity
- Health & Circuit Breakers
- Retries & Fallbacks
- Geo Routing
Player Experience
- Java & Bedrock Selectors
- Selector Customization
- Backend NPCs
- Backend YAML Menus
- Language Packs
- Party System
- Capacity Queue
Configuration
- Configuration Guide
- Modular Configuration
- MOTD Configuration
- Authentication & Security
- Backend Bridge Configuration
- Migration Guide v3 → v4
- Migration Guide v4.4 → 4.5
Network & Operations
- Advanced Proxy Systems
- Redis & Multi-Proxy
- Common Core Architecture
- NavigatorAPI
- Storage & Databases
- Server Management
- Backend Lifecycle States
- Maintenance Mode
- HTML Dashboard
- Operations Runbook
- Prometheus & Grafana Setup
- Troubleshooting Guide
- FAQ
VelocityNavigator 4.5.0