Crystal parallelism and Kemal

Don’t even need to look at kemal. Stdlib’s HTTP:::Server is already not threadsafe. Multi-threading is really just a technology preview and not recommended for any productive use. It probably works fine most of the time but only very few parts of the standard library (mostly the concurrency primitives) have been revisited to make sure they’re thread-safe (even that might not be finished).

As @jgaskins explained, multithreading is unlikely to outperform multi-process deployment. It it did show better results, there would be a flaw somewhere.
I agree it’s still worth showing both options, but given the current preview state, I’d advise against posting any benchmarks in such a comparison. Multithreading support is a work in progress and it actually still requires quite some effort to finish. Until there’s a somewhat stable release for multithreading support in view, there’s no point in comparing performance. It would only suggest multithreading was ready to use, and probably paint an incorrect picture of its performance characteristics.

3 Likes