|
|
|
|
|
by bysin
4052 days ago
|
|
> OS-level multitasking won't be able to achieve the same level of concurrency Do you have a source for this claim? I've seen it repeated many times, especially in the node.js community but I've yet to see any evidence to back it up. From what I've read, a synchronous threaded model can be just as fast as an event-based system [1]. [1] http://www.mailinator.com/tymaPaulMultithreaded.pdf |
|
This is touched upon in the slides you linked to. On slide 62 (SMTP server) a point says, "Server spends a lot of time waiting for the next command (like many milliseconds)." A malicious client could send bytes very slowly, using up a thread for a much longer period of time. If the client has an async architecture, it can open multiple slow connections with little overhead. The asymmetry in resource usage can be quite staggering.
1. http://en.wikipedia.org/wiki/Slowloris_(software)