A sample implementation how the internals of a load balancer looks like. Inspired from the reverseproxy logic of the Go standard library.
PS: This is not a production-ready load balancer, but rather a learning project to understand how load balancing works.
- Clone the repository:
https://github.com/akp111/lodbal.git
cd loadbal
- Install the dependencies:
go mod tidy
- Start the backend servers:
./start_dummy_servers.sh
- Run the load balancer:
go run main.go
- Test the load balancer:
curl -v http://localhost:8080