One of my servers is getting a load average of over 6.00, because of a
very popular Apache::ASP-powered database driven website.

I'm thinking about getting the front-end httpd to cache the pages
generated by Apache::ASP by adding something like this:

    $Response->AddHeader('Last-Modified', time2str(time)); 
    $Response->{CacheControl} = 'public'; 
    $Response->{Expires} = 3600;

But then I realized that the backend, while it always generates the
same content for a given URL (unless the administrator updates the
database), generates different advertising depending on the country of
the remote user (determined via Geo::IP) and how many pages they have
viewed so far!

So, I don't think front-end caching would work here, since it would
break the advertising rotation.

Any ideas on what to do? Off the top of my head, I can think of the
following options:

* Buy a separate database server.
* Break up the Apache::ASP pages into components that are cached via
  $Response->Include; not as good as caching the whole page via the
  frontend, but should help.
* Have the backend generate a placeholder for the advertisements,
  allow the frontend to cache the backend's responses, but write a
  module in C on the frontend that inserts the advertisements. (Sounds
  efficient from a technical standpoint, but painful to do considering
  I have no experience writing Apache modules. I'm also not sure how
  to make a filtering module work together with the cache, or if it's
  even possible.)
* Benchmark performance of the ASP scripts to see if there's any easy
  optimizations I can perform.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to