Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 May 2003 10:58:17 -0700
From:      Gordon Tetlow <gordont@gnf.org>
To:        "Daniel C. Sobral" <dcs@tcoip.com.br>
Cc:        freebsd-current@freebsd.org
Subject:   Re: In-kernel http server
Message-ID:  <20030502175817.GV14221@roark.gnf.org>
In-Reply-To: <3EB270AA.9000904@tcoip.com.br>
References:  <1051793484.2200.112.camel@localhost> <3EB12490.4000500@newsguy.com> <1051797636.2209.142.camel@localhost> <3EB270AA.9000904@tcoip.com.br>

next in thread | previous in thread | raw e-mail | index | archive | help

--ui+0LsrIBWBNb/ay
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
> >>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.
>=20
> AFAIK, the application has to select the accept filter:
>=20
> An accept filter is requested via the setsockopt(2) system call, passing=
=20
> 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

--ui+0LsrIBWBNb/ay
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+srG5Ru2t9DV9ZfsRAjn6AKDA1cMPlDCzn8mIsxeMzE64CN2TkwCfUufd
Wx7b07yS7cJxf6GPe71FN/s=
=fWXk
-----END PGP SIGNATURE-----

--ui+0LsrIBWBNb/ay--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030502175817.GV14221>