tylertreat / mq-benchmarking

Performance benchmarks for various message queues.
http://www.bravenewgeek.com/dissecting-message-queues/
192 stars 39 forks source link

Modified NATS handling to avoid Slow Consumer #1

Closed derekcollison closed 10 years ago

derekcollison commented 10 years ago

Many messaging systems are in-balanced and can send faster than they can receive. NATS has this ability to do this and was reporting a slow consumer state that was not being realized. Adding in the original flush alleviated the problem, but at a huge performance cost for throughput since it introduced a sync ack effectively for each send. This change balances the publishing rate with the subscriber rate by watching for spreads between sent and received messages and bytes.