<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Currently, im going on the following assumptions:<br>
<br>
1. Have a HTTP command for reporting load of backend servers<br>
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)<br>
3. Have a HTTP command for moving a backend back ONLINE<br>
<br>
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.<br>
<br>
Does anyone (except maybe google or something) have such a dynamic
pool, that you would want to add new servers dynamically on run-time?
Anyone need this?<br>
<br>
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)<br>
<br>
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<br>
<br>
upstream wwwbackend {<br>
real;<br>
server earth weight=20;<br>
server wind weight=20;<br>
server water weight=20;<br>
server fire weight=20;<br>
}<br>
<br>
Weights take a default value, but will be adjusted depending on the
load responses from backend servers.<br>
<br>
Discuss.<br>
<br>
Delta Yeh wrote:
<blockquote
cite="mid:beffb2170807232210h7558f82cx5b699ac18b24926d@mail.gmail.com"
type="cite">
<div>how about store the backend server in memchached.</div>
<div>so 3rdhparty tool can update the server status for nginx.</div>
<div>But I don't know whether the performance is enough.<br>
<br>
</div>
<div><span class="gmail_quote">2008/7/24, mike <<a
moz-do-not-send="true" href="mailto:mike503@gmail.com">mike503@gmail.com</a>>:</span>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">sorry
not "monitor that file" but MANAGE that file.<br>
<br>
as in, keep a list of upstreams, and update the file, send HUP/etc to<br>
nginx after it's updated<br>
<br>
On 7/23/08, mike <<a moz-do-not-send="true"
href="mailto:mike503@gmail.com">mike503@gmail.com</a>> wrote:<br>
> yeah you could have an<br>
><br>
> include 'upstreams.conf';<br>
><br>
> and some external process monitor that file, and then send a HUP or<br>
> whatever the appropriate process signal to nginx is, but that
seems a<br>
> little messy. it would be nice if nginx had support built-in for
the<br>
> most graceful recovery/best user experience when an upstream dies<br>
> (maybe it already does, i am just speculating)<br>
><br>
><br>
> On 7/23/08, Istvan Szukacs <<a moz-do-not-send="true"
href="mailto:leccine@gmail.com">leccine@gmail.com</a>> wrote:<br>
> > but if you store the upstreams in memory(very simple
structure) after the<br>
> > nginx restart, and remove the dead one(might be dead for some
reason)...<br>
> ><br>
> > monitoring should be configurable, what parameter and what
value...<br>
> ><br>
> ><br>
> > mike wrote:<br>
> > > for this to happen i believe<br>
> > ><br>
> > > a) there needs to be a way to dynamically add/remove
upstreams (or at<br>
> > > least mark them active/inactive) from an external call
to nginx daemon<br>
> > ><br>
> > > b) monitoring has to be there, which could be built in,
or could be an<br>
> > > external process. personally i'd be happy with an
external monitoring<br>
> > > thing like ldirectord (some sort of healthchecking
script) that upon<br>
> > > noticing a server being down tells nginx "stop this
upstream" etc.<br>
> > ><br>
> > ><br>
> > ><br>
> > > On 7/23/08, Almir Karic <<a moz-do-not-send="true"
href="mailto:almir@kiberpipa.org">almir@kiberpipa.org</a>> wrote:<br>
> > ><br>
> > ><br>
> > > > i'm kinda interested in implementing a true load
balancer functionality<br>
> > > > in nginx, my idea is to extend the upstream module
so that it would be<br>
> > > > able to dynamically modify the configuration of
servers (such as mark<br>
> > > > them down or change the weight) i see two possible
ways:<br>
> > > ><br>
> > > > - controlling socket over which you would feed the
commands<br>
> > > > - UPSTREAM method (similar to ncache's PURGE), the
advantages of this<br>
> > > > being easier control of configuration file and no
need for a dedicated<br>
> > > > thread to listen on the socket<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > the idea is to implement just the controling
protocol in nginx, it would<br>
> > > > require some controling daemon/script to actually
do anything useful.<br>
> > > ><br>
> > > ><br>
> > > > thoughts? advices?<br>
> > > ><br>
> > > > also any chance of this kind of code making it to
official nginx?<br>
> > > ><br>
> > > > --<br>
> > > > vi vi vi -- the number fo the beast<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > ><br>
> > ><br>
> > ><br>
> ><br>
> ><br>
> ><br>
><br>
<br>
</blockquote>
</div>
<br>
</blockquote>
</body>
</html>