httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <>
Subject Re: clogging filters and async MPMs
Date Thu, 04 Feb 2010 20:04:04 GMT
On Thu, Feb 4, 2010 at 6:14 AM, Bryan McQuade <> wrote:
> Hi,
> I'm reading through the httpd code and I notice that async MPMs will fall
> back to sync mode in the presence of clogging input filters (at least I
> think I've got that right).
> I understand that mod_ssl is a clogging filter.

> What does it mean to be a "clogging filter"? How does this break async MPMs?

It means the filter buffers in such a way that it might have data
inside it, but a poll() on the socket will never return active when it
has data ready.  It also has to do with filters that change the
read/write flow -- we currently don't have a way for an output filter
for example to say "come back to me when there is data available to
READ".  This is specifically the mod_ssl problem, because of the SSL
protocol, you often need to do a write before you can read, or vice

> What would it take to make mod_ssl a non-clogging filter?

Basically needs two things:
1) Never buffer data inside ssl (feasible I believe)
2) Create a new way for a filter deep inside the chain to indicate we
need to wait for a read/write ability on a socket -- this
fundamentally is why a Serf bucket model is better than our chained
filters.  An alternative  approach would be changing the flow so
filters don't directly call the next filter, putting the core back in
control of filter flow, but this is still a non-trivial project.



View raw message