Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why OpenTSDB chose HBase for Time Series data storage?

I would really appreciate if somebody put some light on the choice of HBase as a data storage engine for OpenTSDB?

Which other choices, such as Whisper (Graphite front-end + Carbon persistence), were considered?

How is a column-oriented db such as HBase a better choice for time-series data?

like image 583
Rajan Avatar asked Aug 31 '12 21:08

Rajan


People also ask

Is HBase a time series database?

Time-series applications (sensor data, application/system logging events, user interactions etc) present a new set of data storage challenges: very high velocity and very high volume of data. This talk will present the recent development in Apache HBase that make it a good fit for time-series applications.

How do you store time series data?

Storing time series data. Time series data is best stored in a time series database (TSDB) built specifically for handling metrics and events that are time-stamped. This is because time series data is often ingested in massive volumes that require a purpose-built database designed to handle that scale.


1 Answers

I chose HBase because it scales. Whisper is much like RRD, it's a fixed-size database, it must destroy data in order to work within its space constraints. HBase offers the following properties that make it very well suited for large scale time series databases:

  1. Linear scaling. Want to store data? Add more nodes. At StumbleUpon, where I wrote OpenTSDB, our time series data was co-located on a 20-node cluster that was primarily used for analytics and batch processing. The cluster grew to 120 nodes fairly quickly, and meanwhile OpenTSDB, which makes up only a tiny fraction of the cluster's workload, grew to half a trillion data points.
  2. Automatic replication. Your data is stored in HDFS, which by default means 3 replicas on 3 different machines. If a machine or a drives dies, no big deal. Drives and machines die all the time when you build commodity servers. But the thing is: you don't really care.
  3. Efficient scans. Most time series data is used to answer questions that are like "what are the data points between time X and Y". If you structure your keys properly, you can implement this very efficiently with HBase with a simple scan operation.
  4. High write throughput. The Bigtable design, which HBase follows, uses LSM trees instead of, say, B-trees, to make writes cheaper (at the expense of potentially more expensive reads).

The fact that HBase is column oriented wasn't nearly as important a consideration as the fact that it's a big sorted key-value system that really scales.

All RRD-based and RRD-derived tools couldn't satisfy the scale requirements of being able to accurately store billions and billions of data points forever for very cheap (just a few bytes of actual disk space per data point).

like image 123
tsuna Avatar answered Sep 26 '22 08:09

tsuna