← Back to team overview

graphite-dev team mailing list archive

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

 

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

Description changed to:
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]
PICKLE_RECEIVER_PORT = 2114
...
RELAY_METHOD = consistent-hashing
DESTINATIONS = hosta:2004:a,hosta:2104:b

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

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

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.