Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how does carbonate interact with multiple caches ? #38

Closed
rgevaert opened this issue Oct 16, 2014 · 2 comments
Closed

how does carbonate interact with multiple caches ? #38

rgevaert opened this issue Oct 16, 2014 · 2 comments

Comments

@rgevaert
Copy link

Hi,

I'm trying to figure out how carbonate works with multiple carbon caches running on the same host. It clearly has an impact when using e.g. carbon-lookup.

Am I correct one actually has to use the same DESTINATION in carbonate.conf as in carbon.conf?

E.g. with this in the config:

DESTINATIONS = graphite1.mynode.com:2104:1, graphite1.mynode.com:2204:2, graphite1.mynode.com:2304:3, graphite2.mynode.com:2104:1, graphite2.mynode.com:2204:2, graphite2.mynode.com:2304:3, graphite3.mynode.com:2104:1, graphite3.mynode.com:2204:2, graphite3.mynode.com:2304:3, graphite4.mynode.com:2104:1, graphite4.mynode.com:2204:2, graphite4.mynode.com:2304:3

On the other hand this doesn't seem to be right:

root@graphite1:~/scripts# carbon-hosts -c /etc/carbon/carbonate.conf 
graphite1.mynode.com
graphite1.mynode.com
graphite1.mynode.com
graphite2.mynode.com
graphite2.mynode.com
graphite2.mynode.com
graphite3.mynode.com
graphite3.mynode.com
graphite3.mynode.com
graphite4.mynode.com
graphite4.mynode.com
graphite4.mynode.com
@filippog
Copy link
Contributor

from the README, ports are not taken into consideration so that seems expected

@jssjr
Copy link
Member

jssjr commented Feb 7, 2015

The carbon-hosts tool will just list the hosts. However, the DESTINATIONS directive for your cluster should match what carbon itself uses. The hashing algorithm takes into account the host and instance name and ignores the port and carbonate does the same thing.

For example, given carbonate.conf:

[test]
DESTINATIONS = 192.168.251.40:2004:aggregator1, 192.168.254.40:2104:aggregator2, 192.168.254.40:2204:aggregator3, 192.168.254.40:2304:aggregator4, 192.168.254.40:2404:aggregator5
REPLICATION_FACTOR = 2

Then,

% bin/carbon-hosts -c conf/carbonate.conf -C test
192.168.251.40
192.168.254.40
192.168.254.40
192.168.254.40
192.168.254.40

and,

% bin/carbon-lookup -c conf/carbonate.conf -C test foo.bar
192.168.254.40:2404:aggregator5
192.168.254.40:2104:aggregator2

Make sense?

@jssjr jssjr closed this as completed Feb 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants