SlideShare a Scribd company logo
1 of 6
Download to read offline
IP: 10.4.0.2
Host: graphite-02
IP: 10.4.0.1
Host: graphite-01
[cache:a]
line_receiver_interface 0.0.0.0
line_receiver_port 2103
pickle_receiver_interface 0.0.0.0
pickle_receiver_port 2104
cache_query_interface 0.0.0.0
cache_query_port 7102
[cache:b]
line_receiver_interface 0.0.0.0
line_receiver_port 2203
pickle_receiver_interface 0.0.0.0
pickle_receiver_port 2204
cache_query_interface 0.0.0.0
cache_query_port 7202
[relay]
line_receiver_interface = 0.0.0.0
line_receiver_port = 2003
pickle_receiver_interface = 0.0.0.0
pickle_receiver_port = 2004
relay_method = consistent-hashing
replication_factor = 1
Destinations = [ 10.4.0.1:2104:a,
10.4.0.1:2204:b,
10.4.0.2:2104:a,
10.4.0.2:2204:b ]
[cache:a]
line_receiver_interface 0.0.0.0
line_receiver_port 2103
pickle_receiver_interface 0.0.0.0
pickle_receiver_port 2104
cache_query_interface 0.0.0.0
cache_query_port 7102
[cache:b]
line_receiver_interface 0.0.0.0
line_receiver_port 2203
pickle_receiver_interface 0.0.0.0
pickle_receiver_port 2204
cache_query_interface 0.0.0.0
cache_query_port 7202
[relay]
line_receiver_interface = 0.0.0.0
line_receiver_port = 2003
pickle_receiver_interface = 0.0.0.0
pickle_receiver_port = 2004
relay_method = consistent-hashing
replication_factor = 1
Destinations = [ 10.4.0.1:2104:a,
10.4.0.1:2204:b,
10.4.0.2:2104:a,
10.4.0.2:2204:b ]
[aggregator]
line_receiver_interface = 0.0.0.0
line_receiver_port = 2013
pickle_receiver_interface = 0.0.0.0
pickle_receiver_port = 2014
[aggregator]
line_receiver_interface = 0.0.0.0
line_receiver_port = 2013
pickle_receiver_interface = 0.0.0.0
pickle_receiver_port = 2014
load balancer
IP: 10.4.0.10
Host: graphite
TCP ports: 2003, 2004 HTTP ports: 80
[webapp]
port = 80
memcache_hosts = [
“rf-1.cache.amazonaws.com” ]
cluster_servers = [
“10.4.0.2:80” ]
remote_rendering = false
carbonlink_hosts = [
“10.4.0.1:7102”,
“10.4.0.1:7202” ]
[webapp]
port = 80
memcache_hosts = [
“rf-1.cache.amazonaws.com” ]
cluster_servers = [
“10.4.0.2:80” ]
remote_rendering = false
carbonlink_hosts = [
“10.4.0.2:7102”,
“10.4.0.2:7202” ]
adobrosynets@recordedfuture.com
IP: 10.4.0.2
Host: graphite-02
IP: 10.4.0.1
Host: graphite-01
[cache:a]
line_receiver_port 2103
pickle_receiver_port 2104
cache_query_port 7102
[cache:b]
line_receiver_port 2203
pickle_receiver_port 2204
cache_query_port 7202
[relay]
line_receiver_port = 2003
pickle_receiver_port = 2004
relay_method = consistent-hash
replication_factor = 1
Destinations = [
10.4.0.1:2104:a,10.4.0.1:2204:b,
10.4.0.2:2104:a,10.4.0.2:2204:b,
10.4.0.3:2104:a,10.4.0.3:2204:b
]
[cache:a]
line_receiver_port 2103
pickle_receiver_port 2104
cache_query_port 7102
[cache:b]
line_receiver_port 2203
pickle_receiver_port 2204
cache_query_port 7202
[relay]
line_receiver_port = 2003
pickle_receiver_port = 2004
relay_method = consistent-hash
replication_factor = 1
Destinations = [
10.4.0.1:2104:a,10.4.0.1:2204:b,
10.4.0.2:2104:a,10.4.0.2:2204:b ,
10.4.0.3:2104:a,10.4.0.3:2204:b
]
[aggregator]
line_receiver_port = 2013
pickle_receiver_port = 2014
[aggregator]
line_receiver_port = 2013
pickle_receiver_port = 2014
load balancer
IP: 10.4.0.10
Host: graphite
TCP ports: 2003, 2004 HTTP ports: 80
[webapp]
memcache_hosts = [
“rf-1.cache” ]
cluster_servers = [
“10.4.0.2:80”,
“10.4.0.3:80” ]
carbonlink_hosts = [
“10.4.0.1:7102”,
“10.4.0.1:7202” ]
[webapp]
memcache_hosts = [
“rf-1.cache” ]
cluster_servers = [
“10.4.0.1:80”,
“10.4.0.3:80” ]
carbonlink_hosts = [
“10.4.0.2:7102”,
“10.4.0.2:7202” ]
IP: 10.4.0.3
Host: graphite-03
[cache:a]
line_receiver_port 2103
pickle_receiver_port 2104
cache_query_port 7102
[cache:b]
line_receiver_port 2203
pickle_receiver_port 2204
cache_query_port 7202
[relay]
line_receiver_port = 2003
pickle_receiver_port = 2004
relay_method = consistent-hash
replication_factor = 1
Destinations = [
10.4.0.1:2104:a,10.4.0.1:2204:b,
10.4.0.2:2104:a,10.4.0.2:2204:b ,
10.4.0.3:2104:a,10.4.0.3:2204:b
]
[aggregator]
line_receiver_port = 2013
pickle_receiver_port = 2014
[webapp]
memcache_hosts = [
“rf-1.cache” ]
cluster_servers = [
“10.4.0.1:80”,
“10.4.0.2:80” ]
carbonlink_hosts = [
“10.4.0.3:7102”,
“10.4.0.3:7202” ]
adobrosynets@recordedfuture.com
Key points
- Many nodes, each node running carbon-relay, webapp, carbon-cache(s).
- Use at least two carbon-cache processes at the node to utilize performance
(typically one process per CPU core)
- All carbon-cache instances use the same schema definitions for whisper files
- All monitoring agents (statsd/sensu/gdash/codehale/collectd/etc) use loadbalancer front-end (HAproxy or ELB)
to send/query metrics.
- Each carbon-relay may route metrics to any carbon-cache instance at any graphite server in cluster.
- All carbon-relays use 'consistent-hashing' method and have exactly the same DESTINATIONS list
(carbon.conf DESTINATIONS. Order is important?)
- All webapp processes share exactly the same memcache instance(s)
(local_settings.py MEMCACHE_HOSTS)
- Each webapp can may query only local carbon-cache instances.
(local_settings.py CARBONLINK_HOSTS)
- All webapps may contain not only other webapps in CLUSTER_SERVERS , but also itself.
(local_settings.py, as of 0.9.10 version)
- Each webapp CARBONLINK_HOSTS must contain only local instances from DESTINATIONS
(order is not important )
- In terms of AWS EC2, graphite nodes are supposed to be installed in the same Region.
- Aggregator is not that useful. It is better to aggregate somewhere else (statsd/diamond) and send to graphite.
webapp/graphite/storage.py
STORE = Store(settings.DATA_DIRS, remote_hosts=settings.CLUSTER_SERVERS)
class Store:
def __init__(self, directories=[], remote_hosts=[]):
self.directories = directories
self.remote_hosts = remote_hosts
self.remote_stores = [ RemoteStore(host)
for host in remote_hosts if not is_local_interface(host) ]
...
def find_first():
...
remote_requests = [ r.find(query) for r in self.remote_stores if r.available ]
...
It is safe to have exactly the same CLUSTER_SERVERS option for all webapps in a cluster
(less template work with Chef/Puppet)
Though, there are some edge-cases. https://github.com/graphite-project/graphite-web/issues/222
CARBONLINK_HOSTS should contain only local carbon-cache instances, not all DESTINATIONS list.
Webapp will take care of selecting proper carbon-cache instance for the metric, although it has a different
list of items in his hash ring .
https://answers.launchpad.net/graphite/+question/228472
webapp/graphite/render/datalib.py
# Data retrieval API
def fetchData(requestContext, pathExpr):
...
if requestContext['localOnly']:
store = LOCAL_STORE
else:
store = STORE
for dbFile in store.find(pathExpr):
log.metric_access(dbFile.metric_path)
dbResults = dbFile.fetch( timestamp(startTime), timestamp(endTime) )
try:
cachedResults = CarbonLink.query(dbFile.real_metric)
results = mergeResults(dbResults, cachedResults)
except:
log.exception()
results = dbResults
if not results:
continue
...
return seriesList
Useful links:
http://graphite.readthedocs.org
http://www.aosabook.org/en/graphite.html
http://rcrowley.org/articles/federated-graphite.html
http://bitprophet.org/blog/2013/03/07/graphite/
http://boopathi.in/blog/the-graphite-story-directi
https://answers.launchpad.net/graphite/+question/228472

