Which is the fastest web framework? (Link/Repo and results in this Topic)

Yes, the work on concurrent is really promising–might be worth another look around the end of the year.

C isn’t a good choice.

Nim is doing well :slight_smile:

Why not? If performance is the only thing you care about, how could you say it’s not a good choice? Isn’t C fast enough?

I know that you might be agreeing with some of my arguments that C can be a problem as for productivity and tooling, which then leads us to the final conclusion: perfomance is not everything.

A post that helped me a lot on this thoughts was this one: http://blog.plataformatec.com.br/2017/07/the-fallacies-of-web-application-performance/.

Thanks @josevalim for it! :purple_heart::green_heart::blue_heart::heart::blue_heart::green_heart::purple_heart:

No. You wrongly assume that

When we talk about benchmarks the answer is depends all of different situations. But we expect a unprofessional certain answers.

So this, for bechmark Rails is 1X Phoenix is 10X some another crystall and go frameworks 12X.
Support, productive Rails is 12X Phoenix 10X some another crystall and go frameworks 1X.
Overall Phoenix 100X, Rails and Crystall, Go webframeworks 12X
:grinning:

Well, forgive me then. Really sorry, I really didn’t understand your intentions with the short and direct answers like these:

But anyways, I hope my answers were clear, informative and didn’t offend you in any way. If that’s the case: I’m really sorry about it, just tell me what it was and I’ll try to be more careful the next times.

I also hope that you got convinced that Elixir is not slow compared to Ruby too. I kind of lost myself into the “performance is not everything” argument, but I know it plays a very important role on our work, and other people here already posted some benchmarks where Elixir is really fast compared to interpreted languages like Ruby.

But I would say one last thing: don’t blindly trust what we (or everyone else) are showing you, benchmarks can be manipulated, just try out Elixir yourself, and if you don’t like it, well, at least you tried it. :wink:

Thanks for reading my big posts, and sorry about them too.

5 Likes

I just came across Vapor, a web framework for Swift. In their version 3 announcment they include some benchmarks, but I’m a little confused as Phoenix seems to be much slower there than measured in this thread (if I didn’t misinterpret):

The Benchmark was made a year ago but I wouldn’t expect the difference to be that big.

I just took a quick look and for example it’s easy to see why sinatra is beating phoenix. The phoenix implementation has logging on and the sinatra one has it off. I wouldn’t pay a lot of attention to it. Not to mention the pointlessness of measuring throughput of plaintext requests on a web framework.

3 Likes

The cowboy config isn’t optimized either. Increasing the max connections would probably help a lot here.

2 Likes

In addition to phoenix being not set up properly, I’m noticing they aren’t bench’ing nim, rust, or C++ any frameworks, all of which in my testing beat everything else there pretty handidly, which is more of the level of swift as a lower level language.

Also what on earth on sinatra, no way it has ever beat phoenix in my tests here, no where near… o.O

How many cores are they testing with? How many concurrent connections? Is keep-alive used? HTTP2 used?

1 Like

I wish people would stop bringing up those biased and poorly made benchmarks. They are nothing more than opinion pieces and this has been proven, time and again, in several language communities – not only Elixir’s.

The naked truth is that the their authors have a preliminarily chosen winner and they don’t fine-tune its contenders as well as they tune it. As people here (and in many other places) have pointed out, most contenders use out-of-the-box / suboptimal settings while the chosen winner is usually tuned to [near] perfection.

So I guess the usual bottom line of these opinion pieces is: “if you tune it well enough, it will be fast”. A mind-blowing revelation indeed.

1 Like

Some fun bits on my own test, I didn’t tune the actix-web framework in rust, the evhttp framework in C++, or the …whateveritwascalled framework in nim and they all significantly outperformed everything else by significant margins; in go some ‘router’ framework got kind of close but that was about it.

Dynamic languages like Erlang/Elixir need more tuning of their runtime for production and that’s a fact of life.

Compiled, especially strongly and statically typed, languages will always have an edge in out-of-the-box setups (unless they come heavily loaded with a lot of metrics and logging event emitting).

1 Like

That’s generally what I think of when I think of configuration, the stuff like logging and connector pools and such, not necessarily VM level stuff (which requires a whole different skillset).

1 Like