foreword
This article is participating in "Embrace Open Source | Taosi Data TDengine Prize Call", link to the event .
I had a relationship with Taosi Data in the boss direct recruitment, because they are all in the direction of the Internet of Things, so I learned about it. This article will talk about TDEngine
what attracts developers and what is TDengine
the application prospect in the Industrial Internet of Things.
1. Why use a time series database
The Internet of Things is different from the Internet. The Internet is the interconnection between people, and the amount of data that can be generated is indeed very large, but the Internet of Things is even more. Connections with people generate data volumes that are orders of magnitude larger.
How to store the data generated by the connection of things and things, so that it can be managed more conveniently?
We can start from the time dimension and classify and store the data in chronological order. The database engine that is competent for this work is the time series database.
Time series database, the data structure is roughly as follows:
time | column1 | column2 |
---|---|---|
2021-07-01 17:00:01 | data 1 | data 1 |
2021-07-01 17:00:02 | data 2 | data 2 |
2021-07-01 17:00:03 | data 3 | data 3 |
2021-07-01 17:00:04 | data 4 | data 4 |
2021-07-01 17:00:05 | Data 5 | Data 5 |
Different from the traditional relational database, the primary key of the time series database is forced to use time. That is, all data must have a corresponding relationship with time.
Through the time series database, we can clearly maintain various real-time data generated by the Internet of Things. After all, the most important thing in today's world is not the land, but the data.
2. TDengine's competitor InfluxDB
When it comes to databases, I have to think of the open source time series database that started earlier InfluxDB
. If you want to learn and understand InfluxDB
the time series database, you can refer to the tutorial I wrote: "InfluxDB Series Tutorials"
InfluxDB
It has excellent throughput and can meet the use of common IoT data. The stand-alone version is free, the cluster is charged, and the cluster price is high, which is rarely paid by startups.
Can the time series type not be clustered?
From the experience of using time series database for more than three years, if there is a large amount of storage or a large amount of query functions in the business, it is strongly recommended to use a cluster, because the stand-alone version 单节点问题
will be frequently used in large-scale writing and query business. Exposure, causing the database to hang frequently. So, use a InfluxDB
dilemma.
3. Cluster - the heavy weapon of TDengine!
As described at the beginning, TDengine
the most attractive thing for pragmatist developers is that the cluster is free, which is also TDengine
the most competitive place, and may also make it possible TDengine
to A Time series database
change from the Time series database
.
For cluster configuration, please refer to: "TDengine Cluster Configuration"
Not surprisingly, the advantage of clustering is that it can avoid overheating or downtime of a single node. TDengine
It also supports multi-node load balancing:
1. When a new data node is added to the cluster, the system will automatically trigger load balancing, and the data on some nodes will be automatically transferred to the new data node without any manual intervention.
2. When a data node is removed from the cluster, the system will automatically transfer the data on the data node to other data nodes without any manual intervention.
3. If a data node is overheated (the amount of data is too large), the system will automatically perform load balancing, and automatically move some vnodes of the data node to other nodes.
It can be seen that whether it is to add nodes or to go offline, or to overheat a node, it TDengine
can be well supported. The most critical thing is that the cluster is 免费的
.
Summarize
The time series database will be a data storage tool that cannot be bypassed in the Internet of Things industry. The domestic open source TDengine
version is not only open source for the stand-alone version, but also the cluster version is free to use TDengine
. A nice solution for IoT data governance.
This article is participating in "Embrace Open Source | Taosi Data TDengine Prize Call", link to the event .