Re: In-kernel http server

From: Gordon Tetlow <gordont_at_gnf.org>
Date: Fri, 2 May 2003 10:58:17 -0700
On Fri, May 02, 2003 at 10:20:42AM -0300, Daniel C. Sobral wrote:
> Niall Dalton wrote:
> >On Thu, 2003-05-01 at 14:43, Daniel C. Sobral wrote:
> >
> >>Supposedly, most of the gain of a kernel-based httpd can be achieved 
> >>through accept filters (specifically, of course, the accept_http filter).
> >
> >
> >You mean simply compiling the accept_http filter into the
> >kernel and running a standard web server is it? Has this
> >been benchmarked? A google search didn't throw up much for
> >me on this.
> 
> AFAIK, the application has to select the accept filter:
> 
> An accept filter is requested via the setsockopt(2) system call, passing 
> in an optname of SO_ACCEPTFILTER. (that's from accept_filter(9))

Apache understands accept filters iirc. So as long as you have them in
your kernel (I believe you can load them from loader.conf but not from
the commandline), it should help speed things up. We used these at
Blue Mountain. The instance that you'll find they help alot is when you
are getting a very large request from the user (ie, there is alot of
cookie data to be passed back and forth).

Basically what the accept filter does is not pass the HTTP request
from the kernel to the userland application until a '\n\n' is
encountered. This is incredibly helpful if you have a slow client
talking to your server.

-gordon

Received on Fri May 02 2003 - 08:58:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:05 UTC