HttpArena

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.

MedalAwardFieldRank
🥇 GoldWithin its languageKotlin · HTTP/1.11 of 5
🥇 GoldWithin its languageKotlin · HTTP/21 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.

FamilyRankComposite
HTTP/1.136 of 1142873
HTTP/227 of 45590
HTTP/316 of 22200
WebSocket33 of 41502
Database11 of 11167

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 d50d818125 of 159 (78.6%)34
HTTP/2h2spec 2.6.0130 of 146 (89.0%)16
HTTP/3h3spec v0.1.1558 of 81 (71.6%)23

HTTP/1.1: what failed

TestExpectedGot
RFC9112-5.1-OBS-FOLD Obs-fold (line folding) in headers should be rejected (RFC 9112 §5.1, MUST)400200, connection left open
RFC9112-7.1-MISSING-HOST Request without Host header must be rejected with 400 (RFC 9112 §3.2, MUST)400200, connection left open
RFC9112-2.3-INVALID-VERSION Invalid HTTP version must be rejected (RFC 9112 §2.3, SHOULD)400/505, close, or timeout = warn200, 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-ASTERISK-WITH-GET Asterisk-form (*) request-target with GET must be rejected (RFC 9112 §3.2.4, MUST)400, close, or timeout = warn404, 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 = warn404, 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 close200, connection left open
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 = warn404, connection left open
COMP-DATE-HEADER Origin server must include Date header in responses (RFC 9110 §6.6.1, MUST)2xx with Date header200, 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 = warn404, connection left open
SMUG-TE-XCHUNKED Transfer-Encoding: xchunked must not be treated as chunked (RFC 9112 §6.1, MUST)400/501 or close200, 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 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-CHUNK-UNDERSCORE Chunk size with underscores (1_0) must be rejected (RFC 9112 §7.1, MUST)400 or close200, connection left open
SMUG-TE-EMPTY-VALUE Transfer-Encoding with empty value must be rejected (RFC 9112 §6.1, MUST)400 or close200, 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 close200, connection left open
SMUG-CHUNK-SIZE-PLUS Chunk size with leading plus sign must be rejected (RFC 9112 §7.1, MUST)400 or close200, 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 close200, connection left open
SMUG-CHUNK-LEADING-SP Chunk size with leading space must be rejected (RFC 9112 §7.1, MUST)400 or close200, connection left open
SMUG-CHUNK-MISSING-TRAILING-CRLF Chunk data without trailing CRLF must be rejected (RFC 9112 §7.1, MUST)400 or close200, 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 close200, connection left open
SMUG-CHUNK-EXT-CTRL NUL byte in chunk extension must be rejected (RFC 9112 §7.1.1, MUST)400 or close200, 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 close200, connection left open
SMUG-TE-IDENTITY Transfer-Encoding: identity (deprecated) with CL must be rejected (RFC 9112 §7, MUST)400/501 or close200, connection left open (Used CL (ignored TE variant))
SMUG-CHUNK-NEGATIVE Negative chunk size must be rejected (RFC 9112 §7.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
SMUG-CHUNK-INVALID-SIZE-DESYNC Invalid chunk size (+0) with poison byte — detects chunk-size parser desync (RFC 9112 §7.1, MUST)400, or close200, 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 close404, connection left open
MAL-NON-ASCII-URL Non-ASCII bytes (UTF-8 é) in URL must be rejected (MUST)400 or close404, connection left open
MAL-CHUNK-SIZE-OVERFLOW Chunk size with integer overflow must be rejected (MUST)400 or close200, 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

HTTP/2: what failed

TestExpectedGot
generic/4/4 Sends a POST request with trailersHEADERS Frame (stream_id:1)Timeout
http2/5.1/5 half closed (remote): Sends a DATA frameGOAWAY Frame (Error Code: STREAM_CLOSED) or RST_STREAM Frame (Error Code: STREAM_CLOSED) or Connection closedTimeout
http2/5.1/6 half closed (remote): Sends a HEADERS frameGOAWAY Frame (Error Code: STREAM_CLOSED) or RST_STREAM Frame (Error Code: STREAM_CLOSED) or Connection closedTimeout
http2/5.1/12 closed: Sends a HEADERS frameGOAWAY Frame (Error Code: STREAM_CLOSED) or Connection closedRST_STREAM Frame (length:4, flags:0x00, stream_id:1)
http2/5.1.1/2 Sends stream identifier that is numerically smaller than previousGOAWAY Frame (Error Code: PROTOCOL_ERROR) or Connection closedDATA 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)" stateGOAWAY Frame (Error Code: STREAM_CLOSED) or RST_STREAM Frame (Error Code: STREAM_CLOSED) or Connection closedTimeout
http2/6.3/2 Sends a PRIORITY frame with a length other than 5 octetsGOAWAY Frame (Error Code: FRAME_SIZE_ERROR) or RST_STREAM Frame (Error Code: FRAME_SIZE_ERROR) or Connection closedTimeout
http2/6.9/2 Sends a WINDOW_UPDATE frame with a flow control window increment of 0 on a streamGOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closedDATA 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 streamRST_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 flagGOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closedTimeout
http2/8.1.2.1/3 Sends a HEADERS frame that contains a pseudo-header field as trailersGOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closedTimeout
http2/8.1.2.3/2 Sends a HEADERS frame that omits ":method" pseudo-header fieldGOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closedDATA Frame (length:7, flags:0x01, stream_id:1)
http2/8.1.2.3/3 Sends a HEADERS frame that omits ":scheme" pseudo-header fieldGOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closedDATA Frame (length:7, flags:0x01, stream_id:1)
http2/8.1.2.3/4 Sends a HEADERS frame that omits ":path" pseudo-header fieldGOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closedHEADERS 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 lengthGOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closedTimeout
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 lengthGOAWAY Frame (Error Code: PROTOCOL_ERROR) or RST_STREAM Frame (Error Code: PROTOCOL_ERROR) or Connection closedTimeout

