Re:Crow – C++ Microframework for Web, inspired by Python Flask
by SomeCallMeTim on Tuesday July 08, 2014 @04:11PM
(#8006507)
It's important to note that requiring 10000+ real threads would be a huge limitation, performance-wise. At that scale you end up with a lot of overhead from process switching.
The difference is a big reason why Apache 2.2 would slow to a crawl and eat up gigabytes of RAM at 100% processor utilization on the same load that Nginx could handle with 10Mb of RAM and 20% processor utilization. [1] (I understand more recent versions of Apache now support polling [2].)
[1] See, for example, this explanation: http://stackoverflow.com/questions/2583350/is-epoll-the-esse...
Also, you said this adds complexity and overhead. I dispute that it adds complexity. For most people: "return stuff" vs "res.send(stuff)". And I wouldn't assume that it would add any overhead either. If you disagree, let me know when you've read the code and understand how boost::asio works.