ktor
Flagship · Kotlin · engine: netty · standard configuration · completeness 4/4
JetBrains Ktor 3.x on Netty with Kotlin coroutines, kotlinx.serialization, JDK 21.
Achievements
🥇 1 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 3 |
Composite rank
Each profile of a family is worth 100 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.
| Family | Rank | Composite |
|---|---|---|
| HTTP/1.1 | 27 of 71 | 2590 |
| HTTP/2 | 12 of 18 | 448 |
| WebSocket | 10 of 15 | 454 |
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 | 822,062 | 4.97ms | 9.82ms | 6154.9% | 9.5GiB |
| Connection | Pipelined | 4,096 | 584,867 | 110.57ms | 138.90ms | 4725.5% | 17.9GiB |
| Connection | Short-lived | 4,096 | 665,691 | 6.12ms | 49.70ms | 6284.1% | 4.4GiB |
| Concurrency | Async Delay | 32,000 | 244,271 | 129.22ms | 201.10ms | 2499.4% | 16.7GiB |
| Efficiency | Latency-10K | 1,024 | 9,980 | 139.0us | 188.0us | 94.2% | 465MiB |
| Efficiency | Latency-1M | 1,024 | 878,822 | 1588616.7us | 2642944.0us | 6001.8% | 5.0GiB |
| Efficiency | Latency-500K/8 | 1,024 | 197,383 | 6062251.0us | 11939840.0us | 727.0% | 1.3GiB |
| Workload | JSON Comp | 4,096 | 193,020 | 21.17ms | 82.30ms | 6158.4% | 5.2GiB |
| Workload | JSON Comp | 16,384 | 189,511 | 84.68ms | 260.80ms | 6028.2% | 11.2GiB |
| Workload | JSON TLS | 4,096 | 391,978 | 11.92ms | 11.92ms | 4946.9% | 9.3GiB |
| Workload | 8Gbit | 512 | 49,202 | 211.7us | 320.0us | 750.0% | 2.7GiB |
| Workload | Static TLS | 1,024 | 204,709 | 8.18ms | 245.95ms | 6407.0% | 3.8GiB |
| Database | Async DB | 1,024 | 103,951 | 9.45ms | 13.60ms | 4993.8% | 9.6GiB |
| Database | Fortunes | 1,024 | 51,030 | 19.15ms | 41.20ms | 5349.4% | 7.5GiB |
| HTTP/2 | Baseline | 256 | 558,485 | 44.86ms | 44.86ms | 5918.6% | 29.8GiB |
| HTTP/2 | Baseline | 1,024 | 541,980 | 184.02ms | 184.02ms | 5904.2% | 30.0GiB |
| HTTP/2 | Static | 256 | 189,737 | 41.76ms | 41.76ms | 6023.8% | 16.0GiB |
| HTTP/2 | Static | 1,024 | 180,206 | 173.56ms | 173.56ms | 5728.0% | 24.7GiB |
| HTTP/2 | Baseline (h2c) | 256 | 412,245 | 67.92ms | 67.92ms | 5465.5% | 30.7GiB |
| HTTP/2 | Baseline (h2c) | 1,024 | 402,964 | 210.39ms | 210.39ms | 5790.3% | 31.1GiB |
| HTTP/2 | Baseline (h2c) | 4,096 | 279,991 | 1.37s | 1.37s | 5175.2% | 31.2GiB |
| HTTP/2 | JSON (h2c) | 1,024 | 314,284 | 101.21ms | 101.21ms | 4441.9% | 28.2GiB |
| HTTP/2 | JSON (h2c) | 4,096 | 282,755 | 426.56ms | 426.56ms | 4531.9% | 29.9GiB |
| WebSocket | Echo | 512 | 1,021,279 | 500us | 1.13ms | 3426.5% | 2.5GiB |
| WebSocket | Echo | 4,096 | 980,019 | 4.15ms | 8.98ms | 3411.2% | 6.6GiB |
| WebSocket | Echo | 16,384 | 645,400 | 24.58ms | 42.30ms | 3396.7% | 14.8GiB |
| WebSocket | Echo Pipelined | 512 | 11,215,557 | 729us | 2.13ms | 3370.7% | 10.8GiB |
| WebSocket | Echo Pipelined | 4,096 | 10,647,634 | 6.12ms | 15.10ms | 3385.1% | 13.0GiB |
| WebSocket | Echo Pipelined | 16,384 | 8,879,790 | 28.61ms | 61.10ms | 3418.8% | 20.7GiB |
Compared with
The Kotlin entries around ktor on the HTTP/1.1 composite, and the one leading them. The last column shows every profile side by side.
| Entry | Composite | vs ktor | |
|---|---|---|---|
| ktor-ghost | 2835 | +9% | head to head |
| http4k | 1901 | -27% | head to head |
| neton | 1339 | -48% | head to head |
Compare ktor with any Kotlin entry · Compare ktor with any entry, in any language · Every Kotlin entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry