4 ms·
What do you mean by modern web? I don't see how modernity implies more load, at least for fork() bottlenecked programs specifically. If you're serving thousand
by bitofhope 8y ago
What do you mean by modern web? I don't see how modernity implies more load, at least for fork() bottlenecked programs specifically.
If you're serving thousands of requests per second, you probably need a pretty beefy server anyway, regardless of the stack you're running. Forking makes good use of multiprocessor capabilities if nothing else.
- laumars 8y agoNo, it really doesn't. Forking is expensive. Running a multithreaded (even if it's green threads rather than OS threads) http server and web application makes far better use of multi-processor capabilities. Shell scripting is a handy tool but it is also slow so you wouldn't write hot paths in shell scripts. And for the same reasons you wouldn't write busy web servers in CGI. Both are fork() heavy.
- sfifs 8y agoModern language runtimes used in the server space like Go basically multiplex green threads across processes to minimize context switches between concurrent execution paths. By leveraging the fact that I/O is much slower than processor ops and switching green threads on I/O without necessarily always switching OS process, they easily scale to hundreds of thousands of concurrent requests. I don't really know about Erlang's model but it also has green threads. There's a reason why high traffic sites use languages like these. https://talks.golang.org/2012/concurrency.slide#1 https://talks.golang.org/2012/concurrency.slide#1