You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Alan Gutierrez <al...@blogometer.com> on 2006/02/06 15:06:42 UTC

mod_proxy buffering small chunks

I'd like to use mod_proxy to proxy a stock ticker that sends stock
quotes using Transfer-Enconding: chunked. The chunks are much
smaller than 8k. 

mod_proxy buffers the results of the stock ticker until the buffer
recieved 8k. This delay defeats the desired push effect of the ticker.

There is a bug open on this issue...

    http://issues.apache.org/bugzilla/show_bug.cgi?id=37514

The proposed solution is to poll for chunks using non-blocking I/O.
When the socket returns EAGAIN, the 8K buffer is flushed, and the
socket is read with blocking I/O.

However, in the http code, regardless of the block mode flag, the
headers are read using blocking I/O. Furthermore, somewhere deeper
in the chain, when EAGAIN is detected the success flag is returned
instead. I'll provide more detail, if this is not already well known.

Looks like this is going to be messy to fix. Any patches?

I'm wondering if it wouldn't be easier, for now, to tell mod_proxy
to proxy chunks as is? Is there another module that can tunnel a
chunked encoding request?

--
Alan Gutierrez - 504 717 1428 - alan@blogometer.com - http://blogometer.com/