-1

Suppose if there is one request R1 being processed by the Nodejs server and the debugger has paused the system at a breakpoint.

Now at this point (after pause) if another request R2 is made by the client, does it enter the Nodejs server at all?

If it doesn't enter the server, then which component of Nodejs server will keep that request R2 on standby till that debugger pause is released?

If it does enter the server, then which component of Nodejs server will handle this R2 and how?

I can't find anything on this, any help is appreciated. Thanks

gurvinder372
  • 66,980
  • 10
  • 72
  • 94
  • I don't think there's a definitive answer for that. does the debugger just stops the JS thread or all the threads? and also, is this server clustered? it depends – David Haim Nov 06 '16 at 12:36

1 Answers1

1

If it doesn't enter the server, then which component of Nodejs server will keep that request R2 on standby till that debugger pause is released?

I GUESS : The request would simply timeout, without guetting any response. (HTTP layer). If you have something like nginx in front of node, it would be a 502 serve by nginx, because it can have response from your node backend.

If it does enter the server, then which component of Nodejs server will handle this R2 and how?

The poll queue.

The best info you can get on the way node is functionning internaly, event loop etc.., is here : https://github.com/nodejs/node/blob/master/doc/topics/event-loop-timers-and-nexttick.md

Take a look it's worth the time.

Boris Charpentier
  • 3,515
  • 25
  • 28