Netty

Features of BIO communication mode: The server using the BIO communication mode usually has an Acceptor thread responsible for monitoring the client's link. After receiving the client's link request, it creates a new thread for each client to process the link, and the processing is completed. After that, it is returned to the client through the output stream, and then the thread is destroyed, a typical request-response communication mode.

         The biggest problem of this model is the lack of elastic scalability. When the concurrent access of the client increases, the number of threads on the server side and the number of concurrent access on the client side are in a 1:1 proportional relationship. Since jvm is a very precious system resource, when threads After the data expansion, the performance of the system will drop sharply. With the sharp increase of concurrent access, the system will have problems such as thread stack overflow, failure to create new threads, etc., and eventually cause the process to crash or freeze, unable to provide external services.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326089081&siteId=291194637