Quoting md <[EMAIL PROTECTED]>: > Hello, > > I'm working on a dynamic site that I originally > thought I would do with mod_perl. Now after reviewing > the requirements and available hardware, I wonder if > mod_perl will be my best solution. > > The machine will not be a huge box (though I wasn't > provided much in the way of specs) and will only have > 256M of RAM. There will be static content, incuding > 5-10 images per page. The client has only given me > sparse information, but claimed that he currently had > 4,000 unique visitors a day and wanted to move to > 10,000-15,000 unique visitors per day (he didn't give > me page view stats). I may or may not be able to set > up multiple instances of Apache. > > Given limited hardware (esp. RAM), am I better off to > go with mod_perl (larger Apache processes with limited > RAM) or CGI (smaller apache processes but the usual > cons)?
You can easily build an application that uses the best of both worlds. The biggest benefit of mod_perl is speed, but you don't have to tie yourself tightly to mod_perl to get that benefit. I would build your application using plain old CGI, following the guidlines that mod_perl provides for running CGI applications under the Apache::Registry module. If you properly analyse your application, and build small tight CGI scripts, then when the load goes up, you can pick and choose the heaviest hit scripts and run them under Apache::Registry for the performance boost. Also, if the load goes really high, you can ask for more hardware, and run the entire site under Apache::Registry without any code changes. I would recommend taking a look at CGI::Application. It provides a very clean framework for building CGI programs, and by using it, you will avoid most if not all of the pitfalls that most CGI programs have that require them to be recoded, or cleaned up for use with Apache::Registry. Good luck... Cees