Pure perl multi-threading webserver (based on ithreads) capable to run Mojolicious applications.
BEWARE: it's just a proof of concept, implemented only as a demo!
BEWARE: it was tested with Mojolicious 3.47, however it is very likely that it will not work with future versions as it uses a hack into Mojolicious internals (not via public API).
usage: metyl [OPTIONS] [APPLICATION]
metyl script/mojoapp
metyl /path/to/mojoapp.pl
metyl -a 127.0.0.1 -p 80 mojoapp.pl
These options are available:
-a, --address <ip> Set IP adress you want to listen on (default: localhost)
-p, --port <num> Set port number you want to listen on (default: 3000)
-w, --workers <num> Set number of worker threads (default: 4)
-
Hooking up threading vehicle to mojo's ioloop via event handler Mojo::Reactor::recurring(0.02 => {...}) is a bit suboptimal.
-
SSL enabled Mojo apps are ignored
-
Still quite far from hypnotoad (bechmark by sri @ dualcore macbook):
- with keep-alive: hypnotoad at 1800 rps, metyl at 1330 rps, daemon at 1000 rps
- without keep-alive: hypnotoad at 1100 rps, metyl at 770 rps, daemon at 800 rps