hermida has asked for the wisdom of the Perl Monks concerning the following question:

Have a project which has a web application component and in my INSTALL doc have required up until now that an HTTP server is already installed like Apache that must be configured to run the web application. I would like to remove this external Apache dependency and simply bundle a lightweight Perl HTTP server with my application that can be run using a simple script and command line options to customize port, etc.

Does anyone have any recommendations and comparison/contrast? There are quite a few I don't know where to start :) Searching CPAN I have found so far:

Did I get them all? :)
  • Comment on Recommendations, Comparisons, Contrasts of Perl Web Servers

Replies are listed 'Best First'.
Re: Recommendations, Comparisons, Contrasts of Perl Web Servers
by Corion (Patriarch) on Mar 08, 2011 at 08:18 UTC

    Personally, I would target "any HTTP server that implements the PSGI spec". This means Twiggy, Starman, Corona and HTTP::Server::Simple::PSGI. I would assume that most of the other servers can be made easily into a PSGI-compliant server, or already are.

    I think there are adapters to make PSGI work as FCGI so you should be able to let your application run behind any other webserver, like Apache or Nginx.

    If you choose one of the other server implementations, you tie your program to its protocol. This is not inherently bad (see HTTP::Server::Simple), but you limit your options when combining your program with another webserver. For automated self-testing of the program, especially if it has Javascript components, having a stand-alone webserver is invaluable.

Re: Recommendations, Comparisons, Contrasts of Perl Web Servers
by Anonymous Monk on Mar 08, 2011 at 00:47 UTC
    Catalyst/Jifty/Mason ... all provide such options, and its easy if you target the PSGI spec

      iirc, perlbal is a reverse proxy. i've been advised not to use it (can't comment beyond that - ymmv).

      i found this post because i'm trying to figure out whether i should stick with starman or switch to twiggy. as i'm using anyevent in my psgi but i don't think this will be my main use case. also, i've always liked preforking web servers.

      my recommendation at this point would be to look at starman. if you need any advanced features (ssl, load balancing, content caching, etc) to check out nginx.