MESSAGE
DATE | 2020-08-04 |
FROM | Wesley Peng
|
SUBJECT | Re: [Hangout - NYLXS] Question about deployment of math computing
|
Hi
dcook-at-prosentient.com.au wrote: > That's interesting. After re-reading your earlier email, I think that I misunderstood what you were saying. > > Since this is a mod_perl listserv, I imagine that the advice will always be to use mod_perl rather than starman? > > Personally, I'd say either option would be fine. In my experience, the key advantage of mod_perl or starman (say over CGI) is that you can pre-load libraries into memory at web server startup time, and that processes are persistent (although they do have limited lifetimes of course). > > You could use a framework like Catalyst or Mojolicious (note Dancer is another framework, but I haven't worked with it) which can support different web servers, and then try the different options to see what suits you best. > > One thing to note would be that usually people put a reverse proxy in front of starman like Apache or Nginx (partially for serving static assets but other reasons as well). Your stack could be less complicated if you just went the mod_perl/Apache route. > > That said, what OS are you planning to use? It's worth checking if mod_perl is easily available in your target OS's package repositories. I think Red Hat dropped mod_perl starting with RHEL 8, although EPEL 8 now has mod_perl in it. Something to think about.
We use ubuntu 16.04 and 18.04.
We do use dancer/starman in product env, but the service only handle light weight API requests, for example, a restful api for data validation.
While our math computing is heavy weight service, each request will take a lot time to finish, so I think should it be deployed in dancer?
Since the webserver behind dancer is starman by default, starman is event driven, it uses very few processes ,and the process can't scale up/down automatically.
We deploy starman with 5 processes by default. when 5 requests coming, all 5 starman processes are so busy to compute them, so the next request will be blocked. is it?
But apache mp is working as prefork way, generally it can have as many as thousands of processes if the resource is permitted. And the process management can scale up/down the children automatically.
So my real question is, for a CPU consuming service, the event driven service like starman, has no advantage than preforked service like Apache.
Am I right?
Thanks. _______________________________________________ Hangout mailing list Hangout-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/hangout
|
|