Hacker News new | ask | show | jobs
by leif 5812 days ago
False.

An evented server (at least, until they get a lot fancier and make you program with locks and such) only gets to use one of the cores, while a threaded server gets all four.

Using a single core just means that the threaded server doesn't get any advantage from being threaded, while the evented server gets everything it can use.

This "model" is worthless for comparison.

1 comments

It is pretty easy to build a round robin load scheduler that queries for x amount of cores on a system, spawns a thread for x cores and then schedules request to the least burdened core. This reduces the amount of threads the server uses while still taking advantage of evented co-routine based processes. (this stuff is not new, Node just kicked off interest again due to its growing popularity). If evented servers catch on, I think you will eventually see this as a hybrid solution. But yes you will certainly need threads or different processes, to take advantage of multi-core systems, it just a question of whether or not you need a thread per request. There are also a lot of security implication that are getting glossed over in the talks about evented servers.