What happens when a single request takes a long time with these non-blocking I/O servers?

前端 未结 6 1067
北恋
北恋 2021-01-12 00:59

With Node.js, or eventlet or any other non-blocking server, what happens when a given request takes long, does it then block all other requests?

Example, a request c

6条回答
  •  南笙
    南笙 (楼主)
    2021-01-12 01:24

    You are exactly correct. Nodejs developers must be aware of that or their applications will be completely non-performant, if long running code is not asynchronous.

    Everything that is going to take a 'long time' needs to be done asynchronously.

提交回复
热议问题