So I’m just starting to dive into Node and I understand that the I/O is non-blocking and that the event loop is blocking but what I am wondering is:
If you have code which is blocking the event queue, will the server still be able to place incoming requests at the end of the queue or will all of them just time out/bounce?
This has nothing to do with node, or at least this discussion so far introduces no evidence of node’s behavior.
The TCP stack itself accepts connection into a queue of its own without help from the program that is using the accepting socket. If that queue fills, further requests are made to wait until the TCP connection queue has space. Such “unacceptable” connections are not bounced, though they could time out if things get really delayed.
Bottom line, however, is that the sample answer, using curl, does not prove anything beyond the basic behavior of the TCP stack, but that probably doesn’t matter, because the original poster’s concern was that connections might bounce. That will only happen if your server is so overloaded (or badly written perhaps) that it is effectively overloaded, and dumping some requests is the best chance it has of at least providing some service to some users.