You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Marko Asplund <as...@kronodoc.fi> on 2002/03/07 22:14:03 UTC

shielding web applications from slow clients

we're developing an Apache FastCGI based web application whose performance
we'd like to opmize. on the short term a major rehaul of the applications
internal architecture is not possible so we'd like to concentrate on
external architecture at this point. the application itself is very memory
resource intensive so only a small number (~10) of application processes
can be running on the server concurrently. the application serves static
(files, icons, HTML) and dynamic (application user interface pages)
content. it also receives file uploads.

one potential optimization is to try and minimize the amount of time each
client reserves a server process per request. as an extreme example a user
might be downloading or uploading a 10 Mb file over a 9600 bps modem link.  
if there was one such download per each application process the
application would be unavailable for other users for hours. similarly
serving smaller dynamic pages to slow clients can reserve the server
process for longer than would be necessary.

this is probably a very common problem for web application developers.  
what kinds of solutions are other people using for this problem? we've
been thinking about different buffering. all of the scenarios we've
discussed so far include adding some kind of front-end proxy server. the
proxy server could then buffer request data until the entire request has
been received before forwarding it to the application server. similarly
the proxy could read all of the response from the server to a buffer as
quickly as possible.

what's the best way for implementing such a buffering? note that a caching
proxy is not appropriate in this case (except for a very limited amount of
data) because the application does authentication and authorization for
every request. would increasing TCP/IP buffer size work for smaller pages?
for file transfer some kind of filesystem buffering is probably the only
viable solution. are there any software solutions available for this? is
it possible to increase the size of proxy server application level
buffers?

any pointers and suggestions would be greatly appreciated.

-- 
	aspa




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: shielding web applications from slow clients

Posted by Daniel Lopez <da...@rawbyte.com>.
Like you mention, a reverse proxy is usually the current approach (for
fronting Apache running heavy mod_perl processes)
There were several mentions in the past in the dev mailing list about
mod_accel, although I have never used it, it seemed to address your exact
same problem and have some optimizations over vanilla Apache proxy.
The website is:
http://ariadnamedia.ru/mod_accel.html

The main problem is that the docs are in russian. Beginnings of a  english
translation can be found here http://dapi.chaz.ru:8100/articles/mod_accel.xml?lang=en
Make sure you check the following too
http://marc.theaimsgroup.com/?l=apache-new-httpd&w=2&r=1&s=mod_accel&q=b

> we're developing an Apache FastCGI based web application whose performance
> we'd like to opmize. on the short term a major rehaul of the applications
> internal architecture is not possible so we'd like to concentrate on
> external architecture at this point. the application itself is very memory
> resource intensive so only a small number (~10) of application processes
> can be running on the server concurrently. the application serves static
> (files, icons, HTML) and dynamic (application user interface pages)
> content. it also receives file uploads.
> 
> one potential optimization is to try and minimize the amount of time each
> client reserves a server process per request. as an extreme example a user
> might be downloading or uploading a 10 Mb file over a 9600 bps modem link.  
> if there was one such download per each application process the
> application would be unavailable for other users for hours. similarly
> serving smaller dynamic pages to slow clients can reserve the server
> process for longer than would be necessary.
> 
> this is probably a very common problem for web application developers.  
> what kinds of solutions are other people using for this problem? we've
> been thinking about different buffering. all of the scenarios we've
> discussed so far include adding some kind of front-end proxy server. the
> proxy server could then buffer request data until the entire request has
> been received before forwarding it to the application server. similarly
> the proxy could read all of the response from the server to a buffer as
> quickly as possible.
> 
> what's the best way for implementing such a buffering? note that a caching
> proxy is not appropriate in this case (except for a very limited amount of
> data) because the application does authentication and authorization for
> every request. would increasing TCP/IP buffer size work for smaller pages?
> for file transfer some kind of filesystem buffering is probably the only
> viable solution. are there any software solutions available for this? is
> it possible to increase the size of proxy server application level
> buffers?
> 
> any pointers and suggestions would be greatly appreciated.
> 
> -- 
> 	aspa
> 
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org