More Related Content

What's hot

Grafana optimization for Prometheus
Grafana optimization for PrometheusGrafana optimization for Prometheus
Grafana optimization for PrometheusMitsuhiro Tanda
 
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)Apache Apex
 
Flink Forward Berlin 2017: Steffen Hausmann - Build a Real-time Stream Proces...
Flink Forward Berlin 2017: Steffen Hausmann - Build a Real-time Stream Proces...Flink Forward Berlin 2017: Steffen Hausmann - Build a Real-time Stream Proces...
Flink Forward Berlin 2017: Steffen Hausmann - Build a Real-time Stream Proces...Flink Forward
 
InfluxDB 2.0: Dashboarding 101 by David G. Simmons
InfluxDB 2.0: Dashboarding 101 by David G. SimmonsInfluxDB 2.0: Dashboarding 101 by David G. Simmons
InfluxDB 2.0: Dashboarding 101 by David G. SimmonsInfluxData
 
Netflix running Presto in the AWS Cloud
Netflix running Presto in the AWS CloudNetflix running Presto in the AWS Cloud
Netflix running Presto in the AWS CloudZhenxiao Luo
 
Spark Summit EU talk by Ram Sriharsha and Vlad Feinberg
Spark Summit EU talk by Ram Sriharsha and Vlad FeinbergSpark Summit EU talk by Ram Sriharsha and Vlad Feinberg
Spark Summit EU talk by Ram Sriharsha and Vlad FeinbergSpark Summit
 
