datacratic/soa — pull request #101 by RAttab (2014-06-19 19:06:17+00:00)
Title: Carbon dump interval is now configurable and dissociated from the sampling rate.

If the carbon retention rate is set at 10 sec then we send 9 updates which are simply discarded by carbon. This is fine until we add an aggregator in front of carbon which will end up summing all 10 updates before sending them to carbon which will result in values 10 times higher then they should be.

This patch starts by dissociating the sampling rate of the metrics from the dump interval. The reason for this is that the metrics need to be read every second so that the final count is per second and not per 10 second.

We then calculate a dump time which will fall in the middle of the carbon dump window. This reduces the risk of not having a dump within a window due to timer drag.

Finally we expose the dump interval as a configuration parameter in the bootstrap.json so that we can leave the 1.0 dumpInterval by default. This is required to maintain the public interface such that the open-source community will not have to modify anything when deploying this new release.