Tuesday 28 January 2020

How exactly a cluster receives incoming connections?

I'm just curious about this snippet of code from the docs because I understand that (at least in unix systems) two process can't use the same port and the exception is for child process who can access to the parent file descriptor. The docs says that NodeJS implements a RR (Round Robin) algorithm for load balancing, ok that have sense, but who is intercepting the incoming requests in order to execute the RR first? In the snippet I can see that parent process have no http code so he is not listening for http requests... I'm missing something. This is the image I have in my headnew request > something? > RR > child processI checked the source code of master and child and logically there is nothing that helps me to discover what is that "something".PD: Sorry about my english

Submitted January 29, 2020 at 01:17AM by dengue8830

No comments:

Post a Comment