Posts

Showing posts from October, 2014

Spikes in RabbitMQ + NodeJS latency test

Image
Measuring things is a fun way to confront assumptions we put everywhere. In software development products tend to be based on tens of assumptions, such as that network will be fast enough, REST or database transaction time short enough, success rate for external API calls within reasonable range. Knowing the limits of those assumptions is always worth at least one beer. The other day I was looking how long it takes my message queue, RabbitMQ, to pass messages from producer to consumer. RabbitMQ has loads of options: queues, topics, durability, acknowledgements, clustering to name a few. It's not obvious how those different options affect latency.  I wrote two little NodeJS processes - producer and consumer, based on samples from RabbitMQ tutorial, to measure how long it takes a message to fly from one process to the other. Those processes would just run many times with various configs to produce data - big latency table. Unfortunately, the very basic scenario turned out to be a