4 ms·
No, they're not. They can run via CGI (so, yes, compiled for each request) but that's slow as ass. They run via Plack/PSGI - they can be deployed in a multitu
by bigpresh 13y ago
No, they're not. They can run via CGI (so, yes, compiled for each request) but that's slow as ass. They run via Plack/PSGI - they can be deployed in a multitude of ways, including via FastCGI or running standalone using built-in webservers, or via Starman - the latter in particular is very fast indeed. With a simple "hello world" type app, > 6000 requests/sec can be easily handled. Obviously an app of more realistic complexity won't be quite that fast, but you'll still handle many requests every second with no trouble. http://stackoverflow.com/a/4770406/4040 http://stackoverflow.com/a/4770406/4040 contains some basic benchmarks.
EDIT: also, mod_perl is generally best avoided these days; it's old, not very pleasant to work with, and ties you to Apache. Writing an app with Dancer / Mojolicious etc means you can deploy in various different ways with ease.
- laumars 13y agoFunny enough that SO link was the same one I got my misinformation from as the top answer pointed to CGI benchmarks. Thanks for the correction though, but that still doesn't answer my original question: how does Plack compare with mod_perl?
- draegtun 13y agoPlack/PSGI (Perl) == WSGI (Python) == Rack (Ruby) These are all abstraction layers (for each language) which then can be run seamlessly on top of CGI, SCGI, mod_(perl|python|ruby), etc. - http://plackperl.org http://plackperl.org - http://en.wikipedia.org/wiki/Plack_(software) http://en.wikipedia.org/wiki/Plack_(software) - http://en.wikipedia.org/wiki/PSGI http://en.wikipedia.org/wiki/PSGI - http://en.wikipedia.org/wiki/Wsgi http://en.wikipedia.org/wiki/Wsgi - http://en.wikipedia.org/wiki/Rack_(web_server_interface) http://en.wikipedia.org/wiki/Rack_(web_server_interface)