DEV Community

Cover image for Is switching from Express to Fiber worth it? 🤔

Is switching from Express to Fiber worth it? 🤔

Vic Shóstak on April 01, 2020

Introduction Good news, everyone! 😉 We did it! Fiber version 1.8.43 scored awesome benchmark results! Now we hold a strong third place o...
Collapse
 
nexovec profile image
nexovec

I'd like to say this great article is rather outdated imo.

Collapse
 
sirajulm profile image
Sirajul Muneer

Does Fiber achieve this performance with a single thread, like Express does? If not then Fibre is not qualified to be compared with Express yet.
Also you miss express from the test results entirely, which should not happen when you compare them.

Collapse
 
fenny profile image
Fenny • Edited

@abdulmannan3 , both Fiber & Express used all cores in the benchmark, see source:
github.com/TechEmpower/FrameworkBe...
github.com/TechEmpower/FrameworkBe...

@Sirajul, you can filter the results by displaying Fiber & Express only:
techempower.com/benchmarks/#sectio...

I uploaded the comparison on our wiki: fiber.wiki/benchmarks

Collapse
 
koddr profile image
Vic Shóstak

You can see on TechEmpower site all results, included Express: link was on top of article... but okay, I add some screenshots to article, no problem! 😉

Collapse
 
abdulmannan3 profile image
abdulmannan3

What about the single thread part?

Thread Thread
 
koddr profile image
Vic Shóstak • Edited

Please read Project Information Framework Tests Overview for more understand, how TechEmpower does its benchmarks for each web framework.

Collapse
 
alx77 profile image
Alexey Furmanov

Seems like they used 14core(28threads) cpu to prove us that multithreading is the King ;)

Collapse
 
skarthikdurai profile image
skarthikdurai

We are seriously considering to switch from Java(spring cloud) to some go Framework. Would you compare it with Spring cloud? we are looking features like Service discovery, orchestration etc and support to gRPC(important).

Collapse
 
fenny profile image
Fenny • Edited

Fiber does not have HTTP/2 support unless you use a reverse proxy like cloudflare, nginx, f5, incapsula etc. I don't have much experience with the Spring cloud framework, but I don't think making the switch is worth it if your application relies on gRPC. However, HTTP/2 is being worked on github.com/valyala/fasthttp/issues... and when this is ready, the gRPC protocol could follow!

Collapse
 
skarthikdurai profile image
skarthikdurai

Thank you. We are still running in Http 1.1 and not going to grpc for some time now.
However I'm looking for complete framework support for microservices architecture like service discovery, orchestration, tracing, health monitor as we are not using kubernate

Collapse
 
entrptaher profile image
Md Abu Taher

I don't see express in any of the screenshots but only in the text. 🤔 Am I missing something or the images are not loading properly?

Collapse
 
koddr profile image
Vic Shóstak • Edited

You can see all frameworks and results here, including Express. I will add some screenshots, might be more convenient! 😉

Collapse
 
entrptaher profile image
Md Abu Taher

I was reading from mobile and the link just doesn't load properly in mobile, so I just got disappointed.

Thanks for sharing anyway. Appreciate it. Will take a look from desktop.

Collapse
 
cekvenich profile image
cekvenich

Op appears evasive on therding question. It is possible he did not thread node but did on Go Lang. Likely some sort of marketing.

Collapse
 
akayami profile image
Tomasz Rakowski

How about you compare yourself to gin ? Doing a speed comparaison to a node framework is cheap. Any golang framework should beat any js framework unless the golang dev is particularly incompetent.

Collapse
 
koddr profile image
Vic Shóstak

Hi Tomasz, as you can see in the benchmarks we do compare Fiber with all web frameworks in any language (including gin). Since Fiber is heavily based on the Express API, I think it does no harm to include the results. Regarding the overwhelming results, it has nothing to do with Express but rather with Nodejs.

You can filter specific frameworks in the benchmark results, here I only enabled Fiber & Gin here 👍

Collapse
 
akayami profile image
Tomasz Rakowski

I'll take a look at it this weekend and do some more bench marking myself against gin.

Collapse
 
freedom profile image
Freedom

On the other hands, gnet is very fast in plaintext, could be deserve attention for specific use case.

Collapse
 
josephsintum profile image
Joseph Sintum

Here is another benchmark
github.com/the-benchmarker/web-fra...

fasthttp does really well while fiber is average
I might be the fiber implementation

Collapse
 
fenny profile image
Fenny

Hi Joseph, we are aware of the results of those benchmarks. We had contact with the owner and he confirmed that those are invalid results and therefore it's not production-ready yet.

Rank 28 - 41 are all limited to the benchmarked machine, I suggest checking out a more stable benchmark project like TechEmpower techempower.com/benchmarks/#sectio...