"Regarding the issue of why a logger process in Erlang does not get overwhelved, this is the reply I got from Raimo Niskanen (Erlang team at Ericsson):
There is a small fix in the scheduler for the standard
producer/consumer problem: A process that sends to a
receiver having a large receive queue gets punished
with a large reduction (number of function calls)
count for the send operation, and will therefore
get smaller scheduling slots."
Sending to a mailbox costs reductions proportional to how many messages are already queued. While this isn't a perfect solution, it should influence the scheduler quite a bit. (Imagine trying to do that sort of thing in node.js!)
Edit: Here's one (http://www.haskell.org/pipermail/haskell-cafe/2006-January/0...):
"Regarding the issue of why a logger process in Erlang does not get overwhelved, this is the reply I got from Raimo Niskanen (Erlang team at Ericsson):
There is a small fix in the scheduler for the standard producer/consumer problem: A process that sends to a receiver having a large receive queue gets punished with a large reduction (number of function calls) count for the send operation, and will therefore get smaller scheduling slots."
Sending to a mailbox costs reductions proportional to how many messages are already queued. While this isn't a perfect solution, it should influence the scheduler quite a bit. (Imagine trying to do that sort of thing in node.js!)