Re:Why Events Are A Bad Idea For High-Concurrency Servers (2...
by oelmekki on Friday May 02, 2014 @03:45AM
(#7684531)
Ok, thanks. So I guess we're talking about events as a problem for things like node.js or eventmachine.
Out of curiosity, you mentioned nginx as using callback chain ; has it any difference with apache in that regard ?
Re:Why Events Are A Bad Idea For High-Concurrency Servers (2...
by rdtsc on Friday May 02, 2014 @04:07AM
(#7684579)
It is usually consumes less memory for the same amount of concurrent connections. The callback chain for it should be pretty short. Instead of spawning a process, it would get an event that there is data on a client socket. Then parse http (this might happens across multiple callbacks, and then handle it (serve the file).
If it is OS processes (or Erlang lightweight processes) then you gain failure isolation. If something has gone wrong and a child process crashes, only that request will fail, others will keep working. Real OS processes are usually on the heavy side.
In Go you might create a channel and spawn a goroutine for example.