rzmq is now on 0.5.13 available on crates.io. This release adds an option to disable automatic delimiter for dealer/router sockets for interoperability purposes, it was a request.
0.5.12 migrated the io-uring implementation to use a "framer" pattern to encapsulate common operations and share code between the regular socket actor and io-uring. It's faster and more efficient.
rzmq's throughput is quite amazing really. I tested, with io-uring and TCP CORK enabled, 200k/responses per second on my Framework Laptop. That's 400k (200k requests + 200k responses) per second. 4 MILLION every 10 seconds on localhost on a measly laptop. 26mb ram peak. Imagine what we could do with a more powerful spec or a raspberry pie.
I'm glad I embarked on this journey no matter how unlikely it was to happen, but it did. I leverage fibre, which recently had a bug fix (0.5.1 and its a long time since 0.5.0) for a memory leak! I found that all of my applications with rzmq were allocating a lot of memory and fast. heaptrack was very useful for finding the leaker. valgrind, meh, it points out a lot of things, but its hard to visualize and you have to wait until the end of the program to inspect, which makes it useless for server applications. That was squashed, definitely performance boost and it feels good.
The primary reason for rzmq was io-uring, everything else is a bonus. A lot of dedication went into making sure there is code reuse to limit future breakages across the two modes. io-uring delivers lower cpu usage and higher throughput.
There is a secret throughput limiter in the Socket Connection Actor code to try to prevent starvation/saturation across input and output. tokio select is great, but I wished sometimes I could control how much time input would take to process and output. I need to figure out what's the best way to expose the settings per socket. One socket could be expecting more input than output or vice versa, so customization is absolutely needed.
This is different from the io-uring implementation where it spends a limited amount of time in each iteration reading from input and output queues to prevent starvation and saturation. io-uring is very particular about timing, so ideally finish as much as possible quickly and then idle.
rzmq is still in beta, but it has been much more stable recently. This is hard stuff, I can see why many people are not confident enough to pursue infrastructure like this. I can't say for certain when it will hit 1.0, but hopefully Roast of the Republic is out before that time 😮💨.
It's possible it will never move out of beta!
