Are web sockets using a lot of resources, such as a comet long poll?

I know that long Comet polls are bad for web servers because they take up one thread for each connection. Thus, you cannot have many users with persistent connections or your web server will crash.

Is this the same with web sockets in HTML 5?

How can this solve the problem with the resource if it takes up one thread per persistent connection?

+3
source share
2 answers

... because they take up one thread per connection

. . , . () IAsyncHttpHandler IIS .

+3

Spender , - (, Apache mpm_worker mpm_prefork) / .

Comet Websockets ( ) - Proactor ( ), (). HTTP- keep-alive ( , - 99% ), /, Websockets.

+2

Source: https://habr.com/ru/post/1758654/


All Articles