|
| 1 | +# Metrictank |
| 2 | + |
1 | 3 | [](https://circleci.com/gh/grafana/metrictank)
|
2 | 4 | [](https://goreportcard.com/report/github.com/grafana/metrictank)
|
3 | 5 | [](https://godoc.org/github.com/grafana/metrictank)
|
4 | 6 |
|
| 7 | +## Introduction |
5 | 8 |
|
6 |
| -## introduction |
7 |
| -*Metrictank is a cassandra-backed, metrics2.0 based, multi-tenant timeseries database for Graphite and friends* |
| 9 | +Metrictank is a multi-tenant timeseries engine for Graphite and friends. |
| 10 | +It provides long term storage, high availability, efficient storage, retrieval and processing for large scale environments. |
8 | 11 |
|
9 |
| -metrictank is a timeseries database, inspired by the [Facebook gorilla paper](http://www.vldb.org/pvldb/vol8/p1816-teller.pdf). |
10 |
| -Most notably, it employs the compression mechanism described in the paper to dramatically lower storage overhead, |
11 |
| -as well as data chunking to lower the load on cassandra. Graphite users are first-class citizens. |
| 12 | +[GrafanaLabs](http://grafana.com) has been running metrictank in production since December 2015. |
| 13 | +It currently requires an external datastore like Cassandra, and we highly recommend using Kafka to support clustering, as well |
| 14 | +as a clustering manager like Kubernetes. This makes it non-trivial to operate, though GrafanaLabs has an on-premise product |
| 15 | +that makes this process much easier. |
12 | 16 |
|
13 |
| -## status |
| 17 | +## Features |
14 | 18 |
|
15 |
| -While [GrafanaLabs](http://grafana.com) has been running metrictank in production since december 2015, there are still plenty of kinks to work out |
16 |
| -and bugs to fix. It should be considered an *alpha* project. |
| 19 | +* 100% open source |
| 20 | +* Inspired by the [Facebook gorilla paper](http://www.vldb.org/pvldb/vol8/p1816-teller.pdf). |
| 21 | +Most notably, the heavily compressed chunks dramatically lower cpu, memory and storage requirements. |
| 22 | +* Writeback RAM cache, serving most data out of memory. |
| 23 | +* Graphite is a first class citizen. As of graphite-1.0.1, metrictank can be used as a graphite CLUSTER_SERVER. |
| 24 | +* Can also act as a Graphite server itself, though the functions processing library is only partially implemented, metrictank proxies requests to Graphite if it can't handle the required processing (for those requests it will degrade to just being the backend storage) |
| 25 | +* Can also be used with Prometheus (but the experience won't be as good as something built just for prometheus, which we're also working on) |
| 26 | +* Accurate, flexible rollups by storing min/max/sum/count (which also gives us average). |
| 27 | +So we can do consolidation (combined runtime+archived) accurately and correctly, |
| 28 | +[unlike most other graphite backends like whisper](https://grafana.com/blog/2016/03/03/25-graphite-grafana-and-statsd-gotchas/#runtime.consolidation) |
| 29 | +* Flexible tenancy: can be used as single tenant or multi tenant. Selected data can be shared across all tenants. |
| 30 | +* Input options: carbon, metrics2.0, kafka, Prometheus (soon: json or msgpack over http) |
| 31 | +* Guards against excessive data requests |
17 | 32 |
|
18 |
| -## limitations |
| 33 | +## Limitations |
19 | 34 |
|
20 |
| -* no performance/availability isolation between tenants per instance. (only data isolation) |
21 |
| -* minimum computation locality: we move the data from storage to processing code, which is both metrictank and graphite. |
22 |
| -* Backlog replaying and query responses, should be faster. [A Go GC issue may occasionally inflate response times](https://github.com/golang/go/issues/14812). |
23 |
| -* we use metrics2.0 in native input protocol and indexes, but [barely do anything with it yet](https://github.com/grafana/metrictank/blob/master/docs/tags.md). |
| 35 | +* No performance/availability isolation between tenants per instance. (only data isolation) |
| 36 | +* Minimum computation locality: we move the data from storage to processing code, which is both metrictank and graphite. |
| 37 | +* Backlog replaying and queries can be made faster. [A Go GC issue may occasionally inflate response times](https://github.com/golang/go/issues/14812). |
| 38 | +* We use metrics2.0 in native input protocol and indexes, but [barely do anything with it yet](https://github.com/grafana/metrictank/blob/master/docs/tags.md). |
24 | 39 | * can't overwrite old data. We support reordering the most recent time window but that's it. (unless you restart MT)
|
25 | 40 |
|
26 |
| -## interesting design characteristics (feature or limitation.. up to you) |
| 41 | +## Interesting design characteristics (feature or limitation... up to you) |
27 | 42 |
|
28 |
| -* upgrades / process restarts requires running multiple instances (potentially only for the duration of the maintenance) and re-assigning the primary role. |
| 43 | +* Upgrades / process restarts requires running multiple instances (potentially only for the duration of the maintenance) and possibly re-assigning the primary role. |
29 | 44 | Otherwise data loss of current chunks will be incurred. See [operations guide](https://github.com/grafana/metrictank/blob/master/docs/operations.md)
|
30 | 45 | * clustering works best with an orchestrator like kubernetes. MT itself does not automate master promotions. See [clustering](https://github.com/grafana/metrictank/blob/master/docs/clustering.md) for more.
|
31 |
| -* only float64 values. Ints and bools currently stored as floats (works quite well due to the gorilla compression), |
| 46 | +* Only float64 values. Ints and bools currently stored as floats (works quite well due to the gorilla compression), |
32 | 47 | No text support.
|
33 |
| -* only uint32 unix timestamps in second resolution. For higher resolution, consider [streaming directly to grafana](https://grafana.com/blog/2016/03/31/using-grafana-with-intels-snap-for-ad-hoc-metric-exploration/) |
34 |
| -* no data locality: doesn't seem needed yet to put related series together. |
| 48 | +* Only uint32 unix timestamps in second resolution. For higher resolution, consider [streaming directly to grafana](https://grafana.com/blog/2016/03/31/using-grafana-with-intels-snap-for-ad-hoc-metric-exploration/) |
| 49 | +* No data locality: doesn't seem needed yet to put related series together. |
35 | 50 |
|
36 |
| -## main features |
37 |
| - |
38 |
| -* 100% open source |
39 |
| -* graphite is a first class citizen. As of graphite-1.0.1, metrictank can be used as a graphite CLUSTER_SERVER. |
40 |
| -* can also be used with Prometheus (but the experience won't be as good as something built just for prometheus, which we're also working on) |
41 |
| -* accurate, flexible rollups by storing min/max/sum/count (which also gives us average). |
42 |
| -So we can do consolidation (combined runtime+archived) accurately and correctly, |
43 |
| -[unlike most other graphite backends like whisper](https://grafana.com/blog/2016/03/03/25-graphite-grafana-and-statsd-gotchas/#runtime.consolidation) |
44 |
| -* metrictank acts as a writeback RAM cache for recent data. |
45 |
| -* flexible tenancy: can be used as single tenant or multi tenant. Selected data can be shared across all tenants. |
46 |
| -* input options: carbon, metrics2.0, kafka. (soon: json or msgpack over http) |
47 |
| -* guards against excessive data requests |
48 |
| -* efficient data compression and efficient use of Cassandra. |
49 | 51 |
|
50 | 52 | ## Docs
|
51 | 53 |
|
|
0 commit comments