A production-ready HTTP/HTTPS load balancer with Round Robin, Weighted Round Robin, Health Checks, Sticky Sessions, TLS, and live JSON Metrics.
This load balancer is a self-hosted Go application — there's nothing running here to visit. It's designed to sit in front of your own servers and route traffic between them.
To run it, clone the repo, configure your backends in configs.json, and start it with the provided shell script. Full instructions are in the README.
View Setup Instructions ↗Evenly distributes requests across all healthy backends in sequence.
Nginx-style smooth algorithm — route proportionally more traffic to stronger backends.
Background goroutine probes each backend. Auto marks UP/DOWN on failure or recovery.
HttpOnly cookie pins a client to a backend, with configurable TTL and automatic expiry.
Drop-in TLS support. Point to your cert and key files and it just works.
Live per-backend request counts, error rates, and average latency via /metrics.
# Clone the repo git clone https://github.com/nianod/Custom-Load-Balancer.git cd Custom-Load-Balancer # Edit configs.json with your backend URLs nano configs.json # Build and run ./scripts/run.sh # Check all backends are healthy ./scripts/healthcheck.sh # View live metrics ./scripts/metrics.sh http://localhost:8080