ktor-tuned
Flagship · Kotlin · engine: netty · tuned configuration · completeness 4/4
JetBrains Ktor 3.x on Netty with Ghost Serializer, JDK 25.
Achievements
🥇 2 Gold. 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 |
|---|---|---|---|
| 🥇 Gold | Within its language | Kotlin · HTTP/1.1 | 1 of 5 |
| 🥇 Gold | Within its language | Kotlin · HTTP/2 | 1 of 3 |
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.
| Family | Rank | Composite |
|---|---|---|
| HTTP/1.1 | 36 of 114 | 2873 |
| HTTP/2 | 27 of 45 | 590 |
| HTTP/3 | 16 of 22 | 200 |
| WebSocket | 33 of 41 | 502 |
| Database | 11 of 11 | 167 |
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 | 125 of 159 (78.6%) | 34 |
| HTTP/2 | h2spec 2.6.0 | 130 of 146 (89.0%) | 16 |
| HTTP/3 | h3spec v0.1.15 | 58 of 81 (71.6%) | 23 |
HTTP/1.1: what failed
| Test | Expected | Got |
|---|---|---|
RFC9112-5.1-OBS-FOLD Obs-fold (line folding) in headers should be rejected (RFC 9112 §5.1, MUST) | 400 | 200, connection left open |
RFC9112-7.1-MISSING-HOST Request without Host header must be rejected with 400 (RFC 9112 §3.2, MUST) | 400 | 200, connection left open |
RFC9112-2.3-INVALID-VERSION Invalid HTTP version must be rejected (RFC 9112 §2.3, SHOULD) | 400/505, close, or timeout = warn | 200, connection left open |
COMP-HOST-WITH-USERINFO Host header with userinfo (user@host) must be rejected (RFC 9112 §3.2, MUST) | 400 or close | 200, connection left open |
COMP-HOST-WITH-PATH Host header with path component must be rejected (RFC 9112 §3.2, MUST) | 400 or close | 200, connection left open |
COMP-ASTERISK-WITH-GET Asterisk-form (*) request-target with GET must be rejected (RFC 9112 §3.2.4, MUST) | 400, close, or timeout = warn | 404, 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 = warn | 404, connection left open |
COMP-UNKNOWN-TE-501 Unknown Transfer-Encoding without CL should be rejected with 501 (RFC 9112 §6.1, MUST) | 400/501 or close | 200, connection left open |
COMP-METHOD-CONNECT CONNECT to an origin server must be rejected (RFC 9110 §9.3.6, SHOULD) | 400/405/501 or close | 404, connection left open |
COMP-HOST-EMPTY-VALUE Empty Host header value must be rejected (RFC 9112 §3.2, MUST) | 400 or close | 200, 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 = warn | 404, connection left open |
COMP-DATE-HEADER Origin server must include Date header in responses (RFC 9110 §6.6.1, MUST) | 2xx with Date header | 200, connection left open |
COMP-VERSION-CASE HTTP version is case-sensitive — lowercase 'http' must be rejected (RFC 9112 §2.3, MUST) | 400, close, or timeout = warn | 404, connection left open |
SMUG-TE-XCHUNKED Transfer-Encoding: xchunked must not be treated as chunked (RFC 9112 §6.1, MUST) | 400/501 or close | 200, connection left open (Used CL (ignored TE variant)) |
SMUG-CHUNK-BARE-SEMICOLON Chunk size with bare semicolon and no extension name must be rejected (RFC 9112 §7.1.1, MUST) | 400 or close | 200, 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 close | 200, connection left open |
SMUG-CHUNK-UNDERSCORE Chunk size with underscores (1_0) must be rejected (RFC 9112 §7.1, MUST) | 400 or close | 200, connection left open |
SMUG-TE-EMPTY-VALUE Transfer-Encoding with empty value must be rejected (RFC 9112 §6.1, MUST) | 400 or close | 200, connection left open (Used CL (ignored TE variant)) |
SMUG-CHUNK-HEX-PREFIX Chunk size with 0x prefix must be rejected (RFC 9112 §7.1, MUST) | 400 or close | 200, connection left open |
SMUG-CHUNK-SIZE-PLUS Chunk size with leading plus sign must be rejected (RFC 9112 §7.1, MUST) | 400 or close | 200, connection left open |
SMUG-CHUNK-SIZE-TRAILING-OWS Chunk size with trailing whitespace before CRLF must be rejected (RFC 9112 §7.1, MUST) | 400 or close | 200, connection left open |
SMUG-CHUNK-LEADING-SP Chunk size with leading space must be rejected (RFC 9112 §7.1, MUST) | 400 or close | 200, connection left open |
SMUG-CHUNK-MISSING-TRAILING-CRLF Chunk data without trailing CRLF must be rejected (RFC 9112 §7.1, MUST) | 400 or close | 200, connection left open |
SMUG-CHUNK-SPILL Chunk declares size 5 but sends 7 bytes — oversized chunk data must be rejected (RFC 9112 §7.1, MUST) | 400 or close | 200, connection left open |
SMUG-CHUNK-EXT-CTRL NUL byte in chunk extension must be rejected (RFC 9112 §7.1.1, MUST) | 400 or close | 200, connection left open |
SMUG-CHUNK-EXT-CR Bare CR (not CRLF) in chunk extension — some parsers treat CR alone as line ending (RFC 9112 §7.1.1, MUST) | 400 or close | 200, connection left open |
SMUG-TE-IDENTITY Transfer-Encoding: identity (deprecated) with CL must be rejected (RFC 9112 §7, MUST) | 400/501 or close | 200, connection left open (Used CL (ignored TE variant)) |
SMUG-CHUNK-NEGATIVE Negative chunk size must be rejected (RFC 9112 §7.1, MUST) | 400 or close | 200, connection left open |
SMUG-MULTIPLE-HOST-COMMA Host header with comma-separated values must be rejected (RFC 9110 §7.2, MUST) | 400 or close | 200, connection left open |
SMUG-CHUNK-INVALID-SIZE-DESYNC Invalid chunk size (+0) with poison byte — detects chunk-size parser desync (RFC 9112 §7.1, MUST) | 400, or close | 200, timed out (Accepted invalid chunk-size request and kept connection open — follow-up GET returned no response) |
MAL-NUL-IN-URL NUL byte in URL should be rejected (MUST) | 400 or close | 404, connection left open |
MAL-NON-ASCII-URL Non-ASCII bytes (UTF-8 é) in URL must be rejected (MUST) | 400 or close | 404, connection left open |
MAL-CHUNK-SIZE-OVERFLOW Chunk size with integer overflow must be rejected (MUST) | 400 or close | 200, connection left open |
MAL-URL-OVERLONG-UTF8 Overlong UTF-8 encoding of / (0xC0 0xAF) in URL must be rejected (MUST) | 400 or close | 404, connection left open |
HTTP/2: what failed
| Test | Expected | Got |
|---|---|---|
generic/4/4 Sends a POST request with trailers | HEADERS Frame (stream_id:1) | Timeout |
http2/5.1/5 half closed (remote): Sends a DATA frame | GOAWAY Frame (Error Code: STREAM_CLOSED) or RST_STREAM Frame (Error Code: STREAM_CLOSED) or Connection closed | Timeout |
http2/5.1/6 half closed (remote): Sends a HEADERS frame | GOAWAY Frame (Error Code: STREAM_CLOSED) or RST_STREAM Frame (Error Code: STREAM_CLOSED) or Connection closed | Timeout |
http2/5.1/12 closed: Sends a HEADERS frame | GOAWAY Frame (Error Code: STREAM_CLOSED) or Connection closed | RST_STREAM Frame (length:4, flags:0x00, stream_id:1) |
http2/5.1.1/2 Sends stream identifier that is numerically smaller than previous | GOAWAY Frame (Error Code: PROTOCOL_ERROR) or Connection closed | DATA Frame (length:7, flags:0x01, stream_id:5) |
http2/6.1/2 Sends a DATA frame on the stream that is not in "open" or "half-closed (local)" state | GOAWAY Frame (Error Code: STREAM_CLOSED) or RST_STREAM Frame (Error Code: STREAM_CLOSED) or Connection closed | Timeout |
http2/6.3/2 Sends a PRIORITY frame with a length other than 5 octets | GOAWAY Frame (Error Code: FRAME_SIZE_ERROR) or RST_STREAM Frame (Error Code: FRAME_SIZE_ERROR) or Connection closed | Timeout |
http2/6.9/2 Sends a WINDOW_UPDATE frame with a flow control window increment of 0 on a stream | GOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closed | DATA Frame (length:7, flags:0x01, stream_id:1) |
http2/6.9.1/3 Sends multiple WINDOW_UPDATE frames increasing the flow control window to above 2^31-1 on a stream | RST_STREAM Frame (Error Code: FLOW_CONTROL_ERROR) | RST_STREAM Frame (length:4, flags:0x00, stream_id:1) |
http2/8.1/1 Sends a second HEADERS frame without the END_STREAM flag | GOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closed | Timeout |
http2/8.1.2.1/3 Sends a HEADERS frame that contains a pseudo-header field as trailers | GOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closed | Timeout |
http2/8.1.2.3/2 Sends a HEADERS frame that omits ":method" pseudo-header field | GOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closed | DATA Frame (length:7, flags:0x01, stream_id:1) |
http2/8.1.2.3/3 Sends a HEADERS frame that omits ":scheme" pseudo-header field | GOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closed | DATA Frame (length:7, flags:0x01, stream_id:1) |
http2/8.1.2.3/4 Sends a HEADERS frame that omits ":path" pseudo-header field | GOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closed | HEADERS Frame (length:4, flags:0x05, stream_id:1) |
http2/8.1.2.6/1 Sends a HEADERS frame with the "content-length" header field which does not equal the DATA frame payload length | GOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closed | Timeout |
http2/8.1.2.6/2 Sends a HEADERS frame with the "content-length" header field which does not equal the sum of the multiple DATA frames payload length | GOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closed | Timeout |
HTTP/3: what failed
| Test | Expected | Got |
|---|---|---|
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if initial_source_connection_id is missing [Transport 7.3] | - | did not get expected exception: QUICException |
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if original_destination_connection_id is received [Transport 18.2] | - | did not get expected exception: QUICException |
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if preferred_address is received [Transport 18.2] | - | did not get expected exception: QUICException |
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if retry_source_connection_id is received [Transport 18.2] | - | did not get expected exception: QUICException |
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if stateless_reset_token is received [Transport 18.2] | - | did not get expected exception: QUICException |
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if a parameter value is malformed [Transport 18] | - | did not get expected exception: QUICException |
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if max_udp_payload_size < 1200 [Transport 7.4 and 18.2] | - | did not get expected exception: QUICException |
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if ack_delay_exponent > 20 [Transport 7.4 and 18.2] | - | did not get expected exception: QUICException |
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if max_ack_delay >= 2^14 [Transport 7.4 and 18.2] | - | did not get expected exception: QUICException |
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if initial_max_streams_bidi > 2^60 [Transport 18.2] | - | did not get expected exception: QUICException |
| QUIC servers MUST send TRANSPORT_PARAMETER_ERROR if initial_max_streams_uni > 2^60 [Transport 18.2] | - | did not get expected exception: QUICException |
| QUIC servers MUST send FRAME_ENCODING_ERROR if a frame is cut short [Transport 12.4] | - | predicate failed on expected exception: QUICException / TransportErrorIsReceived ProtocolViolation "" |
| QUIC servers MUST send PROTOCOL_VIOLATION if reserved bits in Handshake are non-zero [Transport 17.2] | - | did not get expected exception: QUICException |
| QUIC servers MUST send PROTOCOL_VIOLATION if reserved bits in Short are non-zero [Transport 17.3.1] | - | 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 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_FRAME_UNEXPECTED if PUSH_PROMISE is received [HTTP/3 7.2.5] | - | predicate failed on expected exception: QUICException / ApplicationProtocolErrorIsReceived (ApplicationProtocolError 512) "Decompression of header block failed." |
| HTTP/3 servers MUST send H3_FRAME_ERROR if MAX_PUSH_ID has octets after its push ID [HTTP/3 7.1] | - | predicate failed on expected exception: QUICException / ApplicationProtocolErrorIsReceived (ApplicationProtocolError 261) "Unexpected frame type '0' received" |
| HTTP/3 servers MUST NOT buffer an over-long frame on a control stream [HTTP/3 7.1] | - | predicate failed on expected exception: QUICException / ApplicationProtocolErrorIsReceived (ApplicationProtocolError 262) "Received an invalid frame len 1073741824 for frame of type 7." |
Every result
Alpha Round, 29 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 | 1,422,591 | 2.89ms | 6.43ms | 6191.6% | 12.6GiB |
| Connection | Pipelined | 4,096 | 2,496,668 | 26.24ms | 50.10ms | 6338.3% | 69.0GiB |
| Connection | Short-lived | 4,096 | 687,648 | 5.92ms | 63.80ms | 4940.8% | 5.2GiB |
| Concurrency | Async Delay | 32,000 | 1,152,311 | 27.78ms | 50.40ms | 6228.5% | 60.5GiB |
| Efficiency | Latency-10K | 1,024 | 9,978 | 101.1us | 131.0us | 43.0% | 624MiB |
| Efficiency | Latency-1M | 1,024 | 997,475 | 255.3us | 1607.0us | 5026.1% | 12.7GiB |
| Workload | JSON Comp | 4,096 | 250,838 | 16.33ms | 44.00ms | 6480.5% | 11.3GiB |
| Workload | JSON Comp | 16,384 | 204,816 | 79.61ms | 730.40ms | 6097.1% | 67.5GiB |
| Workload | JSON TLS | 4,096 | 872,173 | 4.81ms | 48.04ms | 6109.3% | 14.0GiB |
| Workload | 8Gbit | 512 | 49,406 | 118.9us | 169.0us | 333.8% | 2.6GiB |
| Workload | Static TLS | 1,024 | 280,011 | 4.03ms | 63.83ms | 6342.0% | 9.1GiB |
| Database | Async DB | 1,024 | 59,034 | 17.34ms | 20.60ms | 2145.5% | 5.2GiB |
| HTTP/2 | Baseline | 256 | 1,014,174 | 24.90ms | 41.58ms | 6257.2% | 91.1GiB |
| HTTP/2 | Baseline | 1,024 | 936,897 | 103.27ms | 295.62ms | 6126.5% | 121.6GiB |
| HTTP/2 | Static | 256 | 243,892 | 33.19ms | 60.20ms | 6187.1% | 16.6GiB |
| HTTP/2 | Static | 1,024 | 218,591 | 146.26ms | 961.92ms | 5918.7% | 12.2GiB |
| HTTP/2 | Baseline (h2c) | 256 | 1,035,337 | 24.42ms | 41.24ms | 6278.8% | 93.8GiB |
| HTTP/2 | Baseline (h2c) | 1,024 | 961,442 | 101.86ms | 303.32ms | 6093.7% | 121.1GiB |
| HTTP/2 | Baseline (h2c) | 4,096 | 466,941 | 785.39ms | 1.42s | 5030.9% | 126.4GiB |
| HTTP/2 | JSON (h2c) | 1,024 | 682,429 | 46.99ms | 80.22ms | 6385.9% | 94.7GiB |
| HTTP/2 | JSON (h2c) | 4,096 | 684,393 | 183.25ms | 583.02ms | 6151.3% | 26.2GiB |
| HTTP/3 | Baseline | 64 | 380,275 | 10.61ms | 35.66ms | 4273.9% | 6.1GiB |
| HTTP/3 | Static | 64 | 78,368 | 46.02ms | 166.47ms | 6356.2% | 5.4GiB |
| WebSocket | Echo | 512 | 1,356,702 | 376us | 1.13ms | 6506.2% | 2.5GiB |
| WebSocket | Echo | 4,096 | 1,369,477 | 2.99ms | 5.60ms | 6702.2% | 10.5GiB |
| WebSocket | Echo | 16,384 | 899,216 | 18.22ms | 34.00ms | 6547.9% | 16.2GiB |
| WebSocket | Echo Pipelined | 512 | 15,046,577 | 543us | 2.07ms | 6446.8% | 9.3GiB |
| WebSocket | Echo Pipelined | 4,096 | 14,810,981 | 4.43ms | 10.20ms | 6609.8% | 14.2GiB |
| WebSocket | Echo Pipelined | 16,384 | 12,163,010 | 21.40ms | 59.70ms | 6520.3% | 52.0GiB |
Compared with
The Kotlin web frameworks around ktor-tuned 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 ktor-tuned | |
|---|---|---|---|
| ktor | 2316 | -19% | head to head |
| neton | 1483 | -48% | head to head |
Compare ktor-tuned with any Kotlin entry · Compare ktor-tuned with any entry, in any language · Every Kotlin entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry