Scala web framework comparison: any two, head to head
zio-http is quicker than http4s on 10 of the 12 profiles they both run, and behind on 2. On the HTTP/1.1 composite they score 300 and 99.
Pick any two of the 2 Scala 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 | zio-http req/sec | http4s req/sec | Delta | zio-http p99 | http4s p99 |
|---|---|---|---|---|---|---|
| Baseline | 512 | 1,871,250 | 372,198 | +403% | 509us | 13.30ms |
| Baseline | 4,096 | 1,976,958 | 383,090 | +416% | 3.60ms | 12.80ms |
| Pipelined | 512 | 6,337,561 | 580,806 | +991% | 4.24ms | 153.50ms |
| Pipelined | 4,096 | 6,576,995 | 582,913 | +1028% | 11.00ms | 142.70ms |
| Short-lived | 512 | 634,044 | 114,730 | +453% | 1.57ms | 4.62ms |
| Short-lived | 4,096 | 643,253 | 114,699 | +461% | 1.60ms | 4.63ms |
| JSON | 4,096 | 1,005,352 | 197,792 | +408% | 2.21ms | 6.11ms |
| JSON Comp | 512 | 302,460 | 102 | +296429% | 6.76ms | 838.50ms |
| JSON Comp | 4,096 | 298,443 | 454 | +65636% | 27.70ms | 3.34s |
| JSON Comp | 16,384 | 297,019 | 908 | +32611% | 58.70ms | 3.40s |
| Upload | 32 | 1,585 | 1,966 | -19% | 63.30ms | 49.20ms |
| Upload | 256 | 1,795 | 2,085 | -14% | 521.90ms | 322.40ms |
Common comparisons
Questions
Is zio-http faster than http4s?
zio-http is quicker than http4s on 10 of the 12 profiles they both run, and behind on 2. On the HTTP/1.1 composite they score 300 and 99. Both run on the same machine, in the same round, against the same profiles.
Which Scala framework is fastest overall?
zio-http holds the highest HTTP/1.1 composite of the Scala entries, at 300. 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 Scala entry
Results updated · Scala composite ranking · Other languages · Open the leaderboard