This project implements a plug-and-play load balancer, in GoLang. The setup consists of a master node, that receives requests, and a set of slave nodes, that can execute the requests. The master node allocated tasks to slave nodes depending on the expected load of the task and the current load of each slave, using a load balancing algorithm. A few simple load balancing algorithms have been implemented in this project.
The entire setup is plug-and-play, where slaves can enter and leave at any time. No intervention is needed to add a new slave to the pool of slaves, or to handle tasks left incomplete by disconnected slaves. The load balancer is tested using each algorithm on a few simple tasks. The effectiveness of load balancing is monitored using Prometheus and visualized using Grafana.