High performance Graphite frontend in go
Branch: master
Clone or download
grzkv Merge pull request #85 from bookingcom/grzkv/dockerize
Added docker configs for all essential services + docker compose setup for the full stack
Latest commit 3c78dc2 Feb 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Merge branch 'master' into grzkv/tagged_request_counting Feb 12, 2019
cache remove memcache support Apr 18, 2017
carbonapipb s|go-graphite/carbonapi|bookingcom/carbonapi|g Oct 1, 2018
cfg Added configs for render and find exp histograms Feb 11, 2019
cmd Refactored configuration for carbonapi, moved several entities from g… Jan 18, 2019
config Config changes: Feb 14, 2019
date s|go-graphite/carbonapi|bookingcom/carbonapi|g Oct 1, 2018
doc Added script for generating difference in functions by calling /funct… Feb 7, 2019
docker Config changes: Feb 14, 2019
expr Fixed formatting in the whole project to conform to gofmt Jan 27, 2019
intervalset add pickle support for graphtie-web 1.0 Apr 21, 2017
limiter Monitor limiter saturation Aug 7, 2018
mstats mstats: add TotalAlloc Jan 25, 2016
pathcache Fix various linter issues Apr 25, 2017
pkg Allow application/octet-stream to be used as protobuf content type Feb 14, 2019
scripts s|go-graphite/carbonapi|bookingcom/carbonapi|g Oct 1, 2018
tests Fix some breaking tests Dec 17, 2018
util Make context header consistent with other projects Oct 1, 2018
vendor Updating dependencies. Oct 4, 2018
.gitignore Added codecov test coverage reporting, added badge to readme, updated… Jan 20, 2019
.travis.yml Added codecov test coverage reporting, added badge to readme, updated… Jan 20, 2019
AUTHORS.txt Update AUTHORS Nov 22, 2018
COMPATIBILITY.md Fixed caps in doc Jan 30, 2019
Gopkg.lock Updated dependencies files Jan 12, 2019
Gopkg.toml Instrument API and Zipper with prometheus Aug 29, 2018
LICENSE Move LICENCE back to root folder Sep 28, 2018
Makefile Merge branch 'master' into grzkv/makefile_add_cairo Jan 21, 2019
README.md Cleaned old build script and updated readme. Feb 14, 2019
docker-compose.yaml Added functional docker-compose Feb 14, 2019

README.md

Carbonapi

Build Status Go Report Card codecov gitter

Carbonapi is a Go-based Graphite frontend. It provides two binaries, carbonapi and carbonzipper, that unify responses from multiple Graphite backends and provide math and graphing functions.

This project is run in production at Booking.com. We are in the process of documenting its installation and setup, but can answer any questions that interested persons have.

CarbonAPI supports a significant subset of graphite functions; see COMPATIBILITY. In our testing it has shown to be 5x-10x faster than requesting data from graphite-web.

Build

To build both the carbonapi and carbonzipper binaries, run:

make

To build the binaries with debug symbols, run:

make debug

We do not provide packages for install at this time. Contact us if you're interested in those.

Run

Run the full stack carbonapi -> zipper -> go-carbon with:

docker-compose up

You can feed in sample data with:

echo "test.test 5 `date +%s`" | nc -c localhost 2003

and get it back with:

curl 'http://localhost:8081/render?target=test.test&format=json&from=-10m'

Requirements

We recommend using at least version 1.10 of Go. Booking.com builds its binaries with the latest stable release of Go at any time. The binaries likely compile on older versions of Go (at least 1.9), but we don't test the build against them because of problems with computing test coverage of the whole project.

At the moment, we only guarantee that Carbonapi can talk to the go-carbon Graphite store. We are interested in supporting other stores.

Cairo support

The current supported cairo version is v1.14.6.

OSX Build Notes

Some additional steps may be needed to build carbonapi with cairo rendering on MacOSX.

Install cairo:

brew install Caskroom/cask/xquartz

brew install cairo --with-x11

Acknowledgement and history

This program was originally developed for Booking.com. With approval from Booking.com, the code was generalised and published as Open Source on GitHub, for which the author would like to express his gratitude.

This is Booking.com's fork of go-graphite/carbonapi. That project's current performance characteristics are not sufficient for our production needs, and we decided it had moved too far ahead for us to be able to improve them effectively. We thus reverted back to versions 0.9.2 of carbonapi and 0.74 of carbonzipper, and are moving more slowly in the same direction as the original project.

License

This code is licensed under the BSD-2 license.