Reverse proxy #883
Replies: 1 comment 5 replies
-
The problem with projects like these (and there are tons of them) is that people generally believe performance is an additive, as in, they believe that as long as I somehow shoe-horn this "fast brand" into my project, regardless of how - it will magically apply the traits of "fast brand" onto whatever product one is building. We saw this very clearly in 2016 where people shoe-horned uWS into Socket.IO and saw no significant improvement, but went around believing they had fixed all problems in the world with a click of a button. So the message got consumed & ignored and people continued making the same old shit they had made before. In reality, performance is a subtractive, as in - the lowest common denominator makes up your end performance. If you still encourage people to mix uWS with Express - you are encouraging people to build products with dreadful performance. It is way better, to let people build something good from the ground up, than to persuade them into making something half-assed because they cannot take the time to invest some basic amount of time & attention into something that performs way better. |
Beta Was this translation helpful? Give feedback.
-
I created a reverse proxy using uWebSockets.js that forward any HTTP traffic to the desired HTTP server.
It allows getting uWebSocekts.js performances for your websockets while using whatever HTTP server behind (express, koa, nestjs, ...) on the same port.
It comes at a cost as it adds a (tiny) overhead to your HTTP requests, but you would have needed a proxy to deliver your app through port 443 anyway.
For scenarios where you need to improve websockets performances while having to maintain/enhance an app relying on well-established frameworks, it really helps to quickly move forward. And if you just want to use your favorite framework and all its plugins/extensions/packages without having to rewrite them yourself, uws-reverse-proxy may be a solution that suits your needs :)
GitHub: https://github.com/jordan-breton/uws-reverse-proxy
NPM: https://www.npmjs.com/package/uws-reverse-proxy
Examples: https://github.com/jordan-breton/uws-reverse-proxy-examples
Beta Was this translation helpful? Give feedback.
All reactions