HttpArena

barejs

Emerging · TS · engine: bun · standard configuration · completeness 4/4

JIT-specialized web framework for Bun with zero-allocation context pooling, built-in compression middleware, static file handler, and native WebSocket routing.

Achievements

🥇 2 Gold · 🥈 3 Silver · 🥉 2 Bronze. 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.

MedalAwardFieldRank
🥇 GoldFamily compositeComposite · HTTP/31 of 17
🥇 GoldWithin its languageTS · HTTP/1.11 of 6
🥈 SilverTest profileHTTP/3 · Baseline2 of 17
🥈 SilverTest profileHTTP/3 · Static2 of 17
🥈 SilverTest profileWebSocket · Echo Short-lived2 of 23
🥉 BronzeTest profileHTTP/2 · JSON (h2c)3 of 29
🥉 BronzeTest profileWebSocket · Echo3 of 31

Composite rank

Each profile of a family is worth 1,000 to the entry that leads it, 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.

FamilyRankComposite
HTTP/1.16 of 887018
HTTP/25 of 342498
HTTP/31 of 171133
WebSocket4 of 312552
Database4 of 8912

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.

SuiteToolPassedFailed
HTTP/1.1http11probe d50d818133 of 159 (83.6%)26
HTTP/2h2spec 2.6.0144 of 146 (98.6%)2
HTTP/3h3spec v0.1.1564 of 81 (79.0%)17
WebSocketautobahn-testsuite 25.10.1244 of 244 (100%)0

HTTP/1.1: what failed

TestExpectedGot
RFC9112-2.2-BARE-LF-REQUEST-LINE Bare LF in request line should be rejected, but MAY be accepted (RFC 9112 §2.2, MAY)400 or close (pass), 2xx (warn)505, connection closed
RFC9112-3-CR-ONLY-LINE-ENDING CR without LF as line ending must be rejected (RFC 9112 §2.2, MUST)400, close, or timeout = warn505, connection closed
RFC9112-2.3-HTTP09-REQUEST HTTP/0.9 request (no version) must be rejected (RFC 9112 §2.3, SHOULD)400/close/timeout505, connection closed
RFC9110-5.4-DUPLICATE-HOST Duplicate Host headers with different values must be rejected (RFC 9112 §3.2, MUST)400200, connection left open
COMP-DUPLICATE-HOST-SAME Duplicate Host headers with identical values must be rejected (RFC 9112 §3.2, MUST)400200, connection left open
COMP-HOST-WITH-USERINFO Host header with userinfo (user@host) must be rejected (RFC 9112 §3.2, MUST)400 or close200, connection left open
COMP-HOST-WITH-PATH Host header with path component must be rejected (RFC 9112 §3.2, MUST)400 or close200, connection left open
COMP-OPTIONS-STAR OPTIONS * is the only valid asterisk-form request (RFC 9112 §3.2.4, MUST)2xx or 405; close/timeout = warn400, connection closed
COMP-METHOD-CONNECT CONNECT to an origin server must be rejected (RFC 9110 §9.3.6, SHOULD)400/405/501 or close404, connection left open
COMP-HOST-EMPTY-VALUE Empty Host header value must be rejected (RFC 9112 §3.2, MUST)400 or close200, connection left open
COMP-REQUEST-LINE-TAB Tab as request-line delimiter — SHOULD reject but MAY parse on whitespace (RFC 9112 §3, SHOULD)400 or 2xx; close/timeout = warn505, connection closed
COMP-VERSION-MISSING-MINOR HTTP/1 with no minor version digit is invalid (RFC 9112 §2.3, MUST)400, close, or timeout = warn505, connection closed
COMP-VERSION-LEADING-ZEROS HTTP/01.01 — leading zeros in version digits are invalid (RFC 9112 §2.3, MUST)400, close, or timeout = warn505, connection closed
COMP-VERSION-WHITESPACE HTTP/ 1.1 — whitespace inside version token is invalid (RFC 9112 §2.3, MUST)400, close, or timeout = warn505, connection closed
COMP-CHUNKED-TRAILER-VALID Valid chunked body with trailer field should be accepted (RFC 9112 §7.1.2, MUST)2xx + echo200, connection closed (Echo mismatch: expected "hello", got "helloHTTP/1.1 400 Bad Request Connectio...")
COMP-NO-1XX-HTTP10 Server must not send 1xx responses to an HTTP/1.0 client (RFC 9110 §15.2, MUST)non-1xx response100, connection closed
COMP-VERSION-CASE HTTP version is case-sensitive — lowercase 'http' must be rejected (RFC 9112 §2.3, MUST)400, close, or timeout = warn505, connection closed
COMP-SPACE-IN-TARGET Whitespace inside request-target is invalid (RFC 9112 §3.2, MUST)400, close, or timeout = warn505, connection closed
SMUG-CHUNK-BARE-SEMICOLON Chunk size with bare semicolon and no extension name must be rejected (RFC 9112 §7.1.1, MUST)400 or close200, connection left open
SMUG-CHUNK-EXT-INVALID-TOKEN Chunk extension with invalid token character must be rejected (RFC 9112 §7.1.1, MUST)400 or close200, connection left open
SMUG-MULTIPLE-HOST-COMMA Host header with comma-separated values must be rejected (RFC 9110 §7.2, MUST)400 or close200, connection left open
MAL-NUL-IN-URL NUL byte in URL should be rejected (MUST)400 or close505, connection closed
MAL-LONG-METHOD 100KB method name should be rejected (SHOULD)400, 501 or close431, connection closed
MAL-NON-ASCII-URL Non-ASCII bytes (UTF-8 é) in URL must be rejected (MUST)400 or close404, connection left open
MAL-URL-OVERLONG-UTF8 Overlong UTF-8 encoding of / (0xC0 0xAF) in URL must be rejected (MUST)400 or close404, connection left open
MAL-CHUNK-EXT-64K 64KB chunk extension — tests extension length limits (CVE-2023-39326 class) (NOTAPPLICABLE)400 or 2xx413, connection closed

