nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
https://nestjs.com
MIT License
67.76k stars 7.64k forks source link

Transport Layer: uWebSockets.js #1570

Closed Brian-McBride closed 5 years ago

Brian-McBride commented 5 years ago

I'm submitting a...


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Performance Boosts

There is always a lot of talk about the speed of Golang vs NodeJS. Although Go is a great language, I like the idea of speeding up our NodeJS stack.

The article: https://levelup.gitconnected.com/will-node-js-forever-be-the-sluggish-golang-f632130e5c7a

The repo: https://github.com/uNetworking/uWebSockets.js

It is an intro to an external C++ network layer that (they claim) is seriously faster than anything we currently have (way faster than Fastify). The graph below is from the article with uWebSockets on the far right. Almost twice as fast as Golang.

image

marcj commented 5 years ago

Take care: uWebSockets.js is written by the same guy as https://www.npmjs.com/package/uws where he tried to break installations by pushing empty releases. Background: https://www.reddit.com/r/node/comments/91kgte/uws_has_been_deprecated/ - see comments. I recommend not to use any software from him anymore.

kamilmysliwiec commented 5 years ago

We definitely won't rely on this. Anyway, if anyone still wants to use this library, there is a documentation for this https://docs.nestjs.com/websockets/adapter

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.