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

I've read that "Starman s a preforking server that by default preforks 5 times and thus can serve 5 requests at a time".
What is the role of the Worker in "starman --workers 32"? Is that 32 workers per preforked process or for all 5 defaults of them?
But let's assume that 1 preforked process has 32 workers, does that mean that it has 32 threads therefore can process 32 requests at the same time?

Replies are listed 'Best First'.
Re: Starman fork vs worker
by haj (Vicar) on Jul 27, 2018 at 05:59 UTC
    As far as I know --workers 32 will just make starman fork 32 processes instead of 5. Threading isn't involved.
Re: Starman fork vs worker
by dsheroh (Monsignor) on Jul 27, 2018 at 07:14 UTC
    You're overthinking this. A "preforked process" and a "worker" are the same thing. If you run starman --workers 32, you will end up with 33 starman processes (one "master" and 32 "worker" processes) and each worker process will be able to handle a single request at a time.