HTTP/2: what failed

TestExpectedGot
http2/3.5/2 Sends invalid connection prefaceGOAWAY Frame (Error Code: PROTOCOL_ERROR) or Connection closedError: unexpected EOF
http2/6.9.1/3 Sends multiple WINDOW_UPDATE frames increasing the flow control window to above 2^31-1 on a streamRST_STREAM Frame (Error Code: FLOW_CONTROL_ERROR)RST_STREAM Frame (length:4, flags:0x00, stream_id:1)

HTTP/3: what failed

TestExpectedGot
QUIC servers MUST send FRAME_ENCODING_ERROR if a frame is cut short [Transport 12.4]-predicate failed on expected exception: QUICException / TransportErrorIsReceived InternalError "connection error"
QUIC servers MUST send CRYPTO_BUFFER_EXCEEDED if CRYPTO data is buffered beyond the limit [Transport 7.5]-did not get expected exception: QUICException
QUIC servers MUST send unexpected_message TLS alert if KeyUpdate in 1-RTT is received [TLS 6]-did not get expected exception: QUICException
HTTP/3 servers MUST send H3_MESSAGE_ERROR if a pseudo-header is duplicated [HTTP/3 4.3.1]-did not get expected exception: QUICException
HTTP/3 servers MUST send H3_MESSAGE_ERROR if mandatory pseudo-header fields are absent [HTTP/3 4.3.1]-did not get expected exception: QUICException
HTTP/3 servers MUST send H3_MESSAGE_ERROR if prohibited pseudo-header fields are present [HTTP/3 4.3]-did not get expected exception: QUICException
HTTP/3 servers MUST send H3_MESSAGE_ERROR if pseudo-header fields exist after fields [HTTP/3 4.3]-did not get expected exception: QUICException
HTTP/3 servers MUST treat a request with connection as malformed [HTTP/3 4.2]-did not get expected exception: QUICException
HTTP/3 servers MUST treat a request with keep-alive as malformed [HTTP/3 4.2]-did not get expected exception: QUICException
HTTP/3 servers MUST treat a request with proxy-connection as malformed [HTTP/3 4.2]-did not get expected exception: QUICException
HTTP/3 servers MUST treat a request with transfer-encoding as malformed [HTTP/3 4.2]-did not get expected exception: QUICException
HTTP/3 servers MUST treat a request with upgrade as malformed [HTTP/3 4.2]-did not get expected exception: QUICException
HTTP/3 servers MUST treat a request with te as malformed [HTTP/3 4.2]-did not get expected exception: QUICException
HTTP/3 servers MUST send H3_FRAME_ERROR if a SETTINGS frame stops mid-parameter [HTTP/3 7.1]-did not get expected exception: QUICException
HTTP/3 servers treats a repeated setting identifier as an error whatever its value [HTTP/3 7.2.4]-did not get expected exception: QUICException
HTTP/3 servers MUST send H3_ID_ERROR if GOAWAY goes up [HTTP/3 5.2]-did not get expected exception: QUICException
HTTP/3 servers MUST NOT buffer an over-long frame on a control stream [HTTP/3 7.1]-did not get expected exception: QUICException

Every result

Alpha Round, 34 runs. Requests per second is the best of three; latency, CPU and memory come from that run.

CategoryProfileConnsReq/secAvgp99CPUMemory
ConnectionBaseline4,0961,939,8252.11ms4.13ms6730.8%1.5GiB
ConnectionPipelined4,0963,504,60018.70ms26.30ms6442.4%1.4GiB
ConnectionShort-lived4,0961,703,5632.39ms8.37ms6542.4%1.5GiB
ConcurrencyAsync Delay32,0001,837,92317.41ms24.60ms6372.9%1.9GiB
ConcurrencyCON-1M1,000,000250,00084.4us171.0us1051.8%5.0GiB
ConcurrencyCON-1M-TLS1,000,000249,95688.0us193.0us1747.9%8.6GiB
EfficiencyLatency-10K1,0249,97883.0us119.0us43.8%859MiB
EfficiencyLatency-1M1,024997,871126.1us430.0us3517.3%1.2GiB
WorkloadJSON Comp4,096272,14015.04ms32.20ms6303.8%1.6GiB
WorkloadJSON Comp16,384272,87859.95ms97.40ms6182.1%1.7GiB
WorkloadJSON TLS4,0961,088,8453.75ms39.90ms6555.3%1.4GiB
Workload8Gbit51249,349112.5us199.0us430.5%1.1GiB
WorkloadStatic TLS1,024414,8862.63ms29.01ms6571.7%1.7GiB
DatabaseAsync DB1,024250,0484.09ms14.00ms3253.7%916MiB
DatabaseFortunes1,02446,11722.21ms41.20ms3291.2%1.2GiB
HTTP/2Baseline2567,670,8133.22ms9.85ms6147.9%1.7GiB
HTTP/2Baseline1,0247,714,85212.63ms30.81ms6483.0%1.7GiB
HTTP/2Static256576,74714.55ms44.68ms6501.9%2.0GiB
HTTP/2Static1,024571,04255.25ms145.35ms6464.1%2.2GiB
HTTP/2Baseline (h2c)2567,864,3733.20ms10.65ms6281.4%1.7GiB
HTTP/2Baseline (h2c)1,0247,996,67312.25ms29.51ms6431.7%1.8GiB
HTTP/2Baseline (h2c)4,0967,736,84949.03ms91.07ms6471.3%1.8GiB
HTTP/2JSON (h2c)1,0242,350,39213.77ms32.70ms6484.0%1.5GiB
HTTP/2JSON (h2c)4,0962,313,76554.22ms102.42ms6516.0%1.6GiB
HTTP/3Baseline643,597,311972us2.37ms3896.4%1.5GiB
HTTP/3Static64274,72615.43ms100.34ms5423.6%1.9GiB
WebSocketEcho5123,896,423130us370us6370.6%1.0GiB
WebSocketEcho4,0964,112,239996us2.16ms6251.2%1.0GiB
WebSocketEcho16,3843,898,5434.20ms8.40ms6098.6%1.1GiB
WebSocketEcho Pipelined51242,759,846190us514us6562.7%1.5GiB
WebSocketEcho Pipelined4,09643,622,0091.50ms3.05ms6420.5%1.5GiB
WebSocketEcho Pipelined16,38441,036,3236.39ms8.95ms6299.4%1.6GiB
WebSocketEcho Short-lived5122,248,493190us692us5613.4%1.2GiB
WebSocketEcho Short-lived4,0962,539,5881.38ms3.00ms5979.1%1.4GiB

Compared with

The TS web frameworks around barejs 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.

EntryCompositevs barejs
bun5078-28%head to head
elysia3544-49%head to head

Compare barejs with any TS entry · Compare barejs with any entry, in any language · Every TS entry, ranked

Results updated · How the benchmark is run · The machine · Add or fix an entry