Kotlin web framework comparison: any two, head to head
ktor-ghost is quicker than ktor on 25 of the 39 profiles they both run, and behind on 14. On the HTTP/1.1 composite they score 491 and 434.
Pick any two of the 4 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. What each profile measures.
| Profile | Conns | ktor-ghost req/sec | ktor req/sec | Delta | ktor-ghost p99 | ktor p99 |
|---|---|---|---|---|---|---|
| Baseline | 512 | 830,262 | 817,316 | +2% | 1.34ms | 1.39ms |
| Baseline | 4,096 | 838,039 | 822,062 | +2% | 9.60ms | 9.82ms |
| Pipelined | 512 | 590,006 | 619,926 | -5% | 51.20ms | 59.70ms |
| Pipelined | 4,096 | 654,297 | 584,867 | +12% | 146.90ms | 138.90ms |
| Short-lived | 512 | 646,754 | 656,997 | -2% | 4.89ms | 4.71ms |
| Short-lived | 4,096 | 655,894 | 665,691 | -1% | 54.10ms | 49.70ms |
| JSON | 4,096 | 657,766 | 395,250 | +66% | 29.70ms | 34.60ms |
| JSON Comp | 512 | 203,733 | 182,888 | +11% | 9.63ms | 16.50ms |
| JSON Comp | 4,096 | 217,405 | 193,020 | +13% | 42.30ms | 82.30ms |
| JSON Comp | 16,384 | 218,199 | 189,511 | +15% | 145.20ms | 260.80ms |
| JSON TLS | 4,096 | 607,943 | 391,978 | +55% | 266.87ms | 11.92ms |
| Upload | 32 | 1,637 | 1,529 | +7% | 95.00ms | 110.60ms |
| Upload | 256 | 1,861 | 1,833 | +2% | 580.30ms | 714.00ms |
| Static | 1,024 | 271,389 | 284,595 | -5% | 144.40ms | 4.06ms |
| Static | 4,096 | 277,642 | 282,154 | -2% | 126.75ms | 14.74ms |
| Static | 6,800 | 275,803 | 273,800 | +1% | 195.41ms | 24.78ms |
| Static TLS | 1,024 | 191,799 | 204,709 | -6% | 183.27ms | 245.95ms |
| Static TLS | 4,096 | 238,995 | 238,340 | +0% | 303.36ms | 341.06ms |
| Static TLS | 6,800 | 229,300 | 226,856 | +1% | 382.26ms | 367.08ms |
| Async DB | 1,024 | 113,590 | 103,951 | +9% | 11.20ms | 13.60ms |
| CRUD | 4,096 | 187,905 | 172,551 | +9% | 38.50ms | 41.50ms |
| Fortunes | 1,024 | 49,991 | 51,030 | -2% | 43.10ms | 41.20ms |
| API-4 | 256 | 25,271 | 28,322 | -11% | 27.60ms | 30.50ms |
| API-16 | 1,024 | 87,734 | 71,525 | +23% | 52.40ms | 47.10ms |
| Baseline | 256 | 515,664 | 558,485 | -8% | 282.20ms | 44.86ms |
| Baseline | 1,024 | 495,732 | 541,980 | -9% | 768.20ms | 184.02ms |
| Static | 256 | 196,780 | 189,737 | +4% | 299.14ms | 41.76ms |
| Static | 1,024 | 184,792 | 180,206 | +3% | 530.61ms | 173.56ms |
| Baseline (h2c) | 256 | 391,103 | 412,245 | -5% | 359.42ms | 67.92ms |
| Baseline (h2c) | 1,024 | 362,388 | 402,964 | -10% | 1.95s | 210.39ms |
| Baseline (h2c) | 4,096 | 392,445 | 279,991 | +40% | 2.26s | 1.37s |
| JSON (h2c) | 1,024 | 424,461 | 314,284 | +35% | 319.32ms | 101.21ms |
| JSON (h2c) | 4,096 | 389,919 | 282,755 | +38% | 1.05s | 426.56ms |
| Echo | 512 | 1,021,563 | 1,021,279 | +0% | 1.33ms | 1.13ms |
| Echo | 4,096 | 973,072 | 980,019 | -1% | 9.46ms | 8.98ms |
| Echo | 16,384 | 676,216 | 645,400 | +5% | 42.90ms | 42.30ms |
| Echo Pipelined | 512 | 11,253,401 | 11,215,557 | +0% | 1.93ms | 2.13ms |
| Echo Pipelined | 4,096 | 11,090,871 | 10,647,634 | +4% | 14.40ms | 15.10ms |
| Echo Pipelined | 16,384 | 8,286,836 | 8,879,790 | -7% | 69.70ms | 61.10ms |
Common comparisons
ktor-ghost vs ktor · ktor-ghost vs http4k · ktor-ghost vs fishcake · ktor vs http4k · ktor vs fishcake · http4k vs fishcake
Questions
Is ktor-ghost faster than ktor?
ktor-ghost is quicker than ktor on 25 of the 39 profiles they both run, and behind on 14. On the HTTP/1.1 composite they score 491 and 434. Both run on the same machine, in the same round, against the same profiles.
Is ktor-ghost faster than http4k?
ktor-ghost is quicker than http4k on 10 of the 12 profiles they both run, and behind on 2. On the HTTP/1.1 composite they score 491 and 133. Both run on the same machine, in the same round, against the same profiles.
Is ktor-ghost faster than fishcake?
fishcake is quicker than ktor-ghost on 19 of the 23 profiles they both run, and behind on 4. On the HTTP/1.1 composite they score 491 and 672. Both run on the same machine, in the same round, against the same profiles.
Is ktor faster than http4k?
ktor is quicker than http4k on 10 of the 12 profiles they both run, and behind on 2. On the HTTP/1.1 composite they score 434 and 133. Both run on the same machine, in the same round, against the same profiles.
Which Kotlin framework is fastest overall?
fishcake holds the highest HTTP/1.1 composite of the Kotlin entries, at 672. 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
Results updated · Kotlin composite ranking · Other languages · Open the leaderboard