Live data from Hacker News

How Raygun increased throughput 20x with .NET Core over Node.js

raygun.com

41–50 of 61 posts

Re: How Raygun increased throughput 20x with .NET Core over Node.js

#41
Has anyone any code they can show which performs the same job on both and is close to comparing apples to apples? It'd be interesting to me, not for performance comparison, but as a real world application structure comparison, a kind of more advanced Rosetta Code[1] example.

[1] http://rosettacode.org/wiki/Rosetta_Code

Re: How Raygun increased throughput 20x with .NET Core over Node.js

#42

> From the questions we received around the specifics of our performance improvements, there seems to be two schools of thought: > 1. Of course it’s faster, Node is slow > 2. You must be doing Node wrong, it can be fast Allow me to offer a third :) When you rewrite something, it had better be faster! You know a lot more about how it works and how it's used than you knew at the outset. There was a recent post, about g…

Hey! Where could I find this post?

Re: How Raygun increased throughput 20x with .NET Core over Node.js

#43
post #27

Earlier quoted context omitted.

> The fact that they were only getting 1k reqs/sec with Node gives me concern. It clearly shows something went wrong there very early on at a very fundamental level. Because the program is performing CPU compute for each request. Node is single threaded. It's a shame that the Node project killed off the multithreaded web workers pull request. It sorely needs that functionality. Pools of node processes are a poor subs…

Looking at my Prometheus stats right now, I've got a Node TCP server doing 12k concurrent connections with 3-5% CPU and 130 MB memory. At least 4 DB queries are done per request, sometimes 10 queries. Raygun either has some nonobvious stuff going on, or Microsoft paid them to write PR fluff. After 6 years with Node it seems odd for their performance to be so bad. They should dive into more technical details to explai…

You've described a classic I/O bound server application (waiting on the database) that Node handles well. As soon as you introduce serious computations or server side rendering into the request handling performance would fall dramatically.

Re: How Raygun increased throughput 20x with .NET Core over Node.js

#44
post #43
post #27

Earlier quoted context omitted.

Looking at my Prometheus stats right now, I've got a Node TCP server doing 12k concurrent connections with 3-5% CPU and 130 MB memory. At least 4 DB queries are done per request, sometimes 10 queries. Raygun either has some nonobvious stuff going on, or Microsoft paid them to write PR fluff. After 6 years with Node it seems odd for their performance to be so bad. They should dive into more technical details to explai…

You've described a classic I/O bound server application (waiting on the database) that Node handles well. As soon as you introduce serious computations or server side rendering into the request handling performance would fall dramatically.

And Raygun, according to what the website says it does, is doing a significant amount of work.

Re: How Raygun increased throughput 20x with .NET Core over Node.js

#45

Here's what I read: they had a solution written in Node.js; they rewrote the solution in .NET Core; it was 20x faster. It's anecdotal, sure, and Microsoft prompted them to write it, and YMMV, but they did a thing and it had a remarkable result so they've remarked on it. It's not realistic to expect them to take the time to build a representative sample that doesn't expose any of their proprietary business logic; they…

The biggest problem with .NET Core imo is that .NET just seems to be permanently uncool, despite how good it is. Maybe one day this industry will be less fashion driven...

Re: How Raygun increased throughput 20x with .NET Core over Node.js

#46
post #45

Here's what I read: they had a solution written in Node.js; they rewrote the solution in .NET Core; it was 20x faster. It's anecdotal, sure, and Microsoft prompted them to write it, and YMMV, but they did a thing and it had a remarkable result so they've remarked on it. It's not realistic to expect them to take the time to build a representative sample that doesn't expose any of their proprietary business logic; they…

The biggest problem with .NET Core imo is that .NET just seems to be permanently uncool, despite how good it is. Maybe one day this industry will be less fashion driven...

I'd love to use it, but being Windows only for years was a non-starter for me.

Re: How Raygun increased throughput 20x with .NET Core over Node.js

#47

Earlier quoted context omitted.

Duh, yes, of course the logic makes it much slower than copying a L1 cached static response to the client. But then that is not a use case anyone cares very much about. The AgeOfAscent story is not a PR piece, the writer (Ben Adams) is a very active contributor to the Kestrel server behind .NET Core. If he's writing about improved performance it's probably because he wrote >1/3rd of the patches.

Duh, yes, of course What a weirdly trite response given that you're essentially repeating what I said. And without specifics the linked piece, and its claims about benchmarks, is utterly meaningless. "Rewrote inefficient code. Now it's faster. Story at 11!" The AgeOfAscent story is not a PR piece Humorously it was likely a "copy a L1 cached static response" type benchmark. Okay, so it wasn't PR, it was self-aggrandiz…

yea that is caveat for comparing numbers in a simple http payload benchmark -- doesn't really reflect real workloads. I don't think it's meaningless that .NET got better. Perhaps more competition is better, otherwise we'd all be using Java/netty. However, I also see the repetitive work in having different stacks.

Re: How Raygun increased throughput 20x with .NET Core over Node.js

#48

The fact that they were only getting 1k reqs/sec with Node gives me concern. It clearly shows something went wrong there very early on at a very fundamental level. By no means is Node the end-all be-all for performance by any measure, but you should definitely be getting much much higher throughput than 1k reqs/sec. Simply booting up a single core http server should net you around 4-5k requests per second. Spin up an…

As the sibling comment points out, your middleware that has a 30k req/sec hello world may slow down to 500 req/sec on a production server once it's competing with everything else on the thread.

Re: How Raygun increased throughput 20x with .NET Core over Node.js

#49

It looks like they ran their last node.js benchmark around Sep 2015. I'm curious if this was still with node.js v0.x, or if they had already adopted the latest version of io.js (3 or maybe 4).

Or node.js v6.x for that matter. Seeing as io.js has merged back into node.

Re: How Raygun increased throughput 20x with .NET Core over Node.js

#50
post #45

Earlier quoted context omitted.

The biggest problem with .NET Core imo is that .NET just seems to be permanently uncool, despite how good it is. Maybe one day this industry will be less fashion driven...

I'd love to use it, but being Windows only for years was a non-starter for me.

.NET core is cross platform. It is also far more performant than traditional .NET. The new framework is a huge leap forward.
Post reply on HN