This is a very simple load balancer with Vagrant + NGINX + Tornado + MySQL
- Clone this repository into some folder
- Open console, go to this folder and type
vagrant up
After that you need to SSH every machine and:
- In console:
cd /vagrant
- Then run
python main.py
to start the tornado server - Type
exit
to leave SSH
So you can access from 192.168.50.5
and the load balancer will be working! ;)
The machines balanced is on ip range 192.168.50.{1,3}0
.
The MySQL machine is serving on ip 192.168.50.100
with one database called app_db
, user remoto
and password 123
.