go-graphite / carbonzipper

proxy to transparently merge graphite carbon backends
Other
104 stars 29 forks source link

Deduplicate servers in pathCache #55

Closed korservick closed 6 years ago

korservick commented 6 years ago

The problem: If we have 1 backend server (Server1) and send query with Metric[1-3] in query - z.pathCacheSet() write {Metric1, Server1}; {Metric2, Server1}; {Metric3, Server1} and at z.pathCache.Set(query, allServers) it write {Metric[1-3], [Server1, Server1, Server1]}. Because of that on backend Server1 we have 3 render Metric[1-3] request. Solution: This code deduplicate all combination of backend servers.