Scala web framework comparison: any two, head to head
Sharaf is ahead of http4s on 9 of the 9 tests they both run. Their composite scores are not on one scale: http4s is ranked among web frameworks and Sharaf among experimental frameworks, and each league is measured against its own leader.
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. 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 | http4s | Sharaf | Delta | http4s p99 | Sharaf p99 |
|---|---|---|---|---|---|---|
| Requests per second | ||||||
| Baseline | 4,096 | 383,090 | 1,417,780 | -73% | 12.80ms | 9.21ms |
| Pipelined | 4,096 | 582,913 | 3,338,860 | -83% | 142.70ms | 2.87ms |
| Short-lived | 4,096 | 114,699 | 834,086 | -86% | 4.63ms | 51.00ms |
| Async Delay | 32,000 | 277,927 | 299,354 | -7% | 78.90ms | 183.00ms |
| JSON Comp | 4,096 | 454 | 179,828 | -100% | 3.34s | 256.20ms |
| JSON Comp | 16,384 | 908 | 174,549 | -99% | 3.40s | 156.20ms |
| JSON TLS | 4,096 | 207,663 | 517,647 | -60% | 61.65ms | 218.09ms |
| Fixed-rate profiles: score out of 100 | ||||||
| Latency-10K | 1,024 | 38.6 | 56.7 | -32% | 274us | 118us |
| Latency-1M | 1,024 | 3.3 | 46.5 | -93% | 13.02s | 2.42ms |
Common comparisons
Questions
Is http4s faster than Sharaf?
Sharaf is ahead of http4s on 9 of the 9 tests they both run. Their composite scores are not on one scale: http4s is ranked among web frameworks and Sharaf among experimental frameworks, and each league is measured against its own leader. Both run on the same machine, in the same round, against the same profiles.
Which Scala framework is fastest overall?
Among the Scala web frameworks, http4s holds the highest HTTP/1.1 composite, at 1062; among the experimental Scala frameworks, Sharaf holds the highest HTTP/1.1 composite, at 2258. 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 Scala entry
Results updated · Scala composite ranking · Compare across languages · Other languages · Open the leaderboard