This project implements a lightweight load balancer written in Go Lang. It supports distributing incoming HTTP and WebSocket traffic across multiple backend servers.
- HTTP and WebSocket Support: Handles both HTTP requests and WebSocket connections.
- Load Balancing Algorithm: Currently supports a configurable load balancing algorithm (default: round robin).
- Health Checks: Monitors the health of backend servers and removes unhealthy ones from the pool. (Nice to be have)
- Configuration: Configuration options for load balancing algorithm, health check intervals, and backend server addresses.
- Git
- Make
- Go 1.22.3 or later (https://go.dev/doc/install)
git clone [email protected]:groschovskiy/sre-interview-task-web3.git
cd sre-interview-task-web3
go mod tidy
go build -o cloud-lb ./cmd/main.go
./cloud-lb -config config.json
cd scripts
docker-compose up -d
Main applications for this project.
Scripts to perform various build, install, analysis, etc operations. For a seamless testing experience, consider leveraging the docker-compose.yaml
file, which provides an additional layer of flexibility and ease-of-use for testing your backend services.
Private application and library code.
Configuration file templates or default configs.