Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 812 Bytes

readme.md

File metadata and controls

37 lines (30 loc) · 812 Bytes

load-balancer

a load balancer service written in Go

  • provides load balancing across multiple backend services using
    • round robin
    • least connected algorithm
  • configurable through a config file

usage

configuration

The load balancer is configured via a config.yaml file:

lb_port: 8005
strategy: round-robin
backends:
  - "http://localhost:8001"
  - "http://localhost:8002"
  - "http://localhost:8003"
  - "http://localhost:8004"
health_check_interval_in_sec: 30
max_retries: 5

running

go run main.go

sample backend service

a sample backend service has been provided in be-service with its own docker-compose to bring up multiple servies