notes from a passionate developer





This is a personal blog. The opinions expressed here represent my own and not those of my employer, nor current or previous. All content is published "as is", without warranty of any kind and I don't take any responsibility and can't be liable for any claims, damages or other liabilities that might be caused by the content.

MyNatsClient some metrics for pre v0.1.0

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.

Test case

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.

Test environment

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.


View Comments