Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: mod_perl or

by thraxil (Prior)
on May 14, 2004 at 15:33 UTC ( #353399=note: print w/replies, xml ) Need Help??

in reply to mod_perl or

so my question is... Are there any other reasons that you might choose one exclusively over the other?

reasons you would want to use mod_perl:

  • you need to have access to other parts of the apache request cycle besides just content production. eg, you need to hook into the authentication layer or the logging layer.
  • your app will be hit frequently and needs to have low latency in the response.
  • your app would benefit from in-memory persistence.

reasons to stick to CGI:

  • it needs to be deployable on servers where mod_perl isn't available (of course, with Apache::Registry, you can still deploy any CGI script with mod_perl)
  • the app will not be hit very often and doesn't need to be very fast, but perhaps will consume a very large amount of memory when it is run. an example would be a CMS or weblog backend that publishes to static html. the 'publish' or 'rebuild site' part probably has to do a lot of work and could use a lot of memory for a big site, but will only be run every once in a while. if you run it under mod_perl, it will bloat the apache processes and you may run into memory problems. CGI has the advantage of giving up all its memory when it's done.

those are just some of the reasons that i've deployed one way or the other in the past. others can probably come up with other reasons.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2021-10-17 23:29 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (72 votes). Check out past polls.