<div dir="ltr"><br><div class="gmail_quote">On Tue, Jun 9, 2009 at 2:21 PM, Amos Shapira <span dir="ltr"><<a href="mailto:amos.shapira@gmail.com">amos.shapira@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2009/6/9 shimi <<a href="mailto:linux-il@shimi.net">linux-il@shimi.net</a>>:<br>
<div class="im">> At what layer do you define "dropping a request" ? Not accepting a TCP<br>
> connection (4) ? Failure to complete the request from the reverse proxy to<br>
> the backend servers (HTTP error) (assuming you have backend servers - the<br>
> network structure is not obvious from your original message)?<br>
<br>
</div>We use Linux Virtual Server (LVS) in DR mode (i.e. packets come in to<br>
a virtual IP through the LVS, outgoing replies are sent directly from<br>
the Real Servers) in load-balancing (i.e. multiple servers accept and<br>
handle requests in parallel).<br>
<br>
Some of the Real Servers are configured as "persistent", i.e. all<br>
requests from same client within a two-minute period will be handled<br>
by the same Real Server, due to functional requirements, others don't<br>
have this requirement.<br>
<div class="im"><br>
><br>
> What answers the TCP requests to port 80?<br>
<br>
</div>All requests are handled by Apache 2.2 modules written in C++.<br>
<div class="im"><br>
><br>
> Do you use efficient HTTP handlers already, e.g. Lighttpd or even better,<br>
> nginx? :)<br>
<br>
</div>We looked at it (lighttpd) and back then didn't see a justification to<br>
make the switch (already had in-house knowledge to write Apache<br>
modules vs. another learning period to take with lighttpd, plus<br>
Apache's flexibility back when we didn't know what we'll need was a<br>
factor, e.g. we also had php, perl and CGI code running around at the<br>
beginning).<br>
<br>
As far as we can tell the bulk of the load is inside our own<br>
home-grown module, not inside Apache.<br>
<br>
What I'd like to know is how many failed connections clients receive,<br>
be it "connection refused" or time outs.<br></blockquote><div> </div></div>Look,<br><br>Basically, if your HTTP connection handler handles many connections well - your module (backend) processing would become the bottleneck. That's how it usually happens. So if you wrap the requests by a frontend proxy (again, I recommend nginx) - and just put an error log for the relevant vhosts there, every time nginx cannot pass a request to backend processing, would be logged. Then you only need to look at the log, and that's it!<br>
<br>-- Shimi<br></div>