← Back to team overview

graphite-dev team mailing list archive

[Question #262189]: relay-rules and consistent hashing

 

New question #262189 on Graphite:
https://answers.launchpad.net/graphite/+question/262189

Hello,

I have 4 carbon-cache on two hosts and one relay.
How can I, with one relay, send all a.* metrics with consistent-hashing to the two carbon-caches on hosta.
All metrics b.* with consistent-hashing to the two other carbon-caches ?

I was thinking of
---carbon.conf
[relay]
...
RELAY_METHOD = rules
DESTINATIONS = hosta:2004:a,hosta:2104:b,hostb:2004:c,hostb:2104:d

---relay-rules.conf
[metrica]
pattern = ^a.*
destinations = hosta:2004:a,hosta:2104:b
[metricb]
pattern = ^b.*
destinations = hostb:2004:c,hostb:2104:d

but with this configuration, the same metric is send to the two caches on the same host (as if REPLICATION_FACTOR=2)


One other solution might be 3 relays for 4 carbon-caches (but it's a lot of relays imho)

---carbon.conf
[relay:a]
...
RELAY_METHOD = rules
DESTINATIONS = hosta:2004:a,hosta:2104:b,hostb:2004:c,hostb:2104:d

[relay:b]
LINE_RECEIVER_PORT = 2113
...
RELAY_METHOD = consistent-hashing
DESTINATIONS = hosta:2004:a,hosta:2104:b

[relay:c]
LINE_RECEIVER_PORT = 2213
...
RELAY_METHOD = consistent-hashing
DESTINATIONS = hostb:2004:c,hostb:2104:d

---relay-rules.conf
[metrica]
pattern = ^a.*
destinations = localhost:2113
[metricb]
pattern = ^b.*
destinations = localhost:2213

What are your opinions ?
Regards

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.