Netty work note 0031---Master-slave Reactor multithreading

Technical exchange QQ group [JAVA, C++, Python, .NET, BigData, AI]: 170933152

This master-slave Reactor multi-threaded mode, in fact, there is only one Reactor main thread, you can see that this thread is responsible for listening to the client.

Accept the request, and then help the client accept to establish a connection, put this connection to the Reactor sub-thread, and then

Reactor child thread, and then go to distribute the request to different handler1, and then, each handler forwards the corresponding request to

In the worker thread pool, then the corresponding thread first decodes the data, then calculates, then encodes, and then sends the data back to,

SUBReactor child thread, and then this thread sends data to the client.

You can see that a main thread reactor can correspond to multiple sub-reactors, and this appears

The reactor multi-threaded model.

Guess you like

Origin blog.csdn.net/lidew521/article/details/108663656