Kotlin web framework comparison: any two, head to head
ktor-tuned is ahead of ktor on 26 of the 29 tests they both run, and behind on 3. On the HTTP/1.1 composite ktor-tuned scores 2873 and ktor 2316.
Pick any two of the 13 Kotlin entries. Requests per second is the best of three runs and the delta is the first column against the second; every row is the same profile at the same connection count, on the same machine. The fixed-rate profiles offer every entry the same request rate, so they are compared on their score out of 100 instead, which is CPU cost and latency at that rate. What each profile measures.
| Profile | Conns | ktor-tuned | ktor | Delta | ktor-tuned p99 | ktor p99 |
|---|---|---|---|---|---|---|
| Requests per second | ||||||
| Baseline | 4,096 | 1,422,591 | 1,005,736 | +41% | 6.43ms | 8.27ms |
| Pipelined | 4,096 | 2,496,668 | 2,148,466 | +16% | 50.10ms | 40.30ms |
| Short-lived | 4,096 | 687,648 | 747,149 | -8% | 63.80ms | 52.90ms |
| Async Delay | 32,000 | 1,152,311 | 865,613 | +33% | 50.40ms | 56.00ms |
| JSON Comp | 4,096 | 250,838 | 216,035 | +16% | 44.00ms | 74.60ms |
| JSON Comp | 16,384 | 204,816 | 145,288 | +41% | 730.40ms | 850.60ms |
| JSON TLS | 4,096 | 872,173 | 489,150 | +78% | 48.04ms | 79.23ms |
| Static TLS | 1,024 | 280,011 | 246,839 | +13% | 63.83ms | 78.32ms |
| Async DB | 1,024 | 59,034 | 61,011 | -3% | 20.60ms | 20.70ms |
| Baseline | 256 | 1,014,174 | 806,205 | +26% | 41.58ms | 50.57ms |
| Baseline | 1,024 | 936,897 | 734,383 | +28% | 295.62ms | 344.41ms |
| Static | 256 | 243,892 | 218,134 | +12% | 60.20ms | 63.49ms |
| Static | 1,024 | 218,591 | 62,333 | +251% | 961.92ms | 1.25s |
| Baseline (h2c) | 256 | 1,035,337 | 796,400 | +30% | 41.24ms | 61.78ms |
| Baseline (h2c) | 1,024 | 961,442 | 755,753 | +27% | 303.32ms | 325.34ms |
| Baseline (h2c) | 4,096 | 466,941 | 402,242 | +16% | 1.42s | 1.49s |
| JSON (h2c) | 1,024 | 682,429 | 394,573 | +73% | 80.22ms | 273.18ms |
| JSON (h2c) | 4,096 | 684,393 | 339,795 | +101% | 583.02ms | 819.40ms |
| Baseline | 64 | 380,275 | 339,775 | +12% | 35.66ms | 47.18ms |
| Static | 64 | 78,368 | 100,780 | -22% | 166.47ms | 146.90ms |
| Echo | 512 | 1,356,702 | 1,036,325 | +31% | 1.13ms | 1.13ms |
| Echo | 4,096 | 1,369,477 | 951,122 | +44% | 5.60ms | 9.64ms |
| Echo | 16,384 | 899,216 | 730,522 | +23% | 34.00ms | 45.70ms |
| Echo Pipelined | 512 | 15,046,577 | 11,000,318 | +37% | 2.07ms | 2.35ms |
| Echo Pipelined | 4,096 | 14,810,981 | 10,198,835 | +45% | 10.20ms | 15.70ms |
| Echo Pipelined | 16,384 | 12,163,010 | 9,062,406 | +34% | 59.70ms | 64.90ms |
| Fixed-rate profiles: score out of 100 | ||||||
| Latency-10K | 1,024 | 64.5 | 54.6 | +18% | 131us | 153us |
| Latency-1M | 1,024 | 48.7 | 39.1 | +25% | 1.61ms | 3.35ms |
| 8Gbit | 512 | 69.0 | 59.2 | +17% | 169us | 219us |
Common comparisons
ktor-tuned vs ktor · ktor-tuned vs http4k · ktor-tuned vs neton · ktor vs http4k · ktor vs neton · http4k vs neton
Questions
Is ktor-tuned faster than ktor?
ktor-tuned is ahead of ktor on 26 of the 29 tests they both run, and behind on 3. On the HTTP/1.1 composite ktor-tuned scores 2873 and ktor 2316. Both run on the same machine, in the same round, against the same profiles.
Is ktor-tuned faster than http4k?
ktor-tuned is ahead of http4k on 10 of the 10 tests they both run. On the HTTP/1.1 composite ktor-tuned scores 2873 and http4k 1188. Both run on the same machine, in the same round, against the same profiles.
Is ktor-tuned faster than neton?
ktor-tuned is ahead of neton on 15 of the 20 tests they both run, and behind on 5. On the HTTP/1.1 composite ktor-tuned scores 2873 and neton 1483. Both run on the same machine, in the same round, against the same profiles.
Is ktor faster than http4k?
ktor is ahead of http4k on 8 of the 10 tests they both run, and behind on 2. On the HTTP/1.1 composite ktor scores 2316 and http4k 1188. Both run on the same machine, in the same round, against the same profiles.
Which Kotlin framework is fastest overall?
Among the Kotlin web frameworks, ktor-tuned holds the highest HTTP/1.1 composite, at 2873; among the Kotlin HTTP engines, edixoi-kt holds the highest HTTP/1.1 composite, at 5789; among the experimental Kotlin frameworks, ktron holds the highest HTTP/1.1 composite, at 6436. Each league is measured against its own leader, and the leagues do not all count the same profiles, so those numbers are not on one scale and the highest of them is not the fastest entry on the page: to set an entry of one league against an entry of another, pick the two in the table above. The composite is throughput over the whole suite; if a service is one shape of workload, compare that profile on its own in the table above, because the order changes.
Every Kotlin entry
- ktor-tuned
- ktor
- neton
- http4k
- klite
- edixoi-kt
- kron
- kron-native
- ktron
- ktor-kronos
- genhttp-kt-netty
- genhttp-kt
- ktor-kronos-native
Results updated · Kotlin composite ranking · Compare across languages · Other languages · Open the leaderboard