Now we have 4 (or actually more) PSGI standalone web servers. Here's a quick cheat sheet to compare them:
- HTTP::Server::PSGI - core in Plack. Should work on all systems with perl 5.8.1 or later. No preforking nor keep-alives. Best for the quick development with plackup and testing with Plack::Test.
- HTTP::Server::Simple::PSGI - only dependent on HTTP::Server::Simple which is absolute core-only and should work back to perl 5.6. Best to write PSGI embedded web server application even without Plack.
- Starman - High performance preforking web server with HTTP/1.1 and UNIX domain socket support. it's based on Andy Grundma's Catalyst::Engine::HTTP::Prefork, and works exactly like Rack's Unicorn. nginx's best friend.
- Starlet - HTTP::Server::PSGI + Server::Starter + Parallel::Prefork. Much simpler than Starman and less features, best to run behind proxy.
Personally I recommend Starman for the production use, running it behind nginx, Varnish or lighttpd. Starlet would be great if you don't need Starman's fancy features like dynamic server pool configuration or HTTP/1.1 support, and if you're a big fan of Kazuho Oku's software, which I myself am :)
All of them have Plack adapters so you can change the backend easily with plackup -s Starman etc. to test your application in your system.
So it would be Starman or Starlet that would be/is the replacement of old Plack::Server::Standalone::Prefork?
Posted by: Jakub Narebski | 2010.03.26 at 15:46
Starlet. As it's documented in perldoc Starlet.
Posted by: miyagawa | 2010.03.26 at 17:12
I mean from the actual implementation standpoint, it's clearly Starlet, but Starman does preforking and keep-alives and what not, so it's your choice now which to choose, based on the functionalities they provide.
Posted by: miyagawa | 2010.03.26 at 17:44
Is there any effort to make a forking webserver for win32?
Posted by: fREW Schmidt | 2010.03.26 at 19:57
Not that i know of, since that doesn't make much sense.
Posted by: miyagawa | 2010.03.26 at 20:16
What about you think nginx+Plack(FastCGI) vs nginx+Starman(reverse proxy)?
Which is better ? (I've deployed a psgi application(fastcgi) to delivery file from mongodb).
Posted by: Nightsailer | 2010.03.31 at 10:04
Personally I'm in the fan of using reverse proxy (HTTP) since it's easier to handle and more obvious to debug. Starman also has an ability to listen over the UNIX socket which usually is possible with FastCGI. But I've never compared FastCGI vs HTTP reverse proxy for nginx -- you might better consult nginx wiki or somewhere to get a better answer.
Posted by: miyagawa | 2010.03.31 at 12:09