How It Works
Core Components
| Component | Description |
|---|---|
| Proxy Server | Accepts requests, routes to backends |
| Load Balancer | Algorithm for backend selection |
| Backend Pool | Manages server list and health |
| Health Checker | Monitors backend availability |
| Metrics | Tracks performance data |
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