The Carbon Daemons

When we talk about “Carbon” we mean one or more of various daemons that make up the storage backend of a Graphite installation. In simple installations, there is typically only one daemon, This document gives a brief overview of what each daemon does and how you can use them to build a more sophisticated storage backend.

All of the carbon daemons listen for time-series data and can accept it over a common set of protocols. However, they differ in what they do with the data once they receive it. accepts metrics over various protocols and writes them to disk as efficiently as possible. This requires caching metric values in RAM as they are received, and flushing them to disk on an interval using the underlying whisper library. requires some basic configuration files to run:

The [cache] section tells what ports (2003/2004/7002), protocols (newline delimited, pickle) and transports (TCP/UDP) to listen on.
Defines a retention policy for incoming metrics based on regex patterns. This policy is passed to whisper when the .wsp file is pre-allocated, and dictates how long data is stored for.

As the number of incoming metrics increases, one instance may not be enough to handle the I/O load. To scale out, simply run multiple instances (on one or more machines) behind a or serves two distinct purposes: replication and sharding.

When running with RELAY_METHOD = rules, a instance can run in place of a server and relay all incoming metrics to multiple backend‘s running on different ports or hosts.

In RELAY_METHOD = consistent-hashing mode, a CH_HOST_LIST setting defines a sharding strategy across multiple backends. The same consistent hashing list can be provided to the graphite webapp via CARBONLINK_HOSTS to spread reads across the multiple backends. is configured via:

The [relay] section defines listener host/ports and a RELAY_METHOD
In RELAY_METHOD = rules, pattern/servers tuples define what servers metrics matching certain regex rules are forwarded to. can be run in front of to buffer metrics over time before reporting them into whisper. This is useful when granular reporting is not required, and can help reduce I/O load and whisper file sizes due to lower retention policies. is configured via:

The [aggregator] section defines listener and destination host/ports.
Defines a time interval (in seconds) and aggregation function (sum or average) for incoming metrics matching a certain pattern. At the end of each interval, the values received are aggregated and published to as a single metric.

Project Versions

Table Of Contents

Previous topic

Installing in Virtualenv

Next topic

Configuring Carbon

This Page