HttpArena

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.

ProfileConnshttp4sSharafDeltahttp4s p99Sharaf p99
Requests per second
Baseline4,096383,0901,417,780-73%12.80ms9.21ms
Pipelined4,096582,9133,338,860-83%142.70ms2.87ms
Short-lived4,096114,699834,086-86%4.63ms51.00ms
Async Delay32,000277,927299,354-7%78.90ms183.00ms
JSON Comp4,096454179,828-100%3.34s256.20ms
JSON Comp16,384908174,549-99%3.40s156.20ms
JSON TLS4,096207,663517,647-60%61.65ms218.09ms
Fixed-rate profiles: score out of 100
Latency-10K1,02438.656.7-32%274us118us
Latency-1M1,0243.346.5-93%13.02s2.42ms

Common comparisons

http4s vs Sharaf

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