Hi Manish,  

Most people run their Node.js apps in a “cluster” which enables multiple 
threads and under “supervision” which restarts failed threads. For example, 
this is automated using the open source slc run 
(http://docs.strongloop.com/display/SLC/slc+run) helper. There are other 
process managers which achieve similar effect.

# slc run —cluster cpus app.js

That will use all CPUs on the machine and load balance requests between worker 
processes, restarting processes when there is a failure.

You may also be interested in the error handling work in the Zones 
(http://strongloop.com/zone) project which allows you to more easily code 
defensively to avoid unhanded exceptions from crashing the server. There are 
other similar approaches such as trycatch.

Nginx is commonly combined with Node apps as an accelerator but is not required 
and plenty of people use Apache or IIS or others.

Issac


On Monday, August 25, 2014 at 6:32 AM, Manish Bansal wrote:

> Hi Friends,  
> I am very new to node.js and still exploring few opportunities where i can 
> use this server/technology for our development in a pilot project effectively 
> and efficiently. so far my experience is great, BUT the biggest issue i found 
> with node is (which is often advertised as pros) the development technology + 
> server is running in single thread. therefore any unhandled unexpected 
> exception which is causing due to programming/environmental issues brings the 
> server down. when i am thinking about all other innocent users connected to 
> my single threaded node servers, my decisions gets influenced.   
> overthemore when i came to know Nodejs.org (http://Nodejs.org) is also hosted 
> on 3rd party webserver "nginx" i took my step back of trying this attempts.  
>  
> Please share your thoughts.
>  
> Manish Bansal  
> [email protected] (mailto:[email protected])  
>  
> --  
> Job board: http://jobs.nodejs.org/
> New group rules: 
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules: 
> 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> (mailto:[email protected]).
> To post to this group, send email to [email protected] 
> (mailto:[email protected]).
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/nodejs/a9daf644-6430-4d3f-a3c1-0af1f5ef7049%40googlegroups.com
>  
> (https://groups.google.com/d/msgid/nodejs/a9daf644-6430-4d3f-a3c1-0af1f5ef7049%40googlegroups.com?utm_medium=email&utm_source=footer).
> For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/B2F385B98E63443585B725ADBEB20E1E%40strongloop.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to