Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

How do I prove to myself that the least_conn directive is working as an HTTP load balancing mechanism?

$
0
0
I have configured a reverse proxy with Nginx. One Nginx instance distributes to three other Nginx web servers. I have used the proxy_pass directive and the least_conn directive. If I go directly to one of the servers that the reverse proxy distributes to (and bypass the reverse proxy), this does not seem to count as an active connection. Or I did not correctly implement the "least_conn;" directive correctly.

I am using the free version of Nginx. How long does the connection last? Is it just the download process? The web pages are just the default .html page. I want to test the least_conn; directive. So far I have seen no evidence that it is working. I have written a script to download the landing page several times. I configured one of the three servers to have a very big html page while keeping the others the same. This way download it takes time. The script downloading the landing page does not seem to be the equivalent of a connection. I have taken down one or two Nginx web servers. It seems like only round robin distribution is working.

How can I prove to myself that the least_conn directive is working with Nginx being a reverse proxy and an HTTP load balancer?

Viewing all articles
Browse latest Browse all 4759

Trending Articles