Skip to content

rvoitenko/vagrant-multi-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vagrant-multi-cluster

================= Demo illustrating vagrant+ansible setup of nginx load balancer and desired number of web nodes behind it.

Please edit variable NODE_COUNT in Vagrantfile before run if you need more than 3 web nodes(default vale). Then run:

vagrant up
....
....
==> lb: Balancer status url is http://192.168.50.10/status

Private IP(192.168.50.10) of load balancer is hardcoded, but can be also changed in case of conflict with local network.

There is a test script for load balancer:

./testlb.sh -h 192.168.50.10 -n 1000
Sending 1000 requests to http://192.168.50.10/...
node1:      332
node2:      334
node3:      334

As bonus I've added nginx real-time statistic for upstream status(almost like in haproxy):

http://192.168.50.10/status

To change the cluster size edit the NODE_COUNT Vagrantfile and run

vagrant up
vagrant provision

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published