Skip to content

EderRoger/nginx_loadbalancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nginx_loadbalancer

Vagrant provisioning with puppet creating 4(servers) to testing nginx upstream load balacing

Inner project example https://github.com/EderRoger/AngularMongo

Install Vagrant

add the box

vagrant box add hashicorp/precise32 http://files.vagrantup.com/precise32.box

configure AngularMongo App environment to load on vagrant machines

cd AngularMongo

sudo npm install

bower install

vagrant up

#Config mongo replicasets

vagrant ssh db
mongo
rs.initiate()
rs.conf()
rs.add("mongo1.replica.com")
rs.add("mongo2.replica.com")

#Open the shell 1: vagrant ssh server1

cd /vagrant/AngularMongo

npm start

#Open the shell 2: vagrant ssh server2

cd /vagrant/AngularMongo

npm start

#Open the shell 3: vagrant ssh server3

cd /vagrant/AngularMongo

npm start

Open your web browser and access: http://192.168.33.13/app/#/people or
open the shell and execute benchmark testing. The following code execute 500 requests try it :) and look the servers responding:

ab -c 40 -n 500 http://192.168.33.13/

Look each terminal and see loadbalancing in action.

alt tag

#Replica set terminal:

alt tag

About

Vagrant provisioning with puppet creating 4(servers) to testing nginx upstream load balacing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors