Rust-backed Node.js WebSocket library beats uWebSockets by 46% using native echo path
A developer built ramjet-ws-js, a WebSocket server for Node.js powered by a Rust networking core, and benchmarked it against uWebSockets.js across 584 million verified round-trips. The library introduces an opt-in native execution path called nativeEcho, which keeps message frames inside the Rust reactor and bypasses the V8 JavaScript engine entirely for eligible messages. This approach lifted throughput from roughly 400,858 to 587,912 requests per second, a 46.7% gain within the same application. A notable finding was that at exactly 64 KiB message size, Ramjet was 8.42% slower than uWebSockets — a gap traced back to a 14-byte boundary in frame handling. Both servers were tested under identical conditions on an AWS C7i.large instance running Node.js 22.16.0, with results reported as medians across three measured runs.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in