← Back to team overview

graphite-dev team mailing list archive

Re: [Question #253432]: Multiple webapp-s render slow

 

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

Denis Zhdanov posted a new comment:
Hello Boris,

IMO your setup is sowewhat wrong, and maybe you hit some bug bacause of that, as stated by Jason.
If you want to have nicely working cache (and I found that is quite mandatory for high loaded graphite) you need to be sure that DESTINATIONS of relay is exact match of CARBONLINK_HOSTS (I mean IP and instance name, not port) - then consistent hash will work fine and take right carbon daemon for metric check w/o checking other  carbon instances and possibly waste time.
So, you need two set of relays - one will distribute load accross nodes and another one - on each node - will distribute load accross carbon caches. Also you need to add both nodes to CLUSTER_SERVERS.
Something like that:
[relay:a]
LINE_RECIEVER 0.0.0.0:2003
PICKLE_RECIEVER 0.0.0.0:2004
RELAY_METHOD consistent-hashing
DESTINATIONS 192.168.0.10:2013,192.168.0.11:2013
[relay:b]
LINE_RECIEVER 0.0.0.0:2013
PICKLE_RECIEVER 0.0.0.0:2014
RELAY_METHOD consistent-hashing
DESTINATIONS 127.0.0.1:2104:a,127.0.0.1:2104:b
[cache:a]
PICKLE_RECIEVER 0.0.0.0:2104
CACHE_QUERY 0.0.0.0:7102
[cache:b]
PICKLE_RECIEVER 0.0.0.0:2204
CACHE_QUERY 0.0.0.0:7202

WebApp
CARBONLINK_HOSTS = ["127.0.0.1:7102:a","127.0.0.1:7202:b"]
CLUSTER_SERVERS = ["192.168.0.10:8000", "192.168.0.11:8000"]

I have similar setup and it works quite well.

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