I'm getting really close to get
v0.1.0 of MyNatsClient out. Lately I've been been concentrating on consumer side performance, thought I would share some figures. I have not looked at the producing side yet. Also, I'm running with default send and receive buffer sizes in .NET, which you can tweak via connection options.
Since I posted this yesterday, I did some more optimisations today in the client. Compare the results below or read about the code changes and see the metrics in a new post.
The measurements are reported Producer vs Consumer, but these are running in parallel.
One sender console publishes 100000 messages (one per call), 10 times. Different payloads are used. It reports how long time it took to dispatch all 100000 messages.
One consumer console consumes these messages, and reports how long time it spent consuming 100000 messages.
Everything is running on a physical Windows 10 64bit, 32GB RAM i7-4790K quad core computer.
The Sender console and Consumer console is running as separate processes on this machine.
The NATS server is running on the same machine, in a Docker container, on an Ubuntu 14.04.4 LTS instance, with 8GB RAM, 2 virtual cores, via Hyper-V.
Result before optimisations
Result after optimisations
The code used is included in the repo. Feel free to find issues I've done, or contribute with performance improvements. The Sender side has not been optimised yet.