SlideShare a Scribd company logo
HBaseCon Update
Distributed, Scalable Time Series Database
Chris Larsen clarsen@yahoo-inc.com
Who Am I? (no really, who am I?)
Chris Larsen
Maintainer for OpenTSDB
Software Engineer @ Yahoo!
Monitoring Team
What Is OpenTSDB?
Open Source Time Series Database
Store trillions of data points
Sucks up all data and keeps going
Never lose precision
Scales using HBase, Cassandra
Or Bigtable
What good is it?
Systems Monitoring & Measurement
Servers
Networks
Sensor Data
The Internet of Things
SCADA
Financial Data
Scientific Experiment Results
Use Cases
Backing store for Argus:
Open source monitoring
and alerting system
15 HBase Servers
6 month retention
10M writes per minute
95p query latency < 30 days = 200ms
Moving to 200 node cluster writing at 100M/m
Use Cases
●Monitoring system, network and application
performance and statistics
110 region servers, 10M writes/s ~ 2PB
Multi-tenant and Kerberos secure HBase
~200k writes per second per TSD
Central monitoring for all Yahoo properties
Over 2 billion time series served
Some Other Users
What Are Time Series?
Time Series: data points for an identity
over time
Typical Identity:
Dotted string: web01.sys.cpu.user.0
OpenTSDB Identity:
Metric: sys.cpu.user
Tags (name/value pairs):
host=web01 cpu=0
What Are Time Series?
Data Point:
Metric + Tags
+ Value: 42
+ Timestamp: 1234567890
sys.cpu.user 1234567890 42 host=web01 cpu=0
^ a data point ^
How it Works
Writing Data
1) Open Telnet style socket, write:
put sys.cpu.user 1234567890 42 host=web01 cpu=0
2) ..or, post JSON to:
http://<host>:<port>/api/put
3) .. or import big files with CLI
No schema definition
No RRD file creation
Just write!
Querying Data
Graph with the GUI
CLI tools
HTTP API
Aggregate multiple series
Simple query language
To average all CPUs on host:
start=1h-ago
avg sys.cpu.user
host=web01
HBase Data Tables
tsdb - Data point table. Massive
tsdb-uid - Name to UID and UID to
name mappings
tsdb-meta - Time series index and
meta-data
tsdb-tree - Config and index for
hierarchical naming schema
Data Table Schema
Row key is a concatenation of UIDs and time:
metric + timestamp + tagk1 + tagv1… + tagkN + tagvN
sys.cpu.user 1234567890 42 host=web01 cpu=0
x00x00x01x49x95xFBx70x00x00x01x00x00x01x00x00x02x00x00x02
Timestamp normalized on 1 hour boundaries
All data points for an hour are stored in one row
Enables fast scans of all time series for a metric
…or pass a row key filter for specific time series with
particular tags
New for OpenTSDB 2.2
● Append writes (no more need for TSD
Compactions)
● Row salting and random metric IDs
● Downsampling Fill Policies
● Query filters (wildcard, regex, group by or not)
● Storage Exception plugin for retrying writes
● Released February 2016
New for OpenTSDB 2.3
● Graphite style expressions
● Cross-metric expressions
● Calendar based downsampling
● New data stores
● UID assignment plugin interface
● Datapoint write filter plugin interface
● RC1 released May 2016
● New Committer, Jonathan Creasy
Fuzzy Row Filter
How do you find a single time
series out of 1 million?
For a day?
For a month?
Fuzzy Row Filter
Instead of running a regex
string comparator over each
byte array formatted key…
(?s)^.{9}(?:.{8})*Qx00x00x00x02
E(?:Q)x00x0F‡x42x2BE)(?:.{8})*$
TSDB query takes 1.6 seconds
for 89,726 rows
KEY
Match -> m t1 tagk1 tagv1
No Match -> m t1 tagk1 tagv2
No Match -> m t1 tagk1 tagv1 tagk2 tagv3
No Match -> m t1 tagk1 tagv2 tagk2 tagv4
No Match -> m t1 tagk3 tagv5
No Match -> m t1 tagk3 tagv6
Match -> m t2 tagk tagv1
No Match -> m t2 tagk tagv2
Fuzzy Row Filter
Use a byte mask!
● Use the bloom filter to skip-scan
to the next candidate row.
● Combine with regex (after fuzzy
filter) to filter further.
FuzzyFilter{[FuzzyFilterPair{row_key=[18, 68,
-3, -82, 120, 87, 56, -15, 96, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0],
mask=[0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0,
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1]}]}
Now it takes 0.239 seconds
KEY
Match -> m t1 tagk1 tagv1
No Match -> m t1 tagk1 tagv2
Skip -> m t1 tagk1 tagv1 tagk2 tagv3
m t1 tagk1 tagv2 tagk2 tagv4
m t1 tagk3 tagv5
m t1 tagk3 tagv6
Match -> m t2 tagk tagv1
No Match -> m t2 tagk tagv2
Fuzzy Row Filter
Pros:
● Can improve scan latency by orders of magnitude
● Combines nicely with other filters
Cons:
● All row keys for the match have to be the same, fixed
length
● Doesn’t help much when matching the majority of a set
OR if a set has uniform key lengths
● Doesn’t support bitmasks, only byte masks
AsyncHBase
AsyncHBase is a fully asynchronous, multi-
threaded HBase client
Supports HBase 0.90 to 1.x
Faster and less resource intensive than the
native HBase client
Support for scanner filters, META prefetch,
“fail-fast” RPCs
AsyncHBase in YCSB
● New Yahoo! Cloud Serving Benchmark (YCSB)
module for testing AsyncHBase
● Test Params:
○ 1 YCSB worker thread with workload A for run and load
○ Ran consecutive Async -> HBase -> Async -> HBase… (new YCSB JVM
each run) 50 times
○ HBase 1.0.0 stock Apache with default configs
○ Local host, Macbook Pro
○ 10K rows written/read
○ Async writes for both
AsyncHBase in YCSB
HBase Client
Threads:
238
AsyncHBase
Client
Threads:
22
AsyncHBase in YCSB
AsyncHBase in YCSB
Upcoming in 1.8
●Reverse Scanning
●Multi-Get requests
●Netty 4
●Lots of bug fixes
○Stuck NSRE bugs
○Region client resource leaks
OpenTSDB on Bigtable
● Bigtable
○Hosted Google Service
○Client uses HTTP2 and GRPC for communication
● OpenTSDB heads home
○Based on a time series store on Bigtable at Google
○Identical schema as HBase
○Same filter support (fuzzy filters are coming)
OpenTSDB on Bigtable
● AsyncBigtable
○Implementation of AsyncHBase’s API for drop-in use
○https://github.com/OpenTSDB/asyncbigtable
○Uses HTable API
○Moving to native Bigtable API
● Thanks to Christos of Pythian, Solomon, Carter, Misha,
and the rest of the Google Bigtable team
● https://www.pythian.com/blog/run-opentsdb-google-
bigtable/#
OpenTSDB on Cassandra
● AsyncCassandra - Implementation of AsyncHBase’s
API for drop-in use
● Wraps Netflix’s Astyanax for asynchronous calls
● Requires the ByteOrderedPartitioner and legacy
API
● Same schema as HBase/Bigtable
● Scan filtering performed client side
● May not work with future Cassandra versions
if they drop the API
Community
Salesforce Argus
●Time series monitoring
and alerting
●Multi-series annotations
●Dashboards
Thanks to Tom Valine and the Salesforce engineers
https://medium.com/salesforce-open-source/argus-time-series-monitoring-and-
alerting-d2941f67864#.ez7mbo3ek
https://github.com/SalesforceEng/Argus
Community
Turn Splicer
●API to shard TSDB queries
●Locality advantage hosting
TSDs on region servers
●Query caching
Thanks to Jonathan Creasy and the Turn engineers
https://github.com/turn/splicer
The Future of OpenTSDB
The Future
Reworked query pipeline for selective ordering
of operations
Histogram support
Flexible query caching framework
Distributed queries
Greater data store abstraction
More Information
Thank you to everyone who has helped test, debug and add to OpenTSDB
2.2 and 2.3 including, but not limited to:
Kyle, Ivan, Davide, Liu, Utkarsh, Andy, Anna, Camden, Can, Carlos, Hugo, Isaih, Kevin, Ping, Jonathan
Contribute at github.com/OpenTSDB/opentsdb
Website: opentsdb.net
Documentation: opentsdb.net/docs/build/html
Mailing List: groups.google.com/group/opentsdb
Images
http://photos.jdhancock.com/photo/2013-06-04-212438-the-lonely-vacuum-of-space.html
http://en.wikipedia.org/wiki/File:Semi-automated-external-monitor-defibrillator.jpg
http://upload.wikimedia.org/wikipedia/commons/1/17/Dining_table_for_two.jpg
http://upload.wikimedia.org/wikipedia/commons/9/92/Easy_button.JPG
https://www.flickr.com/photos/verbeeldingskr8/15563333617
http://www.flickr.com/photos/ladydragonflyherworld/4845314274/
http://lego.cuusoo.com/ideas/view/96

More Related Content

PPTX
HBaseCon 2015: OpenTSDB and AsyncHBase Update
PPTX
Update on OpenTSDB and AsyncHBase
PDF
OpenTSDB: HBaseCon2017
PDF
OpenTSDB for monitoring @ Criteo
PDF
OpenTSDB 2.0
PPTX
Rolling Out Apache HBase for Mobile Offerings at Visa
PDF
Argus Production Monitoring at Salesforce
PDF
Tales from Taming the Long Tail
HBaseCon 2015: OpenTSDB and AsyncHBase Update
Update on OpenTSDB and AsyncHBase
OpenTSDB: HBaseCon2017
OpenTSDB for monitoring @ Criteo
OpenTSDB 2.0
Rolling Out Apache HBase for Mobile Offerings at Visa
Argus Production Monitoring at Salesforce
Tales from Taming the Long Tail

What's hot (20)

PPTX
Keynote: Apache HBase at Yahoo! Scale
PDF
hbaseconasia2017: HBase Practice At XiaoMi
PDF
HBaseCon2017 gohbase: Pure Go HBase Client
PDF
HBaseCon2017 Transactions in HBase
PDF
HBaseCon2017 HBase at Xiaomi
PDF
SignalFx: Making Cassandra Perform as a Time Series Database
PDF
CassieQ: The Distributed Message Queue Built on Cassandra (Anton Kropp, Cural...
PDF
HBaseCon2017 Improving HBase availability in a multi tenant environment
PDF
Kafka Summit SF 2017 - Infrastructure for Streaming Applications
PDF
Managing terabytes: When Postgres gets big
PDF
HTTP Analytics for 6M requests per second using ClickHouse, by Alexander Boc...
PDF
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
PDF
Kafka on ZFS: Better Living Through Filesystems
PDF
User Defined Partitioning on PlazmaDB
PDF
Benchmarking Apache Samza: 1.2 million messages per sec per node
PPTX
Logs @ OVHcloud
PPTX
One Billion Black Friday Shoppers on a Distributed Data Store (Fahd Siddiqui,...
PPTX
Writing Applications for Scylla
PDF
PGConf APAC 2018 - High performance json postgre-sql vs. mongodb
PDF
Cassandra @ Yahoo Japan (Satoshi Konno, Yahoo) | Cassandra Summit 2016
Keynote: Apache HBase at Yahoo! Scale
hbaseconasia2017: HBase Practice At XiaoMi
HBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 Transactions in HBase
HBaseCon2017 HBase at Xiaomi
SignalFx: Making Cassandra Perform as a Time Series Database
CassieQ: The Distributed Message Queue Built on Cassandra (Anton Kropp, Cural...
HBaseCon2017 Improving HBase availability in a multi tenant environment
Kafka Summit SF 2017 - Infrastructure for Streaming Applications
Managing terabytes: When Postgres gets big
HTTP Analytics for 6M requests per second using ClickHouse, by Alexander Boc...
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
Kafka on ZFS: Better Living Through Filesystems
User Defined Partitioning on PlazmaDB
Benchmarking Apache Samza: 1.2 million messages per sec per node
Logs @ OVHcloud
One Billion Black Friday Shoppers on a Distributed Data Store (Fahd Siddiqui,...
Writing Applications for Scylla
PGConf APAC 2018 - High performance json postgre-sql vs. mongodb
Cassandra @ Yahoo Japan (Satoshi Konno, Yahoo) | Cassandra Summit 2016
Ad

Viewers also liked (20)

PPTX
Apache HBase at Airbnb
PDF
Improvements to Apache HBase and Its Applications in Alibaba Search
PDF
openTSDB - Metrics for a distributed world
PDF
HBaseCon 2015: Solving HBase Performance Problems with Apache HTrace
PDF
Apache HBase in the Enterprise Data Hub at Cerner
PDF
Apache HBase Improvements and Practices at Xiaomi
PDF
Apache HBase - Just the Basics
PPTX
Real-time HBase: Lessons from the Cloud
PPTX
HBaseCon 2013: Apache Drill - A Community-driven Initiative to Deliver ANSI S...
PPTX
A Graph Service for Global Web Entities Traversal and Reputation Evaluation B...
PPTX
HBaseCon 2015: Blackbird Collections - In-situ Stream Processing in HBase
PPTX
HBaseCon 2015: HBase Operations in a Flurry
PDF
HBaseCon 2015: Warcbase - Scaling 'Out' and 'Down' HBase for Web Archiving
PDF
HBaseCon 2013: Real-Time Model Scoring in Recommender Systems
PPTX
HBase Data Modeling and Access Patterns with Kite SDK
PPTX
Digital Library Collection Management using HBase
PPTX
HBase at Bloomberg: High Availability Needs for the Financial Industry
PDF
HBaseCon 2015: Graph Processing of Stock Market Order Flow in HBase on AWS
PPTX
Content Identification using HBase
PPTX
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
Apache HBase at Airbnb
Improvements to Apache HBase and Its Applications in Alibaba Search
openTSDB - Metrics for a distributed world
HBaseCon 2015: Solving HBase Performance Problems with Apache HTrace
Apache HBase in the Enterprise Data Hub at Cerner
Apache HBase Improvements and Practices at Xiaomi
Apache HBase - Just the Basics
Real-time HBase: Lessons from the Cloud
HBaseCon 2013: Apache Drill - A Community-driven Initiative to Deliver ANSI S...
A Graph Service for Global Web Entities Traversal and Reputation Evaluation B...
HBaseCon 2015: Blackbird Collections - In-situ Stream Processing in HBase
HBaseCon 2015: HBase Operations in a Flurry
HBaseCon 2015: Warcbase - Scaling 'Out' and 'Down' HBase for Web Archiving
HBaseCon 2013: Real-Time Model Scoring in Recommender Systems
HBase Data Modeling and Access Patterns with Kite SDK
Digital Library Collection Management using HBase
HBase at Bloomberg: High Availability Needs for the Financial Industry
HBaseCon 2015: Graph Processing of Stock Market Order Flow in HBase on AWS
Content Identification using HBase
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
Ad

Similar to Update on OpenTSDB and AsyncHBase (20)

PDF
Argus Production Monitoring at Salesforce
PDF
Tweaking perfomance on high-load projects_Думанский Дмитрий
PPTX
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
PDF
Introducing TiDB [Delivered: 09/27/18 at NYC SQL Meetup]
PDF
Advanced Apache Cassandra Operations with JMX
PDF
Advanced Cassandra Operations via JMX (Nate McCall, The Last Pickle) | C* Sum...
PDF
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
PDF
Tweaking performance on high-load projects
PDF
Handling 20 billion requests a month
PDF
Chronix Poster for the Poster Session FAST 2017
PDF
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
PDF
Macy's: Changing Engines in Mid-Flight
PDF
TiDB Introduction - San Francisco MySQL Meetup
PPTX
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
PPTX
Rate limits and all about
PDF
Solr Power FTW: Powering NoSQL the World Over
PDF
TiDB Introduction - Boston MySQL Meetup Group
PDF
Bravo Six, Going Realtime. Transitioning Activision Data Pipeline to Streaming
PDF
Bravo Six, Going Realtime. Transitioning Activision Data Pipeline to Streamin...
PDF
TiDB Introduction
Argus Production Monitoring at Salesforce
Tweaking perfomance on high-load projects_Думанский Дмитрий
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
Introducing TiDB [Delivered: 09/27/18 at NYC SQL Meetup]
Advanced Apache Cassandra Operations with JMX
Advanced Cassandra Operations via JMX (Nate McCall, The Last Pickle) | C* Sum...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
Tweaking performance on high-load projects
Handling 20 billion requests a month
Chronix Poster for the Poster Session FAST 2017
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Macy's: Changing Engines in Mid-Flight
TiDB Introduction - San Francisco MySQL Meetup
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Rate limits and all about
Solr Power FTW: Powering NoSQL the World Over
TiDB Introduction - Boston MySQL Meetup Group
Bravo Six, Going Realtime. Transitioning Activision Data Pipeline to Streaming
Bravo Six, Going Realtime. Transitioning Activision Data Pipeline to Streamin...
TiDB Introduction

More from HBaseCon (20)

PDF
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
PDF
hbaseconasia2017: HBase on Beam
PDF
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
PDF
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
PDF
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
PDF
hbaseconasia2017: Apache HBase at Netease
PDF
hbaseconasia2017: HBase在Hulu的使用和实践
PDF
hbaseconasia2017: 基于HBase的企业级大数据平台
PDF
hbaseconasia2017: HBase at JD.com
PDF
hbaseconasia2017: Large scale data near-line loading method and architecture
PDF
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
PDF
hbaseconasia2017: hbase-2.0.0
PDF
HBaseCon2017 Democratizing HBase
PDF
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
PDF
HBaseCon2017 Highly-Available HBase
PDF
HBaseCon2017 Apache HBase at Didi
PDF
HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...
PDF
HBaseCon2017 Efficient and portable data processing with Apache Beam and HBase
PDF
HBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
PDF
HBaseCon2017 Community-Driven Graphs with JanusGraph
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
hbaseconasia2017: HBase on Beam
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
hbaseconasia2017: Apache HBase at Netease
hbaseconasia2017: HBase在Hulu的使用和实践
hbaseconasia2017: 基于HBase的企业级大数据平台
hbaseconasia2017: HBase at JD.com
hbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
hbaseconasia2017: hbase-2.0.0
HBaseCon2017 Democratizing HBase
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
HBaseCon2017 Highly-Available HBase
HBaseCon2017 Apache HBase at Didi
HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...
HBaseCon2017 Efficient and portable data processing with Apache Beam and HBase
HBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
HBaseCon2017 Community-Driven Graphs with JanusGraph

Recently uploaded (20)

PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Digital Strategies for Manufacturing Companies
PDF
medical staffing services at VALiNTRY
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
history of c programming in notes for students .pptx
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Nekopoi APK 2025 free lastest update
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Introduction to Artificial Intelligence
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
System and Network Administration Chapter 2
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Operating system designcfffgfgggggggvggggggggg
Digital Strategies for Manufacturing Companies
medical staffing services at VALiNTRY
Wondershare Filmora 15 Crack With Activation Key [2025
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
history of c programming in notes for students .pptx
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Which alternative to Crystal Reports is best for small or large businesses.pdf
PTS Company Brochure 2025 (1).pdf.......
Nekopoi APK 2025 free lastest update
Understanding Forklifts - TECH EHS Solution
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Introduction to Artificial Intelligence
VVF-Customer-Presentation2025-Ver1.9.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Digital Systems & Binary Numbers (comprehensive )
System and Network Administration Chapter 2
Odoo Companies in India – Driving Business Transformation.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool

Update on OpenTSDB and AsyncHBase

  • 1. HBaseCon Update Distributed, Scalable Time Series Database Chris Larsen [email protected]
  • 2. Who Am I? (no really, who am I?) Chris Larsen Maintainer for OpenTSDB Software Engineer @ Yahoo! Monitoring Team
  • 3. What Is OpenTSDB? Open Source Time Series Database Store trillions of data points Sucks up all data and keeps going Never lose precision Scales using HBase, Cassandra Or Bigtable
  • 4. What good is it? Systems Monitoring & Measurement Servers Networks Sensor Data The Internet of Things SCADA Financial Data Scientific Experiment Results
  • 5. Use Cases Backing store for Argus: Open source monitoring and alerting system 15 HBase Servers 6 month retention 10M writes per minute 95p query latency < 30 days = 200ms Moving to 200 node cluster writing at 100M/m
  • 6. Use Cases ●Monitoring system, network and application performance and statistics 110 region servers, 10M writes/s ~ 2PB Multi-tenant and Kerberos secure HBase ~200k writes per second per TSD Central monitoring for all Yahoo properties Over 2 billion time series served
  • 8. What Are Time Series? Time Series: data points for an identity over time Typical Identity: Dotted string: web01.sys.cpu.user.0 OpenTSDB Identity: Metric: sys.cpu.user Tags (name/value pairs): host=web01 cpu=0
  • 9. What Are Time Series? Data Point: Metric + Tags + Value: 42 + Timestamp: 1234567890 sys.cpu.user 1234567890 42 host=web01 cpu=0 ^ a data point ^
  • 11. Writing Data 1) Open Telnet style socket, write: put sys.cpu.user 1234567890 42 host=web01 cpu=0 2) ..or, post JSON to: http://<host>:<port>/api/put 3) .. or import big files with CLI No schema definition No RRD file creation Just write!
  • 12. Querying Data Graph with the GUI CLI tools HTTP API Aggregate multiple series Simple query language To average all CPUs on host: start=1h-ago avg sys.cpu.user host=web01
  • 13. HBase Data Tables tsdb - Data point table. Massive tsdb-uid - Name to UID and UID to name mappings tsdb-meta - Time series index and meta-data tsdb-tree - Config and index for hierarchical naming schema
  • 14. Data Table Schema Row key is a concatenation of UIDs and time: metric + timestamp + tagk1 + tagv1… + tagkN + tagvN sys.cpu.user 1234567890 42 host=web01 cpu=0 x00x00x01x49x95xFBx70x00x00x01x00x00x01x00x00x02x00x00x02 Timestamp normalized on 1 hour boundaries All data points for an hour are stored in one row Enables fast scans of all time series for a metric …or pass a row key filter for specific time series with particular tags
  • 15. New for OpenTSDB 2.2 ● Append writes (no more need for TSD Compactions) ● Row salting and random metric IDs ● Downsampling Fill Policies ● Query filters (wildcard, regex, group by or not) ● Storage Exception plugin for retrying writes ● Released February 2016
  • 16. New for OpenTSDB 2.3 ● Graphite style expressions ● Cross-metric expressions ● Calendar based downsampling ● New data stores ● UID assignment plugin interface ● Datapoint write filter plugin interface ● RC1 released May 2016 ● New Committer, Jonathan Creasy
  • 17. Fuzzy Row Filter How do you find a single time series out of 1 million? For a day? For a month?
  • 18. Fuzzy Row Filter Instead of running a regex string comparator over each byte array formatted key… (?s)^.{9}(?:.{8})*Qx00x00x00x02 E(?:Q)x00x0F‡x42x2BE)(?:.{8})*$ TSDB query takes 1.6 seconds for 89,726 rows KEY Match -> m t1 tagk1 tagv1 No Match -> m t1 tagk1 tagv2 No Match -> m t1 tagk1 tagv1 tagk2 tagv3 No Match -> m t1 tagk1 tagv2 tagk2 tagv4 No Match -> m t1 tagk3 tagv5 No Match -> m t1 tagk3 tagv6 Match -> m t2 tagk tagv1 No Match -> m t2 tagk tagv2
  • 19. Fuzzy Row Filter Use a byte mask! ● Use the bloom filter to skip-scan to the next candidate row. ● Combine with regex (after fuzzy filter) to filter further. FuzzyFilter{[FuzzyFilterPair{row_key=[18, 68, -3, -82, 120, 87, 56, -15, 96, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0], mask=[0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1]}]} Now it takes 0.239 seconds KEY Match -> m t1 tagk1 tagv1 No Match -> m t1 tagk1 tagv2 Skip -> m t1 tagk1 tagv1 tagk2 tagv3 m t1 tagk1 tagv2 tagk2 tagv4 m t1 tagk3 tagv5 m t1 tagk3 tagv6 Match -> m t2 tagk tagv1 No Match -> m t2 tagk tagv2
  • 20. Fuzzy Row Filter Pros: ● Can improve scan latency by orders of magnitude ● Combines nicely with other filters Cons: ● All row keys for the match have to be the same, fixed length ● Doesn’t help much when matching the majority of a set OR if a set has uniform key lengths ● Doesn’t support bitmasks, only byte masks
  • 21. AsyncHBase AsyncHBase is a fully asynchronous, multi- threaded HBase client Supports HBase 0.90 to 1.x Faster and less resource intensive than the native HBase client Support for scanner filters, META prefetch, “fail-fast” RPCs
  • 22. AsyncHBase in YCSB ● New Yahoo! Cloud Serving Benchmark (YCSB) module for testing AsyncHBase ● Test Params: ○ 1 YCSB worker thread with workload A for run and load ○ Ran consecutive Async -> HBase -> Async -> HBase… (new YCSB JVM each run) 50 times ○ HBase 1.0.0 stock Apache with default configs ○ Local host, Macbook Pro ○ 10K rows written/read ○ Async writes for both
  • 23. AsyncHBase in YCSB HBase Client Threads: 238 AsyncHBase Client Threads: 22
  • 26. Upcoming in 1.8 ●Reverse Scanning ●Multi-Get requests ●Netty 4 ●Lots of bug fixes ○Stuck NSRE bugs ○Region client resource leaks
  • 27. OpenTSDB on Bigtable ● Bigtable ○Hosted Google Service ○Client uses HTTP2 and GRPC for communication ● OpenTSDB heads home ○Based on a time series store on Bigtable at Google ○Identical schema as HBase ○Same filter support (fuzzy filters are coming)
  • 28. OpenTSDB on Bigtable ● AsyncBigtable ○Implementation of AsyncHBase’s API for drop-in use ○https://github.com/OpenTSDB/asyncbigtable ○Uses HTable API ○Moving to native Bigtable API ● Thanks to Christos of Pythian, Solomon, Carter, Misha, and the rest of the Google Bigtable team ● https://www.pythian.com/blog/run-opentsdb-google- bigtable/#
  • 29. OpenTSDB on Cassandra ● AsyncCassandra - Implementation of AsyncHBase’s API for drop-in use ● Wraps Netflix’s Astyanax for asynchronous calls ● Requires the ByteOrderedPartitioner and legacy API ● Same schema as HBase/Bigtable ● Scan filtering performed client side ● May not work with future Cassandra versions if they drop the API
  • 30. Community Salesforce Argus ●Time series monitoring and alerting ●Multi-series annotations ●Dashboards Thanks to Tom Valine and the Salesforce engineers https://medium.com/salesforce-open-source/argus-time-series-monitoring-and- alerting-d2941f67864#.ez7mbo3ek https://github.com/SalesforceEng/Argus
  • 31. Community Turn Splicer ●API to shard TSDB queries ●Locality advantage hosting TSDs on region servers ●Query caching Thanks to Jonathan Creasy and the Turn engineers https://github.com/turn/splicer
  • 32. The Future of OpenTSDB
  • 33. The Future Reworked query pipeline for selective ordering of operations Histogram support Flexible query caching framework Distributed queries Greater data store abstraction
  • 34. More Information Thank you to everyone who has helped test, debug and add to OpenTSDB 2.2 and 2.3 including, but not limited to: Kyle, Ivan, Davide, Liu, Utkarsh, Andy, Anna, Camden, Can, Carlos, Hugo, Isaih, Kevin, Ping, Jonathan Contribute at github.com/OpenTSDB/opentsdb Website: opentsdb.net Documentation: opentsdb.net/docs/build/html Mailing List: groups.google.com/group/opentsdb Images http://photos.jdhancock.com/photo/2013-06-04-212438-the-lonely-vacuum-of-space.html http://en.wikipedia.org/wiki/File:Semi-automated-external-monitor-defibrillator.jpg http://upload.wikimedia.org/wikipedia/commons/1/17/Dining_table_for_two.jpg http://upload.wikimedia.org/wikipedia/commons/9/92/Easy_button.JPG https://www.flickr.com/photos/verbeeldingskr8/15563333617 http://www.flickr.com/photos/ladydragonflyherworld/4845314274/ http://lego.cuusoo.com/ideas/view/96