How It Works
Core Components
Request Flow
- Client sends request to UltraBalancer
- Rate limiting check (if enabled)
- Select backend using algorithm
- Proxy request to backend
- Stream response back to client
- Record metrics
Algorithms
- Round Robin - Equal distribution
- Least Connections - Fewest active connections
- IP Hash - Consistent client-to-backend mapping
- Weighted - Based on backend weight
- Random - Random selection
- Power of Two - Pick 2, use least loaded
- Fastest Response - Lowest latency backend
Data Flow
Tech Stack
- Runtime: Tokio (async)
- HTTP: Hyper
- TLS: Rustls
- Serialization: Serde
Related
- Algorithms - Selection strategies
- Health Checks - Backend monitoring
- Metrics - Observability