httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan McQuade <>
Subject Re: Working on mod_spdy, looking for contributions and feedback
Date Fri, 12 Feb 2010 14:36:33 GMT
Thanks Graham,

We're interested in adding multiplexing support in 2.3/2.4.

In order to be compatible with existing content generators, it seems
that each multiplexed request would need to run in its own thread (as
opposed to an async model) since so many of the existing content
generators don't support async content generation (as far as I am
aware). Given this, processing multiple concurrent requests from the
same connection would break the ap_mpm contract (1:1 mapping from
connections to threads). The best way I can think of to maintain this
requirement is to create new "fake" conn_rec structs (similar to what
I described in my writeup) for each concurrent request, where the new
conn_recs don't pull from the socket but instead pull from thread-safe
queues. The "main" connection thread with the real conn_rec struct
dispatches requests to one of these fake conn_recs's queues, and
processing for that fake conn_rec would happen in its own thread. I'm
not sure if the existing 2.2/2.3 codebases would support this cleanly.
Perhaps we could make the necessary changes in the 2.3 branch to
support this.

The other option would be to go the async route, where multiple
concurrent requests can be at flight at any one time, but only one of
those requests is being actively processed on the connection's thread.
This is a nicer model (no fake conn_recs) and might actually fit well
with the existing event/simple MPMs, but the application of such an
approach is pretty limited at the moment due to the fact that most
(all?) content generators that exist today are synchronous.

Looking forward, is it likely that popular content generators will
move to an async model? If so, the async multiplex approach sounds
appealing. Otherwise, based on my (admittedly limited) knowledge of
Apache, I'm inclined to pursue the multi-threaded approach using fake

Which of the above do you think is a better route to pursue? Are there
other good options that I haven't considered? Who else working on
Apache 2.3/2.4 should I talk to about making these kinds of changes
for 2.4?


On Thu, Feb 11, 2010 at 7:38 PM, Graham Leggett <> wrote:
> On 11 Feb 2010, at 8:52 PM, Bryan McQuade wrote:
>> We've written up a document describing our current ideas for
>> multiplexing here:
>> but we could
>> really use feedback from Apache developers on the best way to go about
>> this.
> What's been written so far is very sensible, I suspect realistically
> teaching httpd v2.2 to do multiplexed requests is a tall order, but httpd
> v2.4 is not yet cast in stone, so the easiest route I think would be to
> focus efforts there.
> Alpha versions of httpd v2.3, which are set to become httpd v2.4 have been
> released, so httpd v2.4 is a "real soon now".
> Regards,
> Graham
> --

View raw message