Live data from Hacker News

The author of Nginx on why V8 is not suitable for web servers

translate.google.com

41–50 of 75 posts

Re: The author of Nginx on why V8 is not suitable for web servers

#41

Earlier quoted context omitted.

I thought exactly the same thing! I still remember being able to play a game with one of my friends where we'd translate a sentence to German then back to English and laugh at how mangled it was…

http://www.translationparty.com/#9269521

After a bunch of English/Japanese translations:

"Number of games: We, and I have learned how to use the means for translating the German text in English is still a way of encoding their friends to play with a smile. .."

Re: The author of Nginx on why V8 is not suitable for web servers

#43
post #21

Earlier quoted context omitted.

Agreed. The title is totally trolling for attention. Nginx and Nodejs are very different. Nodejs was built on V8 from the beginning, while it would have to be grafted into Nginx somehow. Nodejs isn't Chrome but it's willing to pretend that it is - nginx isn't.

The title is a copy from a Reddit posting. I thought about changing it. Node.js is build on top of V8. It is better to get attention from Node.js experts so that others can get a clearer picture. Updated: Never mind, someone just change the title for me. The original title is "The author of Nginx on node.js and why V8 is not suitable for web servers.".

Node.js experts already know to look for V8 stuff.

Re: The author of Nginx on why V8 is not suitable for web servers

#45
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 recovering from out-of-memory errors then you would still have to go through all of node and all the native libraries that it uses and check that they can handle any allocation failing.

And if V8 handled out-of-memory errors with exceptions then you have two choices. Either make the exceptions uncatchable, in which case the JS program running in the server has no way to recover and is probably in an inconsistent state. Or make the exceptions catchable, in which case there is no guarantee that any memory will ever be freed up and you are back to square one.

I think it's possible to make V8 more resistant to out of memory situations. I don't think it's possible to make it bulletproof, and I don't think there are many server apps that have this property. Do people run Java servers in such a way that they are often getting out of memory exceptions, recovering, and then continuing to serve? I don't think so.

In practice the way most servers work is that you give them plenty of memory and you write your server app in such a way that it does not use unlimited memory.

If there are non-out-of-memory errors that V8 is failing to recover from then these are bugs and should be reported. I can't think of any examples off-hand.

As far as the other comments go they seem to assume that you will want to use a V8 context per connection. Node uses one V8 context for all connections, so the comments don't apply. Context creation has been speeded up a lot since the article was written, but this is only for the browser. Node doesn't need it.

Re: The author of Nginx on why V8 is not suitable for web servers

#47

IIRC, 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.)

Re: The author of Nginx on why V8 is not suitable for web servers

#50
in russian : Почему Google V8 пока не подходит для встраивания в серверы in english : Why is Google V8 is not suitable for integration into servers.

There is a word "integration" that the author of the post forgot to put in.

Post reply on HN