Simple go-written echo-server
- Simple load balancer server with hardcoded servers - DONE
- Implement simple "Round robin" algo - DONE
- Fetch server list from config - DONE
- Implement "Weighted Round robin" algo
- Implement algo switch functionality
- Implement server health checks with goroutines
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to install Golang and Docker to run this project.
Golang:
✗ go version
go version go1.15.6 darwin/amd64
Docker:
✗ docker -v
Docker version 20.10.7, build f0df350
- Clone the project and open in your favourite IDE.
- Install all needed dependencies via
go mod download
or via IDE tools. - Build Docker image by running
docker build . -t load-balancer
- Run main.go
- Run containerized
docker run -p 8080:8080 load-balancer
where8080
- default port