[EMAIL PROTECTED] writes:
> Thanks Greg
>
> > I strongly suggest you move the images to a separate hostname
> > altogether. The
> > proxy is a good idea but there are other useful effects of
> > having a separate
> > server altogether that I plan to write about in a separate
> > message sometime.
> > This does mean rewriting all your img tags though.
>
> Look forward to that with interest
Briefly the reason you want a separate server and not just a proxy is because
netscape and other browsers can do requests in parallel more efficiently. If
they're on the same server the browser might choose to queue up a bunch of
image downloads on the same connection using keepalives. If it orders them
with the slow script generated page first then they get delayed by the length
of time it takes the script engine to run.
Also if you end up with a backlog queue of proxy servers waiting for a script
engine to service them then all your proxy server processes can get stuck
waiting for a script engine process. That's fine if all they do is serve
dynamic pages but not if they're also responsible for serving static objects.
The proxy server may still be useful but it doesn't replace using a separate
server on a different hostname or port for the images and static documents.
Besides you may eventually want to do that anyways and it will be easier if
you've been doing it all along.
> I have two PIII 500's, so CPU usage is no problem. Amazingly, it's the 1Gig
> of memory which expires first.
That sounds like you have some high-latency job being handled by your perl
server. Are they sending mail? Or doing database accesses into a database that
can't keep up? If it's just perl it would only take a handful to use 100% cpu,
they must be idle waiting for something.
I agree with the [EMAIL PROTECTED], if you have to do anything at all
dependent on external i/o like sending mail you want to queue up the events
and handle them asynchronously. Anything that can arbitrarily increase the
latency off the perl httpds is a disaster waiting to happen.
Gee, I think I just summarized the two big lessons I was going to write about
in the same vein as jb's "in practice" message. I've learned these lessons the
hard way, hopefully we can build enough of a repertoire of such lessons in the
FAQ to help other people avoid this :)
--
greg