Load balancing
MinIO Sidekick distributes requests across healthy backend servers using configurable algorithms.
Least connections algorithm
The default least algorithm routes requests to the backend with the fewest active connections.
When multiple backends have the same connection count, Sidekick selects the backend that most recently finished processing a request.
This ensures even distribution while considering both current load and recent activity.
Before selecting a backend, the algorithm randomly shuffles backends with equal connection counts. This prevents all clients from converging on the same backend when loads are low to medium. The shuffle combined with least-connections selection provides fair distribution across all available backends.
Random algorithm
The random algorithm selects backends randomly from the pool of healthy servers.
Each request has equal probability of routing to any healthy backend, regardless of current load or connection count.
This algorithm works well for homogeneous backend servers with similar capacity and response times.
Random selection provides simpler behavior than least connections but may create uneven load distribution. Backends can receive more or fewer requests than their fair share due to random variance. The distribution evens out over large numbers of requests.
Algorithm selection
Configure the load balancing algorithm using the --host-balance flag.
Set to least for connection-based routing or random for random selection.
The default value is least.
The least connections algorithm is appropriate for most deployments. Use random selection only when backend servers have identical capacity and the additional complexity of connection tracking provides no benefit.