You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by nitin <ni...@pn2.vsnl.net.in> on 1998/09/28 19:17:33 UTC

help needed

sir,
 i am final year Computer Science (grad.) student. I am working on 
 scheduling distributed web servers' using apache as the web server. i
 need to add some code to the server so that i have some sort of
 communication between the dns and the web server eg. web server can
 notify the dns that it  is overloaded or busy . 
i have apache web server's code from latest pc quest cd,but it's very long and it will take days to understand it.
can u please help me and atleast tell me the type of data structures i would require in the modules so that web server (apache) can communicate with dns. if possible just guide me from where i can undestand the working of apache web server(code).i have only a day left with me.

waiting anxiously
nitin


Re: help needed

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Take a look in http_protocol.c in routine ap_send_error_response().
That's the best clew I can give you off the top of my head.

#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

Re: help needed

Posted by Dirk-Willem van Gulik <di...@jrc.it>.
On Mon, 28 Sep 1998, nitin wrote:

>  i am final year Computer Science (grad.) student. I am working on 
>  scheduling distributed web servers' using apache as the web server. i
>  need to add some code to the server so that i have some sort of
>  communication between the dns and the web server eg. web server can
>  notify the dns that it is overloaded or busy . 

Well I guess  it boils down to one thing; getting an idea of the load
of the servers 'live'. You could do this with a simple uptime, 'ps' or
'top' like construct. See also the RPC example on sun's for a nice
RPC based way of getting those values. Alhtough an overall metric would
propably good enough, you could also interact with the web service side
more directly..

Well, one thing you could look at is the status module, see mod_status
and documentation. Which will give you information (by doing a simple
regular GET) about what is going on on a per-child basis.

A more scalable way might be using an SNMP request, contact
harrie.hazewinkel@jrc.it for more details, or fetch the module
from modules.apache.org. SNMP can give you a very accurate and
acute picture, for little (network) cost. Keeping the instrumentation
running of course consumes a fair bit of resources.

With these live metrics one can then modify DNS, though there are
lots of examples on the web this is one I like:

	http://www-leland.stanford.edu/~schemers/docs/lbnamed/lbnamed.html

When doing this, and still not having gotten it right, we found that a
gateway/fanout system works better (the fashionable word for such a
gateway seems to be 'remote proxy'. Juk), than DNS for quickly fluctuating
load, but that the first is harder to manage than the latter; as (most of)
our load metric's have a slight delay. The phase shift, in an H/G diagram
sort of thing, causes an instability which is hard to control. We are
currently experimenting with a PID (as in proportional/Integrating
Differential) controller for the feedback loop. This should in theory make
things more stable, even if your beta-tau is high. But it is not getting
anywhere near production yet.

Dw.