The core team built domains specifically to tackle this problem.

http://nodejs.org/api/domain.html

Forrest and Domenic did a session about them at NodeConf last year, their 
materials are here: 

https://github.com/mikeal/nodeconf2013/tree/master/pkg/domains

If you analyze the code you're working on you *can* create domains around 
specific areas of code that you're confident won't leak on exception but it's 
still a better idea to schedule the process to be cycled.

-Mikeal

On Jan 14, 2014, at 12:28PM, Gregg Caines <cai...@gmail.com> wrote:

> Hey all... I'm wondering if anyone can point me to the current best-practice 
> for isolating requests in a web app.  In general I'm trying to solve the 
> problem of keeping the server running despite bad code in a particular 
> request.  Are domains my only shot?  Do they completely solve it?  Does 
> anyone have existing code?
> 
> I'm on a somewhat large team, working on a somewhat large codebase, and until 
> now I've been just logging restarts and combing logs for these types of 
> errors, then fixing them (which I'll always do), but I'm starting to feel a 
> bit silly with PHP having solved this 10 years ago.  ;)  When a bug does get 
> through, it would be nice to not lose the whole server and the possible 
> 10,000+ customer requests attached to it, while I scramble to fix it.
> 
> Thanks for any ideas or pointers!
> 
> G
> 
> -- 
> -- 
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> 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 nodejs+unsubscr...@googlegroups.com.
> 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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
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 nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to