Spacecrafts Made Simple: How Loft Orbital Delivers Unparalleled Speed-to-Spac...
Spacecrafts Made Simple: How Loft Orbital Delivers Unparalleled Speed-to-Spac...Spacecrafts Made Simple: How Loft Orbital Delivers Unparalleled Speed-to-Spac...
Spacecrafts Made Simple: How Loft Orbital Delivers Unparalleled Speed-to-Spac...InfluxData
 
Dato vs GraphX
Dato vs GraphXDato vs GraphX
Dato vs GraphXKeira Zhou
 
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData InfluxData
 
Map Reduce along with Amazon EMR
Map Reduce along with Amazon EMRMap Reduce along with Amazon EMR
Map Reduce along with Amazon EMRABC Talks
 
An Introduction to the Heatmap / Histogram Plugin
An Introduction to the Heatmap / Histogram PluginAn Introduction to the Heatmap / Histogram Plugin
An Introduction to the Heatmap / Histogram PluginMitsuhiro Tanda
 
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...InfluxData
 
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...InfluxData
 
Explore your prometheus data in grafana - Promcon 2018
Explore your prometheus data in grafana - Promcon 2018Explore your prometheus data in grafana - Promcon 2018
Explore your prometheus data in grafana - Promcon 2018Grafana Labs
 
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow managementIntro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow managementBurasakorn Sabyeying
 

