Networking & bounded systems
RustLB
Rust, Tokio and Hyper power a small HTTP/1.1 proxy. The design question is how to distribute requests without letting slow clients, unhealthy backends or overload consume unbounded capacity.
Choosing a backend
Routing supports round-robin and least-connections strategies. Least-connections tracks active proxied requests through response-body ownership rather than counting idle pooled sockets. Active health probes use success and failure thresholds; a backend starts ineligible until checks establish health.
Bound the work
Client connection limits and fail-fast request admission bound concurrency. Request and response bodies have separate size limits. Deadlines cover upload and upstream work, while a separate connection lifetime bounds slow client response writes. Buffering keeps the implementation compact but makes memory use depend on both body limits and active requests.
Make failures observable
The proxy returns distinct responses for unavailable backends, upstream transport errors, deadlines and oversized requests. A separate operations listener exposes liveness, readiness and Prometheus metrics. Graceful shutdown drains active work within a finite budget instead of waiting indefinitely.
What has been checked
Local regression coverage includes real loopback forwarding, slow requests, least-connections routing around active work, health failure/recovery, released capacity after deadlines and graceful drain. Benchmark tooling retains workload and environment records alongside an NGINX comparison. This page makes no throughput or latency claim: shared-host variability and unfinished follow-up experiments need their own context.
Current boundary
This is a local HTTP/1.1 implementation, not a public edge service. Source remains private; there is no public repository or live proxy linked here. A public description of the design does not expose private implementation files or establish production use.