-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore uWebSockets as a ws alternative #16579
Comments
I checked uWebSockets.js and I think it has the following problems to be used in Vite:
Even if these problems were solved, it has a big package size even for a single platform (5MB; ws is 143kB), so it would need to improve the perf significantly to make it worth. |
Thanks for the checks, I opened uNetworking/uWebSockets.js#1120 Second point can be (partially) achieved with uNetworking/uWebSockets.js#1112 |
Closing this as I guess the WS server perf is not the bottleneck for Vite. But feel free to create a new issue if you have proved that that is a bottleneck even for some cases. |
Description
I learned about https://github.com/uNetworking/uWebSockets.js which is a faster alternative to ws.
Bun uses a fork of it for WebSockets, and based on these HTTP server benchmarks, uWebSockets.js via Node is actually faster than bun.
More benchmarks: uNetworking/uWebSockets#1415
I'm not sure how much of a bottleneck ws is, but it may be worth exploring.
Suggested solution
Explore adopting uWebSockets.js
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: