Architecture overview

This page provides an overview of the architecture of the Graphite proxy services and how they interact with the other GEM services.

Graphite proxy

Note that the “Graphite deployment” shown in the architecture diagram is optional, but without it the number of functions which are available in the Graphite query language is limited to a subset of what standard Graphite provides.


The Graphite proxy in GEM exposes the same write and read endpoints as Grafana Cloud Graphite. All endpoints have a /graphite/ prefix.

If using access policies, write endpoints require the metrics:write scope and read endpoints require the metrics:read scope.

Metrics ingestion

This section explains the components of a typical ingestion pipeline. The use of Carbon-relay-ng is optional, if the metrics producer has the ability to send its metrics in the right format via HTTP(S) directly to the Graphite write proxy then Carbon-relay-ng could be omitted, but since Carbon-relay-ng comes with lots of useful features such as buffering of failed writes it is recommended to use it.


Carbon-relay-ng is a relay for carbon streams, to make it forward data to the Graphite proxy a gnet route needs to be configured and pointed at the Graphite ingest API (<GEM gateway URL>/graphite/metrics) on the Graphite write proxy. It comes with a wide variety of features, for a detailed documentation of them refer to Carbon-relay-ng. The official documentation also comes with an example configuration which demonstrates the usage a gnet route, refer to grafanaNet route.

Graphite write proxy

The Graphite write proxy accepts the incoming requests which Carbon-relay-ng is sending and translates the Graphite metrics into Prometheus metrics, then it forwards them to the GEM distributors. For more information about how the process works, refer to Graphite write proxy.

Metrics querying

This section explains the components that are used to query Graphite metrics.

Graphite Querier

The Graphite querier provides the Graphite render API, for more information about the API refer to the Graphite documentation. It fetches the data required to serve a query from GEM, performs the configured aggregations on the data at query time and runs the requested Graphite functions on the aggregated data. For more information about how the process works, refer to Graphite querier.

Grafana datasource

If you are using the Graphite datasource to query the Graphite proxy, use the URL <GEM gateway URL>/graphite.


Open source Graphite can be used by the Graphite querier to off-load the Graphite function processing of query functions that are not implemented in its own native function library, that way all Graphite functions are available to use.

You can run the Graphite querier without providing it any open source Graphite deployment. However, without the Graphite deployment the set of query functions that are available in the Graphite query language will be limited to a reduced set of very commonly used functions. In order to gain function completeness a Graphite deployment is required.