On Thu, Feb 4, 2010 at 6:14 AM, Bryan McQuade <bmcqu...@google.com> 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.

Yep
> 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
versa.

> 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.

HTH,

Paul

Reply via email to