Re: PerlTransHandler question

[prev] [thread] [next] [Date index for 2005/03/10]

From: John Doe
Subject: Re: PerlTransHandler question
Date: 13:01 on 10 Mar 2005
Am Mittwoch, 9. M=E4rz 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 =3D~
> m/\.(jpg|gif|css|pdf|bmp|js|eps)$/i){
>                                     #now redirect the image
>
> $r->header_out(Location=3D>"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 a=
ll=20
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=20

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

greetings joe

PerlTransHandler question
shawn 00:19 on 09 Mar 2005

Re: PerlTransHandler question
Tony Clayton 03:15 on 09 Mar 2005

RE: PerlTransHandler question
shawn 00:53 on 10 Mar 2005

RE: PerlTransHandler question
David J Radunz 01:54 on 10 Mar 2005

Re: PerlTransHandler question
Perrin Harkins 02:06 on 10 Mar 2005

RE: PerlTransHandler question
Shawn 03:54 on 09 Mar 2005

Re: PerlTransHandler question
Perrin Harkins 04:07 on 09 Mar 2005

Re: PerlTransHandler question
John Doe 13:01 on 10 Mar 2005

Generated at 08:54 on 14 Mar 2005 by mariachi v0.52