no. Definitely not. Spawn a predefined number of workers (using the cluster api) and queue jobs in the master process then send them to the workers when they are ready to process.
On Monday, 25 March 2013 06:49:32 UTC+1, simo wrote: > > So, is it a recommended approach to spawn a new process for each opened > socket? > > On Sun, Mar 24, 2013 at 11:24 PM, Alan Hoffmeister > <[email protected]<javascript:> > > wrote: > >> I think that the maximum number of opened files is the only unix's >> limitation for the number of sockets, and this can be changed. >> >> -- >> Att, >> Alan Hoffmeister >> >> >> 2013/3/24 simo <[email protected] <javascript:>> >> >>> I have to serve a calculation via algorithm, I've been advised to use >>> a child process per each opened socket, what I am about to do is something >>> like that: >>> >>> var spawn = require('child_process').spawn;var child = spawn('node', >>> ['algorithem.js']); >>> >>> I know how to send argument to the algorithm process and how to receive >>> results. >>> >>> What I am concerned about, is how many socket (each socket will spawn a >>> process) I can have? How can I resolve this with my cloud hosting provider? >>> so that my app gets auto scaled? >>> >>> What's the recommended node js cloud hosting provider? >>> >>> Finally, is this a good approach in using child processes? >>> >>> -- >>> -- >>> Job Board: http://jobs.nodejs.org/ >>> Posting guidelines: >>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >>> You received this message because you are subscribed to the Google >>> Groups "nodejs" group. >>> To post to this group, send email to [email protected]<javascript:> >>> To unsubscribe from this group, send email to >>> [email protected] <javascript:> >>> For more options, visit this group at >>> http://groups.google.com/group/nodejs?hl=en?hl=en >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "nodejs" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected]<javascript:> >> To unsubscribe from this group, send email to >> [email protected] <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "nodejs" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/nodejs/qP_hsLZMq1A/unsubscribe?hl=en. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > -- > Kind Regards, > --------------------------------------------- > Samir Sabri > Software Architect& Developer > www.dcaclab.com > Jordan-Middle East > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