What's hot (20)

Spark on Yarn @ Netflix
Spark on Yarn @ NetflixSpark on Yarn @ Netflix
Spark on Yarn @ Netflix
 
Grafana optimization for Prometheus
Grafana optimization for PrometheusGrafana optimization for Prometheus
Grafana optimization for Prometheus
 
Data Integration
Data IntegrationData Integration
Data Integration
 
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)
 
Flink Forward Berlin 2017: Steffen Hausmann - Build a Real-time Stream Proces...
Flink Forward Berlin 2017: Steffen Hausmann - Build a Real-time Stream Proces...Flink Forward Berlin 2017: Steffen Hausmann - Build a Real-time Stream Proces...
Flink Forward Berlin 2017: Steffen Hausmann - Build a Real-time Stream Proces...
 
InfluxDB 2.0: Dashboarding 101 by David G. Simmons
InfluxDB 2.0: Dashboarding 101 by David G. SimmonsInfluxDB 2.0: Dashboarding 101 by David G. Simmons
InfluxDB 2.0: Dashboarding 101 by David G. Simmons
 
Netflix running Presto in the AWS Cloud
Netflix running Presto in the AWS CloudNetflix running Presto in the AWS Cloud
Netflix running Presto in the AWS Cloud
 
Spark Summit EU talk by Ram Sriharsha and Vlad Feinberg
Spark Summit EU talk by Ram Sriharsha and Vlad FeinbergSpark Summit EU talk by Ram Sriharsha and Vlad Feinberg
Spark Summit EU talk by Ram Sriharsha and Vlad Feinberg
 
Spacecrafts Made Simple: How Loft Orbital Delivers Unparalleled Speed-to-Spac...
Spacecrafts Made Simple: How Loft Orbital Delivers Unparalleled Speed-to-Spac...Spacecrafts Made Simple: How Loft Orbital Delivers Unparalleled Speed-to-Spac...
Spacecrafts Made Simple: How Loft Orbital Delivers Unparalleled Speed-to-Spac...
 
Airflow for Beginners
Airflow for BeginnersAirflow for Beginners
Airflow for Beginners
 
Dato vs GraphX
Dato vs GraphXDato vs GraphX
Dato vs GraphX
 
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
 
Map Reduce along with Amazon EMR
Map Reduce along with Amazon EMRMap Reduce along with Amazon EMR
Map Reduce along with Amazon EMR
 
Open source data ingestion
Open source data ingestionOpen source data ingestion
Open source data ingestion
 
An Introduction to the Heatmap / Histogram Plugin
An Introduction to the Heatmap / Histogram PluginAn Introduction to the Heatmap / Histogram Plugin
An Introduction to the Heatmap / Histogram Plugin
 
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...
 
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
 
Storm over gearpump
Storm over gearpumpStorm over gearpump
Storm over gearpump
 
Explore your prometheus data in grafana - Promcon 2018
Explore your prometheus data in grafana - Promcon 2018Explore your prometheus data in grafana - Promcon 2018
Explore your prometheus data in grafana - Promcon 2018
 
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow managementIntro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
 

Similar to Graphite cluster setup blueprint

Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWSGrant Ellis
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWSGrant Ellis
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesSreenivas Makam
 
Deploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsDeploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsShannon McFarland
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB
 
Automating auto-scaled load balancer based on linux and vm orchestrator
Automating auto-scaled load balancer based on linux and vm orchestratorAutomating auto-scaled load balancer based on linux and vm orchestrator
Automating auto-scaled load balancer based on linux and vm orchestratorAndrew Yongjoon Kong
 
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeAcademy
 
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them AllScylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them AllScyllaDB
 
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...NGINX, Inc.
 
Deep dive in container service discovery
Deep dive in container service discoveryDeep dive in container service discovery
Deep dive in container service discoveryDocker, Inc.
 
Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)DongHyeon Kim
 
Cloud Foundry Open Tour China (english)
Cloud Foundry Open Tour China (english)Cloud Foundry Open Tour China (english)
Cloud Foundry Open Tour China (english)marklucovsky
 
