{Fetch,Decode,Execute & Share}
I am using a simple HTTP server written in Python which will runs on the port given by the commandline argument. The servers will act as upstream servers for this test. Three servers are started
on port 8080,8081 and 8081. Each server logs its port number when a request is received. Logs will be written to the log file located at var/log/loadtest.log. So by looking at the log file, we can identify how Nginx distribute incoming requests among the three upstream servers.
Below diagram shows how Nginx and upstream servers are destrubuted.
Below is the code for the simple HTTP server. This is a modification of [1].
Lets start the servers on port 8080, 8081 and 8081.
Check if the servers are running on the secified ports.
*Configure Nginx as a load balancer for above upstream server.
Create a configuration file in /etc/nginx/udara.com.conf with the below…
View original post 440 more words