4 ms·
> sufficient to just close the connection and destroy the session. Unless that connection managed to write over some memory already. Then you can't just close
by rdtsc 11y ago
> sufficient to just close the connection and destroy the session.
Unless that connection managed to write over some memory already. Then you can't just close the connection. You have to restart the whole server OS process.
> I doubt that erlang spawns millions of OS processes because that would be extremely inefficient due to CPU context switching
Erlang does spawn millions of processes. You can try it yourself in a few lines of code. They are not OS processes though. Although they are similar in that OS processes and Erlang ones don't share memory with their peers -- a very useful property indeed.
So Erlang in a way can have it cake and eat it took. It gets the benefit of OS processes but at a much lower cost.