<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&#39;t know whether the performance is enough.<br><br>&nbsp;</div>
<div><span class="gmail_quote">2008/7/24, mike &lt;<a href="mailto:mike503@gmail.com">mike503@gmail.com</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">sorry not &quot;monitor that file&quot; 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&#39;s updated<br><br>On 7/23/08, mike &lt;<a href="mailto:mike503@gmail.com">mike503@gmail.com</a>&gt; wrote:<br>&gt; yeah you could have an<br>&gt;<br>&gt; include &#39;upstreams.conf&#39;;<br>&gt;<br>&gt; and some external process monitor that file, and then send a HUP or<br>
&gt; whatever the appropriate process signal to nginx is, but that seems a<br>&gt; little messy. it would be nice if nginx had support built-in for the<br>&gt; most graceful recovery/best user experience when an upstream dies<br>
&gt; (maybe it already does, i am just speculating)<br>&gt;<br>&gt;<br>&gt; On 7/23/08, Istvan Szukacs &lt;<a href="mailto:leccine@gmail.com">leccine@gmail.com</a>&gt; wrote:<br>&gt; &gt; but if you store the upstreams in memory(very simple structure) after the<br>
&gt; &gt; nginx restart, and remove the dead one(might be dead for some reason)...<br>&gt; &gt;<br>&gt; &gt; monitoring should be configurable, what parameter and what value...<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; mike wrote:<br>
&gt; &gt; &gt; for this to happen i believe<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; a) there needs to be a way to dynamically add/remove upstreams (or at<br>&gt; &gt; &gt; least mark them active/inactive) from an external call to nginx daemon<br>
&gt; &gt; &gt;<br>&gt; &gt; &gt; b) monitoring has to be there, which could be built in, or could be an<br>&gt; &gt; &gt; external process. personally i&#39;d be happy with an external monitoring<br>&gt; &gt; &gt; thing like ldirectord (some sort of healthchecking script) that upon<br>
&gt; &gt; &gt; noticing a server being down tells nginx &quot;stop this upstream&quot; etc.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; On 7/23/08, Almir Karic &lt;<a href="mailto:almir@kiberpipa.org">almir@kiberpipa.org</a>&gt; wrote:<br>
&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; i&#39;m kinda interested in implementing a true load balancer functionality<br>&gt; &gt; &gt; &gt; in nginx, my idea is to extend the upstream module so that it would be<br>
&gt; &gt; &gt; &gt; able to dynamically modify the configuration of servers (such as mark<br>&gt; &gt; &gt; &gt; them down or change the weight) i see two possible ways:<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; - controlling socket over which you would feed the commands<br>
&gt; &gt; &gt; &gt; - UPSTREAM method (similar to ncache&#39;s PURGE), the advantages of this<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;being easier control of configuration file and no need for a dedicated<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;thread to listen on the socket<br>
&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; the idea is to implement just the controling protocol in nginx, it would<br>&gt; &gt; &gt; &gt; require some controling daemon/script to actually do anything useful.<br>
&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; thoughts? advices?<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; also any chance of this kind of code making it to official nginx?<br>&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; --<br>&gt; &gt; &gt; &gt; vi vi vi -- the number fo the beast<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>
&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br><br></blockquote></div><br>