HTTP/3: what failed

TestExpectedGot
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.

CategoryProfileConnsReq/secAvgp99CPUMemory
ConnectionBaseline4,0961,422,5912.89ms6.43ms6191.6%12.6GiB
ConnectionPipelined4,0962,496,66826.24ms50.10ms6338.3%69.0GiB
ConnectionShort-lived4,096687,6485.92ms63.80ms4940.8%5.2GiB
ConcurrencyAsync Delay32,0001,152,31127.78ms50.40ms6228.5%60.5GiB
EfficiencyLatency-10K1,0249,978101.1us131.0us43.0%624MiB
EfficiencyLatency-1M1,024997,475255.3us1607.0us5026.1%12.7GiB
WorkloadJSON Comp4,096250,83816.33ms44.00ms6480.5%11.3GiB
WorkloadJSON Comp16,384204,81679.61ms730.40ms6097.1%67.5GiB
WorkloadJSON TLS4,096872,1734.81ms48.04ms6109.3%14.0GiB
Workload8Gbit51249,406118.9us169.0us333.8%2.6GiB
WorkloadStatic TLS1,024280,0114.03ms63.83ms6342.0%9.1GiB
DatabaseAsync DB1,02459,03417.34ms20.60ms2145.5%5.2GiB
HTTP/2Baseline2561,014,17424.90ms41.58ms6257.2%91.1GiB
HTTP/2Baseline1,024936,897103.27ms295.62ms6126.5%121.6GiB
HTTP/2Static256243,89233.19ms60.20ms6187.1%16.6GiB
HTTP/2Static1,024218,591146.26ms961.92ms5918.7%12.2GiB
HTTP/2Baseline (h2c)2561,035,33724.42ms41.24ms6278.8%93.8GiB
HTTP/2Baseline (h2c)1,024961,442101.86ms303.32ms6093.7%121.1GiB
HTTP/2Baseline (h2c)4,096466,941785.39ms1.42s5030.9%126.4GiB
HTTP/2JSON (h2c)1,024682,42946.99ms80.22ms6385.9%94.7GiB
HTTP/2JSON (h2c)4,096684,393183.25ms583.02ms6151.3%26.2GiB
HTTP/3Baseline64380,27510.61ms35.66ms4273.9%6.1GiB
HTTP/3Static6478,36846.02ms166.47ms6356.2%5.4GiB
WebSocketEcho5121,356,702376us1.13ms6506.2%2.5GiB
WebSocketEcho4,0961,369,4772.99ms5.60ms6702.2%10.5GiB
WebSocketEcho16,384899,21618.22ms34.00ms6547.9%16.2GiB
WebSocketEcho Pipelined51215,046,577543us2.07ms6446.8%9.3GiB
WebSocketEcho Pipelined4,09614,810,9814.43ms10.20ms6609.8%14.2GiB
WebSocketEcho Pipelined16,38412,163,01021.40ms59.70ms6520.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.

EntryCompositevs ktor-tuned
ktor2316-19%head to head
neton1483-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