ganglia/monitor-core — pull request #134 by satterly (2014-02-15 16:55:47+00:00)
Title: Add Riemann TCP transport support

Sending Ganglia metrics to Riemann is already possible via Riemann's UDP transport however UDP is not guaranteed so metrics are dropped when the UDP receive buffer overflows. In addition, Ganglia metrics are currently sent as one metric per Riemann message which is inefficient.

This pull request adds support for using Riemann's TCP transport and bundling an entire host's metrics into one Riemann message which improves reliability and performance. Improvements have seen a doubling in the metric throughput from approximately 3000 metrics/s to more than 6000 metrics/s.

To ensure Ganglia data collection threads don't hang or block this work attempts to implement the [circuit breaker pattern](http://doc.akka.io/docs/akka/snapshot/common/circuitbreaker.html) so that the TCP connections to Riemann are dropped quickly if Riemann is unavailable or applies TCP back-pressure. The connections are retried after a 15 second timeout.