Live data from Hacker News

Server-Side I/O Performance: Node vs. PHP vs. Java vs. Go

toptal.com

21–30 of 59 posts

Re: Server-Side I/O Performance: Node vs. PHP vs. Java vs. Go

#23
post #9

The article talks about IO, but then benchmarks sha256. The node program doesn't work well because he's synchronously doing this: for (var i = 0; i He should be using crypto and the async versions. This benchmark actually is just measuring the speed of your sha256 implementation, which I would guess is equal on all 4 platforms if you actually do them correctly.

Yeah, if you are running node in production on a multicore machine you want to run multiple node instances...

I do find it hilarious that the article talks IO and then benchmarks a CPU bound app.

Re: Server-Side I/O Performance: Node vs. PHP vs. Java vs. Go

#25

Pet peeve: tech articles/blogs which do not prominently display when the article was written. This is the single most important fact I search for before reading time sensitive tech info. I can't tell when this was written, am I missing something?

I have closed articles before because there is no date. Not about to waste my time with something that could potentially be years old.

Re: Server-Side I/O Performance: Node vs. PHP vs. Java vs. Go

#26
post #18

Earlier quoted context omitted.

Yeah that perplexed me as well. There's no reason you can't get a modern Java app server to do async io coupled with thread pools and achieve performance close to Go. Maybe Go's coroutines vs Java native threads may give Go a little advantage but it shouldn't be a great difference for sanely designed applications.

Netty would be one possible option, but he selectively left out everything that could jeopardize Go's victory.

[deleted]

Re: Server-Side I/O Performance: Node vs. PHP vs. Java vs. Go

#28
post #18

Earlier quoted context omitted.

Yeah that perplexed me as well. There's no reason you can't get a modern Java app server to do async io coupled with thread pools and achieve performance close to Go. Maybe Go's coroutines vs Java native threads may give Go a little advantage but it shouldn't be a great difference for sanely designed applications.

Netty would be one possible option, but he selectively left out everything that could jeopardize Go's victory.

Yah, the Netty model is more in-line with Go's programming model.

Re: Server-Side I/O Performance: Node vs. PHP vs. Java vs. Go

#29

I'm curious, which Java servers are creating a new Thread per request? Tomcat uses acceptors threads and a request executor pool. And, if available on your platform (which it probably is), it defaults to using non-blocking IO instead of polling. EDIT: It looks like he does acknowledge the executor threads are pooled. His main criticism is that "too many blocked threads are bad for a scheduler". But if Tomcat is using…

It does seem the author has way outdated information or set up the benchmark to tilt the balance in certain way.

A more comprehensive benchmark is done here. https://www.techempower.com/benchmarks/#section=data-r14&hw=...

Re: Server-Side I/O Performance: Node vs. PHP vs. Java vs. Go

#30
post #17

So he acknowledges that has not benchmarked the best options for Java and then selects Go as a winner, what a joke.

Same with Php, using really old versions of it. This is a waste of time article, nothing is learned from it appart the bias of the author.
Post reply on HN