Conceptual problems, I found some articles that I didn"t understand.
most articles say that NodeJs is suitable to be an IO server because of the high throughput of the asynchronous model. But the asynchronous model is supposed to mean that initiating an IO operation doesn"t have to wait for the result to do something else first, right? As a server, it should receive the request and perform the corresponding operation after receiving it. For example, if I want to query my user information, what NodeJs does is "receive a Post request"-> "execute function findUserDetail (userId)"-> "return user information to the front end". This process seems to have nothing to do with asynchrony?
so why does the server use NodeJs faster than Java when there are a large number of requests (and the amount of computation is small and CPU is not intensive)?
< hr >for example, in Zhihu | what are the advantages and disadvantages of using Node.js this post, many people have mentioned" better performance in dealing with high concurrency scenarios ".
Source of question: the classmate interviewed the question and found that I couldn"t answer it myself. When I introduce NodeJs to others, I always say "it has a large throughput as a Web server", but I don"t understand it all the time.