Choosing the right database is a critical choice when building any software application. All databases have different strengths and weaknesses when it comes to performance, so deciding which database has the most benefits and the most minor downsides for your specific use case and data model is an important decision. Below you will find an overview of the key concepts, architecture, features, use cases, and pricing models of ClickHouse and OpenTSDB so you can quickly see how they compare against each other.

The primary purpose of this article is to compare how ClickHouse and OpenTSDB perform for workloads involving time series data, not for all possible use cases. Time series data typically presents a unique challenge in terms of database performance. This is due to the high volume of data being written and the query patterns to access that data. This article doesn’t intend to make the case for which database is better; it simply provides an overview of each database so you can make an informed decision.

ClickHouse vs OpenTSDB Breakdown


 
Database Model

Columnar database

Time series database

Architecture

ClickHouse can be deployed on-premises, in the cloud, or as a managed service.

OpenTSDB can be deployed on-premises or in the cloud, with HBase running on a distributed cluster of nodes.

License

Apache 2.0

GNU LGPLv2.1

Use Cases

Real-time analytics, big data processing, event logging, monitoring, IoT, data warehousing

Monitoring, observability, IoT, log data storage

Scalability

Horizontally scalable, supports distributed query processing and parallel execution

Horizontally scalable across multiple nodes using HBase as its storage backend

ClickHouse Overview

ClickHouse is an open source columnar database management system designed for high-performance online analytical processing (OLAP) tasks. It was developed by Yandex, a leading Russian technology company. ClickHouse is known for its ability to process large volumes of data in real-time, providing fast query performance and real-time analytics. Its columnar storage architecture enables efficient data compression and faster query execution, making it suitable for large-scale data analytics and business intelligence applications.

OpenTSDB Overview

OpenTSDB (Open Time Series Database) is an open-source, distributed, and scalable time series database built on top of Apache HBase, a NoSQL database. OpenTSDB was designed to address the growing need for storing and processing large volumes of time series data generated by various sources, such as IoT devices, sensors, and monitoring systems. It was initially developed by StumbleUpon in 2010 and later became an independent project with an active community of contributors.


ClickHouse for Time Series Data

ClickHouse can be used for storing and analyzing time series data effectively, although it is not explicitly optimized for working with time series data. While ClickHouse can query time series data very quickly once ingested, it tends to struggle with very high write scenarios where data needs to be ingested in smaller batches so it can be analyzed in real time.

OpenTSDB for Time Series Data

OpenTSDB is designed for time series data storage and analysis, making it an ideal choice for managing large scale time series datasets. Its architecture enables high write and query performance, and it can handle millions of data points per second with minimal resource consumption. OpenTSDB’s flexible querying capabilities allow users to perform complex analysis on time series data efficiently.


ClickHouse Key Concepts

  • Columnar storage: ClickHouse stores data in a columnar format, which means that data for each column is stored separately. This enables efficient compression and faster query execution, as only the required columns are read during query execution.
  • Distributed processing: ClickHouse supports distributed processing, allowing queries to be executed across multiple nodes in a cluster, improving query performance and scalability.
  • Data replication: ClickHouse provides data replication, ensuring data availability and fault tolerance in case of hardware failures or node outages.
  • Materialized Views: ClickHouse supports materialized views, which are precomputed query results stored as tables. Materialized views can significantly improve query performance, as they allow for faster data retrieval by avoiding the need to recompute the results for each query.

OpenTSDB Key Concepts

  • Data Point: A single measurement in time consisting of a timestamp, metric, value, and associated tags.
  • Metric: A named value that represents a specific aspect of a system, such as CPU usage or temperature.
  • Tags: Key-value pairs associated with data points that provide metadata and help categorize and query the data.


ClickHouse Architecture

ClickHouse’s architecture is designed to support high-performance analytics on large datasets. ClickHouse stores data in a columnar format. This enables efficient data compression and faster query execution, as only the required columns are read during query execution. ClickHouse also supports distributed processing, which allows for queries to be executed across multiple nodes in a cluster. ClickHouse uses the MergeTree storage engine as its primary table engine. MergeTree is designed for high-performance OLAP tasks and supports data replication, data partitioning, and indexing.

OpenTSDB Architecture

OpenTSDB is built on top of Apache HBase, a distributed and scalable NoSQL database, and relies on its architecture for data storage and management. OpenTSDB stores time series data in HBase tables, with data points organized by metric, timestamp, and tags. The database uses a schema-less data model, which allows for flexibility when adding new metrics and tags. The OpenTSDB architecture also supports horizontal scaling by distributing data across multiple HBase nodes.

Free Time-Series Database Guide

Get a comprehensive review of alternatives and critical requirements for selecting yours.

ClickHouse Features

Real-time analytics

ClickHouse is designed for real-time analytics and can process large volumes of data with low latency, providing fast query performance and real-time insights.

Data compression

ClickHouse’s columnar storage format enables efficient data compression, reducing storage requirements and improving query performance.

Materialized views

ClickHouse supports materialized views, which can significantly improve query performance by precomputing and storing query results as tables.

OpenTSDB Features

Scalability

OpenTSDB’s distributed architecture allows for horizontal scaling, ensuring that the database can handle growing volumes of time series data.

Data Compression

OpenTSDB uses various compression techniques to reduce the storage footprint of time series data.

Query Language with time series support

OpenTSDB features a flexible query language that supports aggregation, downsampling, filtering, and other operations for analyzing time series data.


ClickHouse Use Cases

Large-scale data analytics

ClickHouse’s high-performance query engine and columnar storage format make it suitable for large-scale data analytics and business intelligence applications.

Real-time reporting

ClickHouse’s real-time analytics capabilities enable organizations to generate real-time reports and dashboards, providing up-to-date insights for decision-making.

Log and event data analysis

ClickHouse’s ability to process large volumes of data in real-time makes it a suitable choice for log and event data analysis, such as analyzing web server logs or application events.

OpenTSDB Use Cases

Monitoring and Alerting

OpenTSDB is well-suited for large-scale monitoring and alerting systems that generate vast amounts of time series data from various sources.

IoT Data Storage

OpenTSDB can store and analyze time series data generated by IoT devices, such as sensors and smart appliances, enabling real-time insights and analytics.

Performance Analysis

OpenTSDB’s flexible querying capabilities make it an ideal choice for analyzing system and application performance metrics over time.


ClickHouse Pricing Model

ClickHouse is an open source database and can be deployed on your own hardware. The developers of ClickHouse have also recently created ClickHouse Cloud which is a managed service for deploying ClickHouse.

OpenTSDB Pricing Model

OpenTSDB is open-source software, which means it is free to use without any licensing fees. However, the cost of running OpenTSDB depends on the infrastructure required to support the underlying HBase database, such as cloud services or on-premises hardware.

Get started with InfluxDB for free

InfluxDB Cloud is the fastest way to start storing and analyzing your time series data.