Multi-Node Setup
Scale your music bot across multiple Lavalink nodes for improved performance, load distribution, and high availability.Basic Multi-Node Configuration
Simple Multi-Node Setup
Load Balancing Strategies
AquaLink provides several built-in load balancing strategies that can be set using theloadBalancer
option in the Aqua constructor.
leastLoad
(default): Selects the node with the lowest overall load, calculated based on CPU usage, memory, playing players, and REST API calls. This is generally the best option for most use cases.leastRest
: Selects the node with the fewest REST API calls.random
: Selects a random connected node.
Advanced Node Configuration
You can add custom properties to your node configurations for use in advanced, custom logic (like a custom node selector). The library itself will ignore these extra properties.Example with Custom Properties
Node Selection Logic
Custom Node Selector Example
While AquaLink has a built-in node selector based on theloadBalancer
option, you can implement your own logic to choose nodes for specific players.