A lightweight, high-performance load balancer written in Go
Orbit-Go is a simple, fast, and extensible load balancer built with Go. It is designed to efficiently distribute traffic across multiple backend services while remaining easy to configure and deploy.
- High-performance load balancing using Go’s concurrency model
- Multiple load balancing strategies (round-robin, least-connections, iphash, weighted-round-robin etc.)
- Health checks for backend services
- Configurable via file or environment variables
- Minimal dependencies and small binary size
The following diagram illustrates the high-level architecture of Orbit-Go.
- Install Go (version >= 1.23.3): https://golang.org/dl/
- Task https://taskfile.dev/
- API Testing Tool Httpie or Yaak
git clone https://github.com/saketv8/orbit-go.git
cd orbit-go
# install dependencies
go mod download
go build -o orbit-goin one terminal
cd examples
# start the example backend
task run-alland then in another terminal
# start the main orbit-go server
./orbit-goOrbit can be configured using a configuration config.yaml
Example config.yaml
# config for orbit-go
application:
name: orbit-go
version: v0.0.1
# orbit-go server config
server:
port: 8000
# available strategies - roundrobin(rr), leastconnection, iphash, weighted-roundrobin (wrr), random
strategy: "roundrobin"
# available backend
backends:
- url: "http://localhost:8081"
weight: 1
- url: "http://localhost:8082"
weight: 3
- url: "http://localhost:8083"
- url: "http://localhost:8084"
health_check:
interval: 5s
timeout: 100sThis project was created to learn Golang and how HTTP works in Go, while applying Go best practices to write scalable, idiomatic code using goroutines, with a focus on networking fundamentals at the OSI Layer 7 level
- support config.yaml
- Support multiple load balancing strategies
- IP hash strategy based on cookies
- Health checker for backend services
- Add and remove backends at runtime without restarting Orbit
- Graceful shutdown of load balancing server
- Admin panel (Web UI) — 50% complete (in progress)
- Prometheus metrics
- Improved error handling and retries
- Configuration hot-reload

