Hi, everyone. Long time (occasional) reader, first time writer here.
In the 5.x days I played with Racket's Web servlets and found them slower than
I'd expected. (My exceptions were, admittedly, quite high after seeing how much
better Racket performed at other tasks than your average scripting language.)
I've decided to try Web servlets out again, but this time to put some rough
numbers on the performance with a reproducible benchmark.

Advertising

My benchmark compares Racket's stateful and stateless servlets against the SCGI
package for Racket, Caddy (HTTP server written in Go), Flask (Python web
microframework), GNU Guile's Web server module, Ring/Compojure (Clojure HTTP
middleware/routing library), Plug (Elixir HTTP middleware), and Sinatra (Ruby
web microframework). On each of these platforms the benchmark implements a
trivial web application that serves around 4K of plain text. It uses
ApacheBench to stress it with a configurable number of concurrent connections.
The application and ApacheBench are run in separate Docker containers, which
lets you tune the memory and the CPU time available to them. I've published the
source code for the benchmark at
https://gitlab.com/dbohdan/racket-vs-the-world/. It should be straightforward
to run on Linux with Docker (but please report any difficulties!).
I've attached the results I got on a two-core VM. According to them, Racket's
servlets do lag behind everything else but Sinatra. The results are for 100
concurrent connections, which is the default, but the differences in throughput
are still very similar with 20 connections and quite similar with just one. I'd
appreciate any feedback on these results (do they look reasonable to you?) and
the code behind the benchmark (did I miss any crucial bits of configuration for
the servlet?).
Best,
D. Bohdan
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.