Filtering process to keep connection.
- Main process should be connected to all other processes. - Controller should be connected to Router. - Router should be connected to Controller and all Workers. - Workers should be connected to Router worker thread ports only. This filtering helps to avoid unnecessary communication and various errors during massive application workers stop / restart.
This commit is contained in:
@@ -177,7 +177,7 @@ nxt_port_quit_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
nxt_inline void
|
||||
nxt_port_send_new_port(nxt_task_t *task, nxt_runtime_t *rt,
|
||||
nxt_port_t *new_port, uint32_t stream)
|
||||
{
|
||||
@@ -195,10 +195,7 @@ nxt_port_send_new_port(nxt_task_t *task, nxt_runtime_t *rt,
|
||||
|
||||
port = nxt_process_port_first(process);
|
||||
|
||||
if (port->type == NXT_PROCESS_MAIN
|
||||
|| port->type == NXT_PROCESS_CONTROLLER
|
||||
|| port->type == NXT_PROCESS_ROUTER)
|
||||
{
|
||||
if (nxt_proc_conn_martix[port->type][new_port->type]) {
|
||||
(void) nxt_port_send_port(task, port, new_port, stream);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user