Speaking only for myself as ever: Handling out of memory errors is a hard problem. At the point when you can't allocate more memory you are busted in most languages. For example in C a slightly deeper function call depth can cause the stack to expand at any point. If that point coincides with you running out of memory then you are busted. No program can keep running with a broken stack. If V8 were capable of recoveri…
You're being too clever - if you run out of memory, throw away the request and all associated resources and return "500: Internal server error". There are lots of reasons why this isn't perfect (if the OS overcommits memory, like Linux (typically?) does, it will have to kill you to avoid running out; if you need to use swap you're too slow to be useful; etc), but it's not impossible. node.js (one process for many req…
The author of Nginx on why V8 is not suitable for web servers
61–70 of 75 posts
Re: The author of Nginx on why V8 is not suitable for web servers
#62It's scary what you can do with machine translation these days...
Re: The author of Nginx on why V8 is not suitable for web servers
#63Re: The author of Nginx on why V8 is not suitable for web servers
#64I keep seeing these replies on how well Google Translate performed. I didn't realize while reading that it was machine-translated, but my immediate thought was "this person is not a native English speaker or needs much work his attempt at Yoda-speak does."
I remember when nginx first came out (the web server that the author built) and the biggest barrier to adoption was the fact that all the documentation was in russian. Online machine translation did not produce understandable content at that time.
Re: The author of Nginx on why V8 is not suitable for web servers
#65Earlier quoted context omitted.
It likely was not completely translated by machine. Google Translate lets anyone reading the translation edit it to fix errors. Highlight some text and notice the link that appears allowing you to "Contribute a better translation" for that particular passage.
It's more likely that it only helps train Google Translate, and doesn't actually apply any changes directly to the translated text. Otherwise vandalism would be way too easy.
Re: The author of Nginx on why V8 is not suitable for web servers
#66Speaking only for myself as ever: Handling out of memory errors is a hard problem. At the point when you can't allocate more memory you are busted in most languages. For example in C a slightly deeper function call depth can cause the stack to expand at any point. If that point coincides with you running out of memory then you are busted. No program can keep running with a broken stack. If V8 were capable of recoveri…
Re: The author of Nginx on why V8 is not suitable for web servers
#67Node.js is often used because it is cool, new and easier for front-end developers to develop a functioning backend. For more traditional uses that want something less hackish, erlang for example, crashes only a single thread not the entire vm. Functional programming languages in general like haskell and erlang are interesting for backend core services.
Re: The author of Nginx on why V8 is not suitable for web servers
#68Sysoev brings up a couple good points that affect Node.js . 1) The fact memory allocation might crash the process is a serious problem. Is this still the case? 2) The fact that garbage collection is still stop-the-world may be a problem for server availability. Are we able to call the generational collector from node, or no? Things that don't involve node: The ability to create multiple objects in different contexts.…
Re: The author of Nginx on why V8 is not suitable for web servers
#69Speaking only for myself as ever: Handling out of memory errors is a hard problem. At the point when you can't allocate more memory you are busted in most languages. For example in C a slightly deeper function call depth can cause the stack to expand at any point. If that point coincides with you running out of memory then you are busted. No program can keep running with a broken stack. If V8 were capable of recoveri…
You're being too clever - if you run out of memory, throw away the request and all associated resources and return "500: Internal server error". There are lots of reasons why this isn't perfect (if the OS overcommits memory, like Linux (typically?) does, it will have to kill you to avoid running out; if you need to use swap you're too slow to be useful; etc), but it's not impossible. node.js (one process for many req…
Re: The author of Nginx on why V8 is not suitable for web servers
#70IIRC, on Linux at least the memory allocation thing is moot. If your process runs out of memory, it dies anyway. You can't catch "malloc says no" because malloc never says no. It either says yes or blows your process's brains out.
"malloc never says no" malloc says no if you set a ulimit in your shell. I do this on the desktop to stop myself from shooting myself in the foot. (Recent kernels also let you turn off the overcommitting behavior.)