Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Perl cgi without mod_perl, your experience

by Joost (Canon)
on Jun 22, 2004 at 11:59 UTC ( [id://368690]=note: print w/replies, xml ) Need Help??


in reply to Perl cgi without mod_perl, your experience

By 'fairly busy', I'm thinking about something in the region 30000-50000 hits a day.
Depends on what you're doing in your scripts. If you're carful about how much code you load per request and use some clever caching (and don't forget to set caching http headers!), you can probably get that many hits on a CGI. I've built a couple of CGI-based sites that could handle more than that - depending on the hard-ware ofcourse - but they tend to be awfully slow at the peak hours.

Anyway - and I'm guessing from experience, I don't have any kind of figures to back this up - the biggest problem with perl CGI's under this kind of load is probably not loading the perl interpreter itself (though on heavier loads that will also become a problem), but loading all the code that you have in your scripts. One thing you can do to reduce this, is to require modules just before you actually use them, instead if useing everything at compile time (assuming you have your code in seperate modules that you don't need for every request). Another thing that might slow you down is creating database handles (though MySQL is pretty fast, some other databases make it nearly impossible to run from CGI at all).

Ofcourse, mod_perl will do away with this problem for you, and then it will be more efficient to use as much as you can in the startup.pl script.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://368690]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (1)
As of 2024-04-19 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found