Problem Statement
A Fault tolerant load balancer that takes a configurable YAML file and redirects incoming HTTP requests to the appropriate server instance using predefined load balancing strategy.
Features
> Easily configurable using a YAML file
> Extensible Load Balancing Strategies
> Fault tolerant: Requests automatically get redirected to another instance if an instance is down
> Healthcheck UI to monitor status of servers
Tech Stack
Golang
Source Code
Key Steps/Algorithms
> Each request is made to loadbalancer running on localhost:8080/api/v1
> Request path (api/v1) is looked up to find the service it is mapped to
> All the server replicas of this service are looked up
> Load Balancing Strategies for this Service is looked up. Defaults to Round Robin
> Request is forwarded to one of these replicas using the LB strategy
Sample YAML Config File

You may also like

Back to Top