Live data from Hacker News

Redbird: A modern reverse proxy for Node

github.com

71–77 of 77 posts

Re: Redbird: A modern reverse proxy for Node

#71
post #41

Earlier quoted context omitted.

Do you know of a performance benchmark that shows the current status? I can't find many that describe node not at those levels of performance, Especially against Ruby.

Sure: https://iwf1.com/apache-vs-nginx-vs-node-js-and-what-it-mean... I haven't seen anyone compare Ruby to node perf, unless there's a non blocking variant of Ruby (looks like nio4r), in which case it would have similar perf. Likewise node vs Python Tornado would be a good comparison. Thing is, nio4r and Tornado aren't the standard library. Whereas node's stdlib is: node's file and socket read operations etc are non…

That resource looks like node is faster than those other languages? I think you might be getting the down votes because your comment is being interpreted that it is slower.

Re: Redbird: A modern reverse proxy for Node

#72
I'm surprised no one mentioned the threading situation in the comments. The main reason why you need a reverse proxy (like nginx) on top of your express app is because node.js is single-threaded. Yes, you can fork (which means a new process and IPC), but that's even more of a performance hog.

If you have to serve a large static file - guess what... no other request gets processed at the same time. It's a neat idea but until we get true multi-threading in Node.js, I'll stick with my nginx, thank you very much.

Re: Redbird: A modern reverse proxy for Node

#73
post #68
post #66

Earlier quoted context omitted.

> I think sometimes people think node is ruby/python/php levels of performance. It isn't. Except, it is ruby/python/php slow: https://www.techempower.com/benchmarks/#section=data-r17&hw=... All of PHP, Ruby, and Python beat Node.js in the above-linked benchmark.

Raw number crunching performance is similar with Node and Go. Python and ruby are in different league than them. https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Do you think this discussion or the OP is about "[r]aw number crunching performance" ?

Re: Redbird: A modern reverse proxy for Node

#75
post #72

I'm surprised no one mentioned the threading situation in the comments. The main reason why you need a reverse proxy (like nginx) on top of your express app is because node.js is single-threaded. Yes, you can fork (which means a new process and IPC), but that's even more of a performance hog. If you have to serve a large static file - guess what... no other request gets processed at the same time. It's a neat idea bu…

Wait, what?

Node is very happy to asyncronously stream chunks of data over HTTP. You could write a blocking server by collecting the whole response in memory and sending it out all at once, but that’s not required by Node.

This is literally the reason Node even exists, nonblocking I/O with a simple threading model. You can have a million open connections all asynchronously nibbling data as the buffers empty.

Re: Redbird: A modern reverse proxy for Node

#76

Earlier quoted context omitted.

No, node was the realization that JS’s concurrency model could be applied to applications like this.

No? You're not even disagreeing with the parent.

I am, but it is subtle.

Re: Redbird: A modern reverse proxy for Node

#77
post #67
post #6

I think the readme is missing a "why not" section. For example: why not use nginx instead, which more people have experience with.

One reason might be that nginx is implemented in a memory-unsafe language.

As opposed to node with runtime implemented in C++?
Post reply on HN