Test driving carbonapi and graphite
First up, what’s Graphite?
First released back in 2008, Graphite collects, stores, and displays time-series data in real time. It does NOT collect data - there is a whole ecosystem of tools that do this.
Its basic architecture is that it has 3 components:
- Carbon - which is a daemon that listens for time-series data. Send your data here and it gets shoved into…
- Whisper - simple time series database. You can swap out the backend - you don’t HAVE to use Whisper - lots of storage backend alternatives exist.
- Graphite Webapp - Python+Django webapp that renders graphs. This is the bit the user talks to.
You could have something like Grafana betweeen Graphite-web and your users
Looking at the commit history, at the time of writing, Carbon hasn’t been updated in 6 months, and was only sporadically updated in the preceeding years.
These components, as we’ve said, can be swapped out. Which brings us to…
The Go-graphite suite is a bunch of Golang replacements for Graphite’s Python implementations. I guess this is for performance reasons - Graphite is written in Python and go-carbon is in Go (GoLang). For example, go-carbon is a “Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister”. It claims a 10-20x performance improvement over the OG Python implementation:
taken from https://github.com/go-graphite/go-carbon .
In our sample architecture, swapping out for the go-graphite components might look something like:
So here we’ve just straight swapped in Go implementations of the Graphite ecosystem.
OK, so what does Carbonapi offer?
Carbonapi is my main focus here. Carbonapi provides a frontend to Graphite. I think the reason for Carbonapi’s existence is it’s more performance that bare Graphite - Graphite is written in Python. Carbonapi is an alternative to
graphite-web that is claimed to be 5-10x faster.
You can use Carbonapi to tie together multiple Graphite backends.
Although it’s something of a replacement for
graphite-web, Carbonapi is not 100% compatible - see their compatibility documentation.
Prominent forks of Carbonapi
Booking.com have a fork that meets their performance profile.
I’m still exploring and learning this space, this article is mostly for my own notes.