Lindorm uses Capacity storage as the storage medium for cold data. This topic explains how to use the cold data archiving feature in LindormTSDB.
Overview
In time-series workloads, data is queried less frequently as it ages. This older data is cold data, while recent, frequently accessed data is hot data. As the volume of cold data grows, storage costs can increase significantly. LindormTSDB helps enterprise users reduce storage costs for cold data and improve query performance for hot data.
LindormTSDB automatically classifies data into three tiers based on its age:
-
Hot data
Hot data is the most recently written time-series data, which is queried frequently and has a timestamp close to the current time.
-
Warm data
Warm data is data that is older and accessed less frequently than hot data.
-
Cold data
Cold data is long-term data that is considered archived. This tier often accounts for a large volume but is rarely queried in time-series applications.
LindormTSDB uses this tiered storage model to balance performance and cost by storing each data tier on a different medium:
For cold data, which is typically the largest data tier, LindormTSDB automatically archives the data to cold storage based on a user-defined hot and cold data boundary. You can query archived data transparently with standard queries.Lindorm uses Capacity storage as its cold storage medium. For more information about the read performance of Capacity storage, see Capacity storage read performance.
Enable cold storage
By default, a Lindorm instance automatically manages hot and warm data tiers. To automatically archive cold data, you must first enable cold storage for the instance.
You can enable cold storage in one of the following ways:
-
When you purchase a Lindorm instance, configure cold storage on the purchase page.
Set Enable Capacity Storage to Yes, and then use the slider or text box for Capacity Storage to set the required storage capacity. The minimum capacity is 800 GB.
-
If you did not enable cold storage when you created the instance, you can enable it later in the Lindorm console.
In the left-side navigation pane, click Cold Storage. On the Cold Storage page, click Enable Now. Enabling cold storage may cause temporary service interruptions. Perform this operation during off-peak hours.
After you enable cold storage, you can set the hot and cold data boundary to control when LindormTSDB automatically archives data to cold storage.
Configure the hot and cold data boundary
Boundary definition
The hot and cold data boundary is a threshold that determines when data becomes cold. You can set this boundary based on your data volume and query time range requirements for moving data to cold storage.
In LindormTSDB, the hot and cold data boundary is measured in days. A time-series data point is considered cold data if its timestamp meets the following condition.
Current time - Timestamp of data >= Hot and cold data boundary (in days)
Configuration methods
You can set the hot and cold data boundary in one of the following ways:
-
Use an SQL statement to set the hot and cold data boundary when you create or alter a database.
NoteFor more information, see CREATE DATABASE or ALTER DATABASE.
-
Use the LindormTSDB console to set the hot and cold data boundary for a database.
NoteFor more information, see Database Management.
Query cold data
You can query cold data with standard SQL statements. No special syntax is required. However, queries that access archived data will have higher latency.