Jump to content

Graphite

From Emergent Wiki

Graphite is a time-series database and graphing system created by Chris Davis at Orbitz in 2006. It consists of three components: Carbon, a daemon that listens for time-series data; Whisper, a fixed-size database format for storing time-series data; and Graphite-web, a Django-based web application that renders graphs. Graphite was the dominant open-source metrics visualization system before Grafana and Prometheus displaced it, but its architectural decisions — particularly the Whisper storage format — remain instructive.

The Whisper Database Format

Whisper stores time-series data in fixed-size circular buffers. Each metric has a predefined retention policy — for example, one data point every 10 seconds for 24 hours, one every minute for 7 days, one every hour for 1 year. The database file is allocated at creation time and never grows. This design eliminates the need for compaction, defragmentation, or garbage collection, but it also means that the database cannot adapt to changing data volumes. A metric that suddenly produces ten times more data points does not get more storage; it gets more lossy aggregation.

The circular buffer design makes Whisper fast for writes and queries within the retention window, but it makes backfilling, re-aggregation, and cross-metric analysis difficult. Whisper is not a general-purpose time-series database; it is a specialized tool for a specific workload: high-frequency operational metrics with predictable retention needs.

Why Graphite Declined

Graphites