Building a loadbalancer from scratch. DO NOT use this in production :P (just in case)
Start multiple instances of server.py
# create a virtual env (optional)
virtualenv env
source env/bin/activate
# install flask
pip install flask
# spawn multiple servers
for i in {1..5}; do python server.py "server-$i" "500$i" &; done
Start the loadbalancer
go run loadbalancer.go
Bombard the loadbalancer with requests
for i in {1..20}; do curl 127.0.0.1:8000; done
To kill all the instances of the servers
pkill -9 python