I'm
working on improving the throughput of sending messages to remote system for a scenario that seems to be scaringly common. Sending many messages in one go.
What happens is that the TCP buffer gets full and doesn't accept more writes. Then we must buffer, backoff and try again. First step was to replace the stashing in the endpoint writer with a more efficient internal buffer.
That made things worse for some buffer sizes. The reason is probably that the inefficient stashing accidentally provided the needed backoff.
Now I have implemented an adaptive backoff strategy that seems to be the right direction. Attached the results of my tests. Better throughput for all tested combinations, and most important it handles bursts of 300000 messages without degraded throughput or false failure detection.
This is only one of many tests that should be done, but I wanted to share the so far good news.
Cheers,
Patrik
--
Patrik Nordwall
Typesafe - Reactive apps on the JVM
Twitter: @patriknw