An Overview of Time Series Databases and Tencent CTSDB
This article introduces the concept, characteristics, and use cases of time series databases, explains the data model and challenges of traditional solutions, and provides a detailed overview of Tencent's Cloud Time Series Database (CTSDB) along with performance comparisons against InfluxDB.
With the rapid growth of the Internet, big data, and IoT, many data streams are now time‑related, such as step counts, stock prices, and bike‑sharing device statuses. To store these time‑series data, enterprises have launched dedicated time‑series databases.
What is a Time‑Series Database?
Time‑series data are observations recorded in chronological order, commonly found in IT infrastructure, monitoring systems, and IoT. By linking isolated observations along a timeline, trends and anomalies become visible, enabling reporting, statistical analysis, and forecasting.
Time‑Series Data Model
metric – the dataset (similar to a table)
point – a single record (similar to a row)
timestamp – the time of collection
tag – dimension columns that identify the source (e.g., host, port)
field – measured values that vary over time
Typical data include a metric name (e.g., Network), a timestamp, two tags (host, port), and two fields (bytes_in, bytes_out). Each host/port generates a point every half hour, and the fields change smoothly over time.
Characteristics of Time‑Series Data
Data pattern: continuously growing, repeated dimensions, smooth metric changes.
Write workload: massive high‑concurrency writes with little or no updates.
Query workload: frequent recent‑data queries, aggregation‑heavy analysis.
Traditional Solutions
Relational databases (e.g., MySQL) suffer from high storage cost, maintenance overhead, low write throughput, and poor analytical performance for massive time‑series workloads. Hadoop‑based stacks (Hadoop, Spark) have high latency and slow query performance due to batch processing.
Time‑Series Databases
Specialized time‑series databases optimize storage, write, and query paths for the unique properties of time‑series data, achieving lower storage cost, high‑concurrency writes, and low‑latency queries.
CTSDB Overview
Tencent Cloud Time Series Database (CTSDB) is a distributed, high‑performance, sharded, self‑balancing time‑series database. Its key features include:
High performance: batch writes, high‑concurrency queries, linear scalability.
High reliability: multi‑replica, rack‑aware placement.
Ease of use: JSON‑based REST API, rich data types.
Low cost: columnar storage with ~0.1 compression ratio, data down‑sampling.
Powerful aggregation: max, min, avg, percentile, sum, count, group‑by, script aggregation, time‑range, geo, nested aggregation.
Additional capabilities: monitoring & alerting, permission system, data expiration, export.
Performance Comparison
CTSDB was benchmarked against InfluxDB using the official InfluxDB comparison tool. Tests covered write throughput (single‑node CTSDB vs. InfluxDB, single‑node vs. dual‑node CTSDB) and query latency under varying concurrency.
Write Performance
CTSDB single‑node achieved up to 190,000 writes per second, surpassing InfluxDB’s 150,000. Dual‑node CTSDB reached 340,000 writes per second, demonstrating linear scalability.
Query Performance
CTSDB’s query QPS consistently outperformed InfluxDB; at high concurrency (40 threads) CTSDB was nearly four times faster (~20,000 QPS) while InfluxDB failed at 50 threads. Dual‑node CTSDB further improved query throughput, showing near‑linear scaling.
Current Status and Future
CTSDB powers more than 20 core Tencent services, handling tens of thousands of writes per second and over 20 TB of daily data. It will soon be launched on Tencent Cloud to serve the IoT industry, with ongoing improvements in cost, usability, and functionality.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Tencent Architect
We share insights on storage, computing, networking and explore leading industry technologies together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
