httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject Re: mod_proxy vs. serverpush
Date Thu, 05 Jan 2006 20:04:14 GMT
Matthias Behrens wrote:

> i am running a cgi-serverfarm behind an apache webserver with mod_rewrite / mod_proxy
> one cgi is supposed to send a progress bar using serverpush 
> everytime the programm completes 5% of its work, it sends further html-code which lets
the bar grow
> u can all test this by going to 
> just type some it-skills in the form and press send. you have to write some unusual combinations
or choose older data to prevent the programms cachefunction sending an immediate reply.
> as you can see the bar is completed only in very big steps. but actually every imagepart
of the bar is sended seperately. some internal cache in the mod_proxy module prevents the
results from beeing sended until (i guess) 8192 bytes are reached. i allready added 1024 spaces
to every package to make it go a little more smooth but this is unacceptable for people with
low bandwith.

This is an interesting problem, but definitely worth looking into fixing.

The 8k buffer is correct, proxy tries to read up to 8k at a time, and 
then after receiving a full 8k, it sends that 8k down the filter stack, 
over the network to the browser.

I think the root of the problem is that there is no way (or maybe there 
is and I don't know how to do it yet) to say to the input filter stack 
"give me what you got up to a maximum of 8k". If 10 bytes had arrived, 
then 10 bytes would be returned, and the next read would block waiting 
for the next piece to arrive.

The downside of this approach is that if a backend server wrote one byte 
at a time to the filter stack, then the proxy would write out chunks 
containing one byte per chunk, resulting in a large multiplication of 
bandwidth. Perhaps making this configurable would be the answer.


View raw message