Am Mittwoch, 9. März 2005 01.19 schrieb shawn:
> Hi, I have been having a few problems with dial-up users downloading
> large pictures from my mod_perl enabled webserver, also I see spikes in
> cpu usage which also suggests to me that the server is doing a lot of
> work serving up the large images. What I would like to do is set up an
> image cluster, to allow mod_perl to basically only execute code within
> the page, release and let another server worry about serving up images.
> What I have done so far is altered my PerlTransHandler with the code
> below
>
>             if($host ne 'dev.webserver.com' && $host ne
> 'images.webserver.com'){
>                         if($new_uri =~
> m/\.(jpg|gif|css|pdf|bmp|js|eps)$/i){
>                                     #now redirect the image
>
> $r->header_out(Location=>"http://images.webserver.com$new_uri";);
>                                     return REDIRECT;
>                         }
>             }
>
>
> So far this working on my development environment, but what I am really
> wondering about is if this will actually take the load off mod_perl?
> (it's a little hard for me to tell without significant traffic) Will the
> mod_perl server execute the page and release the connection and not care
> how long the images server is taking? If anyone has a better solution or
> an idea I would love to hear it.
>
> Thanks
> Shawn

Somebody already mentioned the apache setup with a light frontend serving all 
static request and a heavy mod_perl enabled backend to serve the rest.

There is a very good documentation at
http://modperlbook.org/html/ch12_10.html 

I have a rather bigger mod_perl app running this way (20MB processes) and am 
very satisfied.

greetings joe

Reply via email to