RedisConf17 - Lyft - Geospatial at Scale - Daniel Hochman
RedisConf17 - Lyft - Geospatial at Scale - Daniel HochmanRedisConf17 - Lyft - Geospatial at Scale - Daniel Hochman
RedisConf17 - Lyft - Geospatial at Scale - Daniel HochmanRedis Labs
 
Geospatial Indexing at Scale: The 15 Million QPS Redis Architecture Powering ...
Geospatial Indexing at Scale: The 15 Million QPS Redis Architecture Powering ...Geospatial Indexing at Scale: The 15 Million QPS Redis Architecture Powering ...
Geospatial Indexing at Scale: The 15 Million QPS Redis Architecture Powering ...Daniel Hochman
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
OSCON 2011 Learning CouchDB
OSCON 2011 Learning CouchDBOSCON 2011 Learning CouchDB
OSCON 2011 Learning CouchDBBradley Holt
 
Ports, pods and proxies
Ports, pods and proxiesPorts, pods and proxies
Ports, pods and proxiesLibbySchulze
 
Kubernetes at Datadog Scale
Kubernetes at Datadog ScaleKubernetes at Datadog Scale
Kubernetes at Datadog ScaleDocker, Inc.
 
Istio Playground
Istio PlaygroundIstio Playground
Istio PlaygroundQAware GmbH
 

Similar to Graphite cluster setup blueprint (20)

Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and Kubernetes
 
Deploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsDeploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack Environments
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
 
Automating auto-scaled load balancer based on linux and vm orchestrator
Automating auto-scaled load balancer based on linux and vm orchestratorAutomating auto-scaled load balancer based on linux and vm orchestrator
Automating auto-scaled load balancer based on linux and vm orchestrator
 
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
 
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them AllScylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
 
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
 
Deep dive in container service discovery
Deep dive in container service discoveryDeep dive in container service discovery
Deep dive in container service discovery
 
Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)
 
Cloud Foundry Open Tour China (english)
Cloud Foundry Open Tour China (english)Cloud Foundry Open Tour China (english)
Cloud Foundry Open Tour China (english)
 
RedisConf17 - Lyft - Geospatial at Scale - Daniel Hochman
RedisConf17 - Lyft - Geospatial at Scale - Daniel HochmanRedisConf17 - Lyft - Geospatial at Scale - Daniel Hochman
RedisConf17 - Lyft - Geospatial at Scale - Daniel Hochman
 
Geospatial Indexing at Scale: The 15 Million QPS Redis Architecture Powering ...
Geospatial Indexing at Scale: The 15 Million QPS Redis Architecture Powering ...Geospatial Indexing at Scale: The 15 Million QPS Redis Architecture Powering ...
Geospatial Indexing at Scale: The 15 Million QPS Redis Architecture Powering ...
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
OSCON 2011 Learning CouchDB
OSCON 2011 Learning CouchDBOSCON 2011 Learning CouchDB
OSCON 2011 Learning CouchDB
 
Ports, pods and proxies
Ports, pods and proxiesPorts, pods and proxies
Ports, pods and proxies
 
Kubernetes at Datadog Scale
Kubernetes at Datadog ScaleKubernetes at Datadog Scale
Kubernetes at Datadog Scale
 
Istio Playground
Istio PlaygroundIstio Playground
Istio Playground
 

