verifying that load balancing really works

B.R. reallfqq-nginx at yahoo.fr
Sun Jan 11 14:06:07 UTC 2015


You can tweak the access log entries with log_format
<http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format> to
include the upstream server, so you will know which upstream(s) each
request got served by.

As a manual, simple, test case, I would create a specific, testing location
on each of the upstream serving information uniquely identifying them. See
the return
<http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return>
directive to simply send some basic HTTP codes and attached messages.
Refreshing your browser (or using an automated crawler hitting your
front-end for testing purpose) will give you those answers to check how
requests are being balanced.
---
*B. R.*

On Sun, Jan 11, 2015 at 12:23 PM, ST <smntov at gmail.com> wrote:

> Hi,
>
> how can I verify that load balancing really works? I have 2 servers with
> nginx, one of them functions as a LoadBalancer and redirects requests
> either on itself or on the other server(by default round-robin). When I
> look on the traffic using jnettop it looks like both servers are
> loaded(while the LB is loaded more), but if I check traffic statistics
> with my server provider I see that the LB server shows ca. 233Gb while
> the other server only 0.012Gb in the same period. What is the rigth way
> to verify it?
>
> Thank you.
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150111/0a10b6e5/attachment.html>


More information about the nginx mailing list