Synopsis
Global Options
Listener Options
IP address to bind to
Port number to listen on (1-65535)
Backend Options
Backend server (format:
host:port or host:port:weight)Can be specified multiple times for multiple backends.Algorithm Options
Load balancing algorithmAvailable algorithms:
round-robin- Distribute evenly across backendsleast-connections- Route to backend with fewest connectionsip-hash- Consistent hashing based on client IPrandom- Random backend selectionweighted- Weighted round-robin distribution
Default weight for all backends (used with weighted algorithm)
Health Check Options
Disable health checking
Health check interval in milliseconds
Number of failures before marking backend unhealthy
Configuration File
Path to YAML or TOML configuration file
Advanced Options: Additional configuration options like logging, timeouts, max connections, and worker threads are available via config file only. See File Configuration for details.
Miscellaneous
Print version information
Print help information
Commands
start
Start the load balancer with specified configuration. Syntax:<ALGORITHM>- Load balancing algorithm<BACKENDS...>- Space-separated list of backend servers
--port, -p- Listen port (default: 8080)--weight- Default backend weight (default: 100)--no-health-check- Disable health checks
validate
Validate a configuration file without starting the load balancer. Syntax:--config, -c- Path to configuration file (required)
example
Print an example configuration file. Syntax:--format- Output format:yamlortoml(default: yaml)
info
Display information about available algorithms and features. Syntax:Usage Examples
Basic Usage
Advanced Usage
Docker Usage
Kubernetes Usage
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Configuration error |
| 2 | Runtime error |
| 3 | Invalid arguments |
| 130 | Interrupted (SIGINT/Ctrl+C) |
Signal Handling
| Signal | Behavior |
|---|---|
SIGINT (Ctrl+C) | Graceful shutdown |
SIGTERM | Graceful shutdown |
Tips & Tricks
Troubleshooting
Command not found
Command not found
Ensure UltraBalancer is installed and in your PATH:
Permission denied on port 80/443
Permission denied on port 80/443
Ports below 1024 require root privileges:
Config file not found
Config file not found
Ensure the config file exists and path is correct: