httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject [Patch] 1.3 proxy fix for lingering backend
Date Wed, 20 Feb 2002 21:45:30 GMT
Hi all,

The attached patch addresses a problem with proxy v1.3, and its handling
of slow frontends accessing expensive backends.

Currently proxy waits until the frontend client has "eaten up" all the
bytes before closing the backend connection. This causes an unnecessary
delay and chewing of resources when the frontend client takes its time
eating the bytes.

In addition, proxy reads from the backend in hardcoded chunks of 8k in
size. If this figure was larger, proxy would be able to read larger
files in one go - and thus close the backend completely before sending
this larger data block to the frontend.

This patch adds a check in ap_proxy_send_fb() which closes the backend
connection the moment it senses that all the data has been read - but
before attempting to send this final block to the client. This should in
theory solve the problem of the backend lingering around after the
request is finished.

In addition, the size of the proxy in-transit buffer is now set to the
size of the ProxyReceiveBufferSize parameter, with a minimum size of 8k.
This will make it possible for responses larger than 8k to be sent in
one go.

Question: Is it a good idea to overload the ProxyReceiveBufferSize
parameter, or should I create a brand new parameter?

-----------------------------------------                "There's a moon
                                        over Bourbon Street
View raw message