hashicorp/consul — pull request #204 by armon (2014-06-09 19:54:49+00:00)
Title: Add deferred sync for check output

This PR adds a new configuration `check_update_interval` which allows us to defer updating the output of a check which is in a steady state. The motivation for this is many checks produce slightly different output (e.g. bandwidth measures, latency, timestamps) per run, and this currently causes Consul to re-sync on almost every invocation. This defeats the edge-trigger optimizations. Now, if the state is steady, we will delay the sync for up to `check_update_interval` (defaults to 5m). This way the UI shows relatively up to date output, always up-to-date state, and we get a huge write reduction. For some checks running at 5s intervals, this is a 60x write reduction. Fixes #157.