barejs-uws
Experimental · TS · engine: uWebSockets.js · standard configuration · completeness 4/4
BareJS web framework running on Node.js with its built-in uWebSockets.js driver, zero-allocation context pooling, built-in compression middleware, static file handler, and native WebSocket routing.
- Official repository
- Official website
- Benchmark implementation
- All TS entries, compared
- Open the leaderboard
Achievements
🥈 2 Silver. Top three of a field, taken in this entry's own league: the family composite, the same composite among entries written in the same language, and each test profile it is scored on. Every field is the one the badges publish, so a medal and a badge always say the same thing. How medals are awarded.
| Medal | Award | Field | Rank |
|---|---|---|---|
| 🥈 Silver | Within its language | TS · HTTP/1.1 | 2 of 3 |
| 🥈 Silver | Test profile | Concurrency · CON-1M-TLS | 2 of 11 |
Composite rank
Each profile of a family is worth its weight × 1,000 to the entry that leads it - 1, or 0.5 apiece for two profiles that measure one thing - and the composite is the sum over the family, less 2.5% for each of routing, middleware, request and response the entry does not do for you - its completeness factor, which the WebSocket and gRPC families do not carry. The field is this entry's own league: engines and reverse proxies are scored apart from frameworks. How it works.
Protocol compliance
The conformance suites this entry subscribes to, run against it on the benchmark machine: Http11Probe on HTTP/1.1, h2spec on HTTP/2, h3spec on HTTP/3 and Autobahn on WebSocket. A score, not part of the composite. How it works.
| Suite | Tool | Passed | Failed |
|---|---|---|---|
| HTTP/1.1 | http11probe d50d818 | 156 of 159 (98.1%) | 3 |
| WebSocket | autobahn-testsuite 25.10.1 | 237 of 244 (97.1%) | 7 |
HTTP/1.1: what failed
| Test | Expected | Got |
|---|---|---|
COMP-OPTIONS-STAR OPTIONS * is the only valid asterisk-form request (RFC 9112 §3.2.4, MUST) | 2xx or 405; close/timeout = warn | 400, connection left open |
COMP-HTTP10-DEFAULT-CLOSE HTTP/1.0 without keep-alive — server should close connection after response (RFC 9112 §9.3, SHOULD) | 2xx + close | 400, connection closed |
COMP-UNKNOWN-METHOD Unrecognized method should be rejected with 501 or 405 (RFC 9110 §9.1, SHOULD) | 501/405/400 or close | 404, connection left open |
WebSocket: what failed
| Test | Expected | Got |
|---|---|---|
1.1.6 Send text message message with payload of length 65535. | Receive echo'ed text message (with payload as sent). Clean close with normal code. | Actual events differ from any expected. / close: The connection was failed by the wrong endpoint |
1.1.7 Send text message message with payload of length 65536. | Receive echo'ed text message (with payload as sent). Clean close with normal code. | Actual events differ from any expected. / close: The connection was failed by the wrong endpoint |
1.1.8 Send text message message with payload of length 65536. Sent out data in chops of 997 octets. | Receive echo'ed text message (with payload as sent). Clean close with normal code. | Actual events differ from any expected. / close: The connection was failed by the wrong endpoint |
1.2.6 Send binary message message with payload of length 65535. | Receive echo'ed binary message (with payload as sent). Clean close with normal code. | Actual events differ from any expected. / close: The connection was failed by the wrong endpoint |
1.2.7 Send binary message message with payload of length 65536. | Receive echo'ed binary message (with payload as sent). Clean close with normal code. | Actual events differ from any expected. / close: The connection was failed by the wrong endpoint |
1.2.8 Send binary message message with payload of length 65536. Sent out data in chops of 997 octets. | Receive echo'ed binary message (with payload as sent). Clean close with normal code. | Actual events differ from any expected. / close: The connection was failed by the wrong endpoint |
10.1.1 Send text message with payload of length 65536 auto-fragmented with <b>autoFragmentSize = 1300</b>. | Receive echo'ed text message (with payload as sent and transmitted frame counts as expected). Clean close with normal code. | Actual events differ from any expected. / close: The connection was failed by the wrong endpoint |
Every result
Alpha Round, 23 runs. Requests per second is the best of three; latency, CPU and memory come from that run.
| Category | Profile | Conns | Req/sec | Avg | p99 | CPU | Memory |
|---|---|---|---|---|---|---|---|
| Connection | Baseline | 4,096 | 688,183 | 5.95ms | 11.30ms | 6453.6% | 5.4GiB |
| Connection | Pipelined | 4,096 | 1,600,988 | 40.88ms | 55.40ms | 6362.7% | 5.8GiB |
| Connection | Short-lived | 4,096 | 651,919 | 6.27ms | 25.80ms | 6350.2% | 5.4GiB |
| Concurrency | Async Delay | 32,000 | 647,056 | 49.45ms | 83.50ms | 6467.6% | 11.1GiB |
| Concurrency | CON-1M | 1,000,000 | 249,965 | 148.0us | 423.0us | 1352.6% | 7595.4MiB |
| Concurrency | CON-1M-TLS | 1,000,000 | 249,969 | 196.0us | 562.0us | 2809.1% | 10.8GiB |
| Efficiency | Latency-10K | 1,024 | 9,982 | 208.4us | 381.0us | 174.1% | 3.7GiB |
| Efficiency | Latency-1M | 1,024 | 788,197 | 1742542.4us | 7989248.0us | 6493.9% | 5.2GiB |
| Workload | JSON Comp | 4,096 | 212,833 | 19.23ms | 61.60ms | 6328.5% | 10.5GiB |
| Workload | JSON Comp | 16,384 | 223,547 | 73.01ms | 165.20ms | 6239.6% | 10.8GiB |
| Workload | JSON TLS | 4,096 | 542,050 | 7.57ms | 143.79ms | 6468.1% | 6.4GiB |
| Workload | 8Gbit | 512 | 49,344 | 227.6us | 590.0us | 1369.6% | 4.9GiB |
| Workload | Static TLS | 1,024 | 155,405 | 8.09ms | 88.19ms | 6490.9% | 8.6GiB |
| Database | Async DB | 1,024 | 98,965 | 10.34ms | 44.40ms | 3262.4% | 4.4GiB |
| Database | Fortunes | 1,024 | 42,958 | 23.86ms | 43.90ms | 3289.8% | 3.9GiB |
| WebSocket | Echo | 512 | 3,518,324 | 144us | 394us | 6447.1% | 2.8GiB |
| WebSocket | Echo | 4,096 | 3,600,865 | 1.14ms | 2.37ms | 6580.7% | 2.9GiB |
| WebSocket | Echo | 16,384 | 3,323,411 | 4.93ms | 9.40ms | 6544.9% | 3.0GiB |
| WebSocket | Echo Pipelined | 512 | 20,764,208 | 393us | 1.04ms | 6745.0% | 2.9GiB |
| WebSocket | Echo Pipelined | 4,096 | 20,793,091 | 3.15ms | 5.26ms | 6527.3% | 2.9GiB |
| WebSocket | Echo Pipelined | 16,384 | 20,167,248 | 13.01ms | 17.20ms | 6281.9% | 3.1GiB |
| WebSocket | Echo Short-lived | 512 | 2,063,261 | 199us | 686us | 5779.1% | 2.9GiB |
| WebSocket | Echo Short-lived | 4,096 | 2,476,937 | 1.35ms | 3.92ms | 6078.7% | 3.3GiB |
Compared with
The experimental TS frameworks around barejs-uws on the HTTP/1.1 composite, and the one leading them. Entries of other leagues are left out: a composite does not carry from one league to another. The last column shows every profile side by side.
| Entry | Composite | vs barejs-uws | |
|---|---|---|---|
| barejs | 4257 | +106% | head to head |
| swerverts | 721 | -65% | head to head |
Compare barejs-uws with any TS entry · Compare barejs-uws with any entry, in any language · Every TS entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry