Re: [dev] [ANN] CGD - Ultra-minimalist HTTP and FastCGI wrapper for CGI programs.

From: Uriel <>
Date: Wed, 19 Sep 2012 16:43:17 +0200

On Wed, Sep 19, 2012 at 4:10 PM, Stephen Paul Weber
<> wrote:
> Somebody claiming to be Uriel wrote:
>> CGD runs as a FastCGI wrapper (to be used with nginx or similar web
>> server) or as a standalone HTTP server, handing over all requests to a
>> given CGI script.
> Is this just a wrapper for compatability (which seems odd, since most
> servers also speak CGI), or does it do prefork stuff to improve performance?

Sadly not all servers speak CGI this days, most notably nginx, and
others often have broken CGI support.

Also CGD can act as a extremely minimal HTTP server itself to directly
host "stand-alone" CGI scripts without a 'real' web server.

The server itself uses goroutines which are very efficient, so has no
need to pre-fork, the called CGI script can't be 'preforked' because
before you fork a CGI script you have to set the relevant environment
variables for the request.

Still, forking is never the bottleneck (werc itself performs hundreds
of fork per request) and I wouldn't be surprised if CGD is not more
efficient than the CGI-handling code in most web servers, but if your
web server already supports CGI i wouldn't really bother.

Hope this answers most (all?) your questions.

Received on Wed Sep 19 2012 - 16:43:17 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 19 2012 - 16:48:04 CEST