How kasvith/simplelb works
SimpleLB is a small Go reverse-proxy load balancer. The operator supplies backend URLs and a listening port; incoming HTTP requests are routed to an active backend using round robin, with proxy retries and backend removal after repeated failures. A periodic health check updates backend availability. These responsibilities are implemented together in main.go, so component paths are shared. The sampled source shows TCP-based health checks; the README describes the availability behavior at a high level.
Main entry points: main.go Startup and configuration
Components 10
Startup
- Startup and configuration
main.go - HTTP listener
main.go
Request routing
- Request handler
main.go - Backend pool
main.go - Reverse proxy and retries
main.go
Backend health
- Health scheduler
main.go - Health checker
main.go
Other components
- Operator
- HTTP client
- Backend servers
Connections 14
- Operator → Startup and configuration: configures
README.md - Startup and configuration → Backend pool: registers backends
main.go - Startup and configuration → HTTP listener: starts
main.go - HTTP client → HTTP listener: sends requests
main.go - HTTP listener → Request handler: dispatches
main.go - Request handler → Backend pool: selects peer
main.go - Request handler → Reverse proxy and retries: serves request
main.go - Reverse proxy and retries → Backend servers: proxies requests
main.go - Reverse proxy and retries → Backend pool: marks failed peer
main.go - Reverse proxy and retries → Request handler: retries routing
main.go - Startup and configuration → Health scheduler: starts
main.go - Health scheduler → Health checker: runs periodically
main.go - Health checker → Backend servers: checks TCP reachability
main.go - Health checker → Backend pool: updates status
main.go