You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tiago Semprebom <ti...@yahoo.com.br> on 2006/04/27 19:46:29 UTC

[users@httpd] intercept incoming requests in Apache Web Server

Hello,

I'm working with QoS (quality of service) and I'm using
the Apache web server to implement my QoS policy. For
that, basically I'll need to intercept all incoming
requests in Apache and after that, separate this
requests in different queues, according with their
priority. So, some questions:

1) - What Apache module or function is responsible
for receiving the incoming requests?

2) - Doesn't already exist some structure to
handle this requests or something like that?

Thank's in advanced for your help!

Tiago Semprebom
		
---------------------------------
 Abra sua conta no Yahoo! Mail - 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz. 

Re: [users@httpd] intercept incoming requests in Apache Web Server

Posted by Nick Kew <ni...@webthing.com>.
On Thursday 27 April 2006 19:15, Joshua Slive wrote:

> I'm not an expert in this topic, but what you want doesn't sound
> feasible.  In the Apache httpd architecture, threads or processes get
> to listen on the accept queue and grab new requests as they come in.
> If they read a request and decide it is low priority and they don't
> want to handle it, there is really no way for them to shove it back on
> the queue.  They are stuck with it and must either serve it or dump
> it.

Just to throw in a couple more thoughts ...

If you want to prioritise *only* by client address - without reference to the
HTTP request, you'd use a connection-level filter.  Take a look at traffic-
shaping modules such as mod_evasive or mod_cband.

If you're happy to affect the outcome of a request (c.f. mod_load_average, 
which enables you for example to service static requests normally but
return HTTP BUSY in response to expensive requests when the server load
is too high) you can write a simple module that implements early hooks
to inspect the request and determine its fate.

If neither of the above is sufficient, then I have nothing useful
to say, beyond the vague idea that a new MPM would probably
be the most likely approach.  Try the developer list.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] intercept incoming requests in Apache Web Server

Posted by Joshua Slive <jo...@slive.ca>.
On 4/27/06, Tiago Semprebom <ti...@yahoo.com.br> wrote:
> Hello,
>
> I'm working with QoS (quality of service) and I'm using
> the Apache web server to implement my QoS policy. For
> that, basically I'll need to intercept all incoming
> requests in Apache and after that, separate this
> requests in different queues, according with their
> priority. So, some questions:
>
> 1) - What Apache module or function is responsible
> for receiving the incoming requests?

You may want to look at some developer docs like:
http://www.apachetutor.org/dev/request

>
> 2) - Doesn't already exist some structure to
> handle this requests or something like that?

I'm not an expert in this topic, but what you want doesn't sound
feasible.  In the Apache httpd architecture, threads or processes get
to listen on the accept queue and grab new requests as they come in. 
If they read a request and decide it is low priority and they don't
want to handle it, there is really no way for them to shove it back on
the queue.  They are stuck with it and must either serve it or dump
it.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] intercept incoming requests in Apache Web Server

Posted by Kishore Jalleda <kj...@gmail.com>.
On 4/27/06, Tiago Semprebom <ti...@yahoo.com.br> wrote:
>
> Hello,
>
> I'm working with QoS (quality of service) and I'm using
> the Apache web server to implement my QoS policy. For
> that, basically I'll need to intercept all incoming
> requests in Apache and after that, separate this
> requests in different queues, according with their
> priority. So, some questions:
>
> 1) - What Apache module or function is responsible
> for receiving the incoming requests?
>
> 2) - Doesn't already exist some structure to
> handle this requests or something like that?
>
> Thank's in advanced for your help!
>
>
> Tiago Semprebom
>
>
>
> ________________________________
Abra sua conta no Yahoo! Mail - 1GB de espaço, alertas de e-mail no celular
e anti-spam realmente eficaz.
>
>
>


I am not really sure what kind of data  you want to capture from the
requests to apache, but if you want to log every packet that passes in and
out of apache then may be you could use Snort and you could also send all
this info into MySQL.

This setup may not give you the structured data you want. But you can give
it a shot

Just my $0.02

Kishore Jalleda
http://kjalleda.googlepages.com

Re: [users@httpd] intercept incoming requests in Apache Web Server

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Well, if you are using QoS you are using Windows, which means you want to
delve into mpm_winnt.c - the mpm flavor on that platform.  Much of the
networking there is raw windows api, as opposed to using apr.

If you want to be quite thorough, and are very familiar with QoS, there
has been some mumbling on the dev@apr list about implementing ToS flags
for unix.  It would be *VERY* nice if we could unify these into a single
API.  Once created, the accepted request -is- injected into an apr socket
object for further handling.

Bill

Tiago Semprebom wrote:
> Hello,
> 
> I'm working with QoS (quality of service) and I'm using
> the Apache web server to implement my QoS policy. For
> that, basically I'll need to intercept all incoming
> requests in Apache and after that, separate this
> requests in different queues, according with their
> priority. So, some questions:
> 
> 1) - What Apache module or function is responsible
> for receiving the incoming requests?
> 
> 2) - Doesn't already exist some structure to
> handle this requests or something like that?
> 
> Thank's in advanced for your help!
> 
> Tiago Semprebom
> 
> ------------------------------------------------------------------------
> Abra sua conta no Yahoo! Mail 
> <http://us.rd.yahoo.com/mail/br/tagline/mail/*http://br.info.mail.yahoo.com/> 
> - 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org