Recently uploaded

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Graphite cluster setup blueprint

  • 1. IP: 10.4.0.2 Host: graphite-02 IP: 10.4.0.1 Host: graphite-01 [cache:a] line_receiver_interface 0.0.0.0 line_receiver_port 2103 pickle_receiver_interface 0.0.0.0 pickle_receiver_port 2104 cache_query_interface 0.0.0.0 cache_query_port 7102 [cache:b] line_receiver_interface 0.0.0.0 line_receiver_port 2203 pickle_receiver_interface 0.0.0.0 pickle_receiver_port 2204 cache_query_interface 0.0.0.0 cache_query_port 7202 [relay] line_receiver_interface = 0.0.0.0 line_receiver_port = 2003 pickle_receiver_interface = 0.0.0.0 pickle_receiver_port = 2004 relay_method = consistent-hashing replication_factor = 1 Destinations = [ 10.4.0.1:2104:a, 10.4.0.1:2204:b, 10.4.0.2:2104:a, 10.4.0.2:2204:b ] [cache:a] line_receiver_interface 0.0.0.0 line_receiver_port 2103 pickle_receiver_interface 0.0.0.0 pickle_receiver_port 2104 cache_query_interface 0.0.0.0 cache_query_port 7102 [cache:b] line_receiver_interface 0.0.0.0 line_receiver_port 2203 pickle_receiver_interface 0.0.0.0 pickle_receiver_port 2204 cache_query_interface 0.0.0.0 cache_query_port 7202 [relay] line_receiver_interface = 0.0.0.0 line_receiver_port = 2003 pickle_receiver_interface = 0.0.0.0 pickle_receiver_port = 2004 relay_method = consistent-hashing replication_factor = 1 Destinations = [ 10.4.0.1:2104:a, 10.4.0.1:2204:b, 10.4.0.2:2104:a, 10.4.0.2:2204:b ] [aggregator] line_receiver_interface = 0.0.0.0 line_receiver_port = 2013 pickle_receiver_interface = 0.0.0.0 pickle_receiver_port = 2014 [aggregator] line_receiver_interface = 0.0.0.0 line_receiver_port = 2013 pickle_receiver_interface = 0.0.0.0 pickle_receiver_port = 2014 load balancer IP: 10.4.0.10 Host: graphite TCP ports: 2003, 2004 HTTP ports: 80 [webapp] port = 80 memcache_hosts = [ “rf-1.cache.amazonaws.com” ] cluster_servers = [ “10.4.0.2:80” ] remote_rendering = false carbonlink_hosts = [ “10.4.0.1:7102”, “10.4.0.1:7202” ] [webapp] port = 80 memcache_hosts = [ “rf-1.cache.amazonaws.com” ] cluster_servers = [ “10.4.0.2:80” ] remote_rendering = false carbonlink_hosts = [ “10.4.0.2:7102”, “10.4.0.2:7202” ] adobrosynets@recordedfuture.com
  • 2. IP: 10.4.0.2 Host: graphite-02 IP: 10.4.0.1 Host: graphite-01 [cache:a] line_receiver_port 2103 pickle_receiver_port 2104 cache_query_port 7102 [cache:b] line_receiver_port 2203 pickle_receiver_port 2204 cache_query_port 7202 [relay] line_receiver_port = 2003 pickle_receiver_port = 2004 relay_method = consistent-hash replication_factor = 1 Destinations = [ 10.4.0.1:2104:a,10.4.0.1:2204:b, 10.4.0.2:2104:a,10.4.0.2:2204:b, 10.4.0.3:2104:a,10.4.0.3:2204:b ] [cache:a] line_receiver_port 2103 pickle_receiver_port 2104 cache_query_port 7102 [cache:b] line_receiver_port 2203 pickle_receiver_port 2204 cache_query_port 7202 [relay] line_receiver_port = 2003 pickle_receiver_port = 2004 relay_method = consistent-hash replication_factor = 1 Destinations = [ 10.4.0.1:2104:a,10.4.0.1:2204:b, 10.4.0.2:2104:a,10.4.0.2:2204:b , 10.4.0.3:2104:a,10.4.0.3:2204:b ] [aggregator] line_receiver_port = 2013 pickle_receiver_port = 2014 [aggregator] line_receiver_port = 2013 pickle_receiver_port = 2014 load balancer IP: 10.4.0.10 Host: graphite TCP ports: 2003, 2004 HTTP ports: 80 [webapp] memcache_hosts = [ “rf-1.cache” ] cluster_servers = [ “10.4.0.2:80”, “10.4.0.3:80” ] carbonlink_hosts = [ “10.4.0.1:7102”, “10.4.0.1:7202” ] [webapp] memcache_hosts = [ “rf-1.cache” ] cluster_servers = [ “10.4.0.1:80”, “10.4.0.3:80” ] carbonlink_hosts = [ “10.4.0.2:7102”, “10.4.0.2:7202” ] IP: 10.4.0.3 Host: graphite-03 [cache:a] line_receiver_port 2103 pickle_receiver_port 2104 cache_query_port 7102 [cache:b] line_receiver_port 2203 pickle_receiver_port 2204 cache_query_port 7202 [relay] line_receiver_port = 2003 pickle_receiver_port = 2004 relay_method = consistent-hash replication_factor = 1 Destinations = [ 10.4.0.1:2104:a,10.4.0.1:2204:b, 10.4.0.2:2104:a,10.4.0.2:2204:b , 10.4.0.3:2104:a,10.4.0.3:2204:b ] [aggregator] line_receiver_port = 2013 pickle_receiver_port = 2014 [webapp] memcache_hosts = [ “rf-1.cache” ] cluster_servers = [ “10.4.0.1:80”, “10.4.0.2:80” ] carbonlink_hosts = [ “10.4.0.3:7102”, “10.4.0.3:7202” ] adobrosynets@recordedfuture.com
  • 3. Key points - Many nodes, each node running carbon-relay, webapp, carbon-cache(s). - Use at least two carbon-cache processes at the node to utilize performance (typically one process per CPU core) - All carbon-cache instances use the same schema definitions for whisper files - All monitoring agents (statsd/sensu/gdash/codehale/collectd/etc) use loadbalancer front-end (HAproxy or ELB) to send/query metrics. - Each carbon-relay may route metrics to any carbon-cache instance at any graphite server in cluster. - All carbon-relays use 'consistent-hashing' method and have exactly the same DESTINATIONS list (carbon.conf DESTINATIONS. Order is important?) - All webapp processes share exactly the same memcache instance(s) (local_settings.py MEMCACHE_HOSTS) - Each webapp can may query only local carbon-cache instances. (local_settings.py CARBONLINK_HOSTS) - All webapps may contain not only other webapps in CLUSTER_SERVERS , but also itself. (local_settings.py, as of 0.9.10 version) - Each webapp CARBONLINK_HOSTS must contain only local instances from DESTINATIONS (order is not important ) - In terms of AWS EC2, graphite nodes are supposed to be installed in the same Region. - Aggregator is not that useful. It is better to aggregate somewhere else (statsd/diamond) and send to graphite.
  • 4. webapp/graphite/storage.py STORE = Store(settings.DATA_DIRS, remote_hosts=settings.CLUSTER_SERVERS) class Store: def __init__(self, directories=[], remote_hosts=[]): self.directories = directories self.remote_hosts = remote_hosts self.remote_stores = [ RemoteStore(host) for host in remote_hosts if not is_local_interface(host) ] ... def find_first(): ... remote_requests = [ r.find(query) for r in self.remote_stores if r.available ] ... It is safe to have exactly the same CLUSTER_SERVERS option for all webapps in a cluster (less template work with Chef/Puppet) Though, there are some edge-cases. https://github.com/graphite-project/graphite-web/issues/222
  • 5. CARBONLINK_HOSTS should contain only local carbon-cache instances, not all DESTINATIONS list. Webapp will take care of selecting proper carbon-cache instance for the metric, although it has a different list of items in his hash ring . https://answers.launchpad.net/graphite/+question/228472 webapp/graphite/render/datalib.py # Data retrieval API def fetchData(requestContext, pathExpr): ... if requestContext['localOnly']: store = LOCAL_STORE else: store = STORE for dbFile in store.find(pathExpr): log.metric_access(dbFile.metric_path) dbResults = dbFile.fetch( timestamp(startTime), timestamp(endTime) ) try: cachedResults = CarbonLink.query(dbFile.real_metric) results = mergeResults(dbResults, cachedResults) except: log.exception() results = dbResults if not results: continue ... return seriesList