true load balancer

mike mike503 at
Thu Jul 24 11:44:47 MSD 2008

On 7/23/08, Tit Petric <black at> wrote:
> Currently, im going on the following assumptions:
> 1. Have a HTTP command for reporting load of backend servers
> 2. Have a HTTP command for moving a backend OFFLINE (for testing of load
> balancing mostly, but i can see this beeing useful for maintainance)
> 3. Have a HTTP command for moving a backend back ONLINE

yes, having it be HTTP commands with a configurable user/password
using http auth would be perfect and should minimize the amount of
hacking required for that piece since nginx is already listening on
the HTTP stream...

> A command for adding backends dynamically seems illogical (remember, this is
> all temporary data which is lost with a restart/reload). If you want to add
> a new backend, add it in the config.

This would be good enough for me.

> 4. Have a HTTP command for getting weight statistics (ie, load on all
> backend servers, weights on all backend servers, other) for monitoring
> (munin, ganglia, etc)

Reporting would be great... knowing the number of connections
currently active, maybe some average statistics, oh yeah - per Host:
header bandwidth stats would be great for me personally (wishlist...)

> I don't exactly know how we will invoke the real load balancer, but i
> suppose it will be with the 'real;' keyword, like the fair load balancing
> upstream wwwbackend {
>     real;
>     server earth     weight=20;
>     server wind     weight=20;
>     server water    weight=20;
>     server fire        weight=20;
> }

What is the difference between "real" and current? Not sure I get it.
Currently with nginx it will reproxy if it times out on one upstream
which is awesome, so it already has more features than normal load
balancers... it just doesn't have the capability to do healthchecking
or work with a healthchecking system right now. Hopefully we can
figure out a solution where people decide how they want to do their
own healthchecking and simply launch
http://localhost/nginx-config/earth/up or
http://localhost/nginx-config/earth/down or some other very simple
HTTP-request based thing. query strings or RESTful style... please
nothing heavy and stupid like SOAP :)

More information about the nginx mailing list