Webserver Benchmark: Erlang vs Go vs Java vs NodeJS

7 Likes

Hi,
Interesting findings. But maybe next time you can create a simple todo list with sort in all the languages and perform some real operations.

Also the app should have an auth system and some database transactions.

Then i think your comparison can provide more results to help others decide what technology to use.

2 Likes

I think this brings the question of where the bottleneck is.

In the todo list app it may be on the database side and then we are benchmarking the database–not the webserver. It maybe in the sorting algorithm and then we are benchmarking various implementations of sorting. If we build the app for the bottleneck to be in the webserver, we, in essence, have the ideal database and the ideal sorting algorithm. Such ideal components have no impact on the performance and therefore can be replaced with what essentially amounts to no-op.

4 Likes

As i said earlier developers use all this to create an app so unless you create something that doesn’t have any need for an auth system database and so on, your comparison doesn’t help others see the advantages.

Also if you ever create something useful using only the web servers without a database or an auth system, please let me know.

I am very interested to see something that makes money that way.

Thanks for posting @kt315

1 Like

@kt315 Thanks for these. It’s really interesting to see your various findings re: Cowboy’s HTTP2 jump slowing it noticeably down.

Is Essen (Cowboy) aware and if so has he had a response to date?

There are previous related articles and a discussion of those, but the short answer is yes, Essen knows and there is work underway to try addressing part of the problems.

4 Likes

I don’t think this part contributes anything to what you’re trying to say and is needlessly antagonistic.

Your point - that it would be better to make technology decisions based off of a more complete scenario - is a fair point, but kt315’s point that it can be valuable to benchmark pieces in isolation is also fair.

6 Likes

Thanks much! Great links over there.

EDIT: Essen even props back to Stressgrid benchmarks. Cool stuff.

1 Like

Simply put: if you never do even a simple load-testing session to factually ascertain the limits of your hosting then you’ll never see the benefits of tech like Erlang/Elixir. So you should just write your app in whatever technology you are comfortable with.

Most of the comments on this forum that are dismissive towards Erlang/Elixir seem to come from people who never needed their strong points in the first place (or don’t realise those problems exist). Sadly this creates a skewed reality for those people so they assume the BEAM machinery – or any other tech they aren’t willing to learn – is not needed / good / mature / useful.

This is not an universal methodology. I use programming to make money and I’m interested in the complete picture, not to only check if aspect X of technology Y is good.

I use your line of thinking when I’m evaluating hobby / tinker projects, mind you. I never use the same way of judging technology in my professional work though.

3 Likes

Benchmarking pieces in isolation is very valuable for eliminating technologies, less so for choosing them.

3 Likes

That I fully agree with. Sorry if I was unclear.

Oh I don’t feel like you were unclear, just adding my perspective :wink:

1 Like

Our opinions may differ and i prefer to test the whole ecosystem before i take any decisions. If you are satisfied with some string messages and a sleep function.

That is also good for you. But in the real world we have all I mentioned at the minimum(web server, db, auth).

So i was genuine curious if he/she can really make money only with that.

I had no ill intent just a different opinion.

Thanks for your opinion @bennelsonweiss

1 Like

I think people evaluating technology can gain a lot from reading this paragraph in the article:

Notably, all Erlang-based servers, once overloaded, maintained stable response latency, with Cowboy 1.x keeping it around 250 milliseconds! Go and Java servers were getting progressively slower. Non-clustered NodeJS, limited by utilizing only one CPU, was the slowest. The results for clustered NodeJS and Rapidioid were inconclusive since they ran out of available RAM.

So, if you want predictable performance, Erlang/Elixir is the tech for you.

2 Likes

booooooooooring! :rofl:

…Until you get called as a consultant on a project they fired you for doing a good job at (and missing a 3-month deadline by 1 week because that’s obviously a huge deal-breaker) and you fix all their scaling problems in the next 2 weeks. :stuck_out_tongue:

3 Likes

I hope you gave them the special 2s-complement discount :wink:

Of course I did. I charged 2x more than before. (But that was like 18 months ago.)

I absolutely love it how people constantly underestimate Elixir and then praise the programmer that saves their business with it. And then still have the audacity to ask “this is in PHP, right”? :003:

3 Likes

This is SPARTA! :slight_smile:

1 Like

With a better tuned webserver you can reach 3x cowboy thruput, see here 300k requests per second webserver in elixir! OTP21.2 - 10 cores.

Could even get up to 6x RPS (compared to cowboy) if you simply echo a static reply.