perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C. Jon Larsen" <>
Subject Re: Question about caching
Date Tue, 13 Mar 2012 19:57:17 GMT

Getting static assets (js, css, gfx) off your apache children is far more 
important than anything else for scaling up to lots of concurrent users 
IMHO. We use a pound load balancer to direct static reqs to nginx "cdn" 
and all dynamic requests to apache backends.

Once you have that in place tuning the data access layer / SQL, server I/O 
subsystem, network stack and OS is next most important.

Caching objects and templates would be maybe 3rd and 4th on the to-do 
list but after all the above.

On Tue, 13 Mar 2012, Dan Axtell wrote:

> Hello,
> I'm looking at upgrading some legacy code that runs under mod_perl with an eye
> towards making it more scalable.
> I understand the value of having one light-weight server for static content,
> and a reverse proxy back to a heavy-weight Apache with mod_perl, and I
> understand I can use something like Varnish or mod_cache to add a caching
> layer,  but I'm wondering if there is much if any value to caching templates
> at the application level.
> The apps are mostly dynamic forms based on HTML::Template.  H::T has some
> caching options but they seem more aimed at CGI users.  I could convert to
> Template::Toolkit, which as I understand converts to compiled Perl code (which
> would presumably mean that mod_perl would leave the template objects in
> memory).
> So does anybody recommend going down to the application level to cache
> templates (either by tinkering with HTML::Template or trying to pre-load TT
> objects), or is there more bang for the buck by focusing on the server level?
> Or is both the way to go?  Not sure where diminishing returns kicks in.
> Thanks,
> Dan

View raw message