add aggregated-consistent-hashing relay rule #32
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change adds a new type of relay rule which determines the appropriate destination for a metric by first applying the aggregation rules specified in aggregation-rules.conf, then applying consistent hashing on any resulting aggregated metric paths (or the original, if nothing matches).
The change is designed to address this type of problem:
https://answers.launchpad.net/graphite/+question/187874
But, without having to hand-convert the aggregation-rules into evenly distributed relay rules. With this change, pointing the relay at the aggregation-rules is sufficient.
I have tested that this also works for non-aggregated metrics, which will pass through the aggregator.
Here is a sample topology that would be enabled:
![Sample Topologyt](https://camo.githubusercontent.com/baea3856fc570a8b799d9319541d7f50df3215adfb49b957fb6f0a099382db16/687474703a2f2f662e636c2e6c792f6974656d732f305930493147317a314434303271336e306834322f53637265656e25323073686f74253230323031322d30382d32392532306174253230372e31382e3431253230504d2e706e67)
To use, in the [relay] section, set
RELAY_METHOD = aggregated-consistent-hashing