One of the main drawbacks of CGI development is the performance impact associated with the requirement to start and stop programs per every request. mod_perl and FastCGI provide two solutions for this problem. Both require careful examination of existing code because you can no longer assume in your CGIs that all resources will be automatically freed by the operating system after the request is served. mod_perl is a module available for Apache 1.3 and 2.0 that embeds a Perl interpreter inside the Apache web server. In addition to a powerful API to Apache internals, mod_perl includes a CGI compatibility mode that provides an environment that allows existing Perl CGIs to run with little or no modification. Since the scripts are run inside a persistent, in-process interpreter, there is no startup penalty. FastCGI is a standard that allows the same instance of a CGI program to answer several requests over time. You can read the specs and download modules for Apache 1.3 and 2.x from http://www.fastcgi.com. FastCGI has regained some popularity by its use by web development frameworks such as Ruby-on-Rails. |