HiTSDB, a high-performance time series database, starts public beta_A database for the Internet of Things!

Click to read the original text

Abstract:  At the 2017 Yunqi Conference Shanghai Summit, Alibaba Cloud released the High-Performance Time Series Database (HiTSDB) for IoT scenarios. HiTSDB can support the writing of 10 million time series data points per second; it has PB-level data storage capacity, provides efficient compression algorithms, and reduces the overall storage cost by 90%; provides time series data interpolation calculation, precision reduction calculation, time latitude aggregation calculation, spatial latitude calculation The ability to aggregate computations.

Check out the launch details for a comprehensive understanding of HiTSDB

HiTSDB is a high-performance, low-cost, stable and reliable online time series database service; it provides efficient read and write, high compression ratio storage, time series data interpolation and aggregation computing. It is a professional database for the Internet of Things (IoT) equipment monitoring system, enterprise energy management system (EMS), production safety monitoring system, power detection system and other industries.

HiTSDB Builds IoT Smart Park

HiTSDB has been incubated within Alibaba for many years, and has supported more than 20 core business scenarios in Alibaba Group, such as the Internet of Things (IoT) construction in Alibaba Smart Park.

The smart park mainly solves the management and intelligent control of the equipment in the office park. Equipment management is mainly to connect equipment to a unified equipment management platform, monitor the operation of all equipment at the same time, find faulty equipment in time, and understand the overall equipment operation in order to make corresponding decisions.

The intelligent control means that the system can automatically perform various adjustments according to the operating status of the equipment and through the setting of certain rules. The lights can be turned off automatically, or when the level of carbon monoxide in a certain area is higher than the warning value, the alarm switch will be automatically activated, which is also very necessary for the safety management of the park.

For technology, the matching of equipment monitoring and intelligent control rules is essentially data collection and monitoring analysis.

园区的设备种类繁多,包括摄像头、电灯、空调、空气检测,这些设备上都有非常多的传感器,这些传感器每一时刻都在实时的产生数据,这些数据随着时间的推进,会在时间轴上产生一些列的数据,就是我们说的时序数据,比如温度、湿度、用电量等。要实现设备的监控管理,其实就是将这时序数据进行实时的采集存储和分析展现,而 HiTSDB 就是时序数据领域的专业数据库。

HiTSDB 集群可支持每秒 1000 万的时序数据点写入

HiTSDB 具备关系数据库及NoSQL 数据库所不具备的写入能力。

智慧园区以及其他的IoT场景,设备的规模通常是万级别至百万级别,每个设备都实时产生数据,需要将实时数据快速的写入到数据库中,那么每秒就要写入上百万甚至上千万的实时数据。

百万甚至千万级别的实时数据写入对于数据库并发写入的压力非常巨大,使用关系型数据库完全不可行。 因为 InnoDB 的写入性能是很有限的,实际测试在24台机器上,存储使用SSD硬盘,一秒钟只能持续写入只有两万左右,主要原因在于B树索引。InnoDB 的索引是一个B树,这个B树的更新有很大的开销。虽然我们可以通过一些办法优化,但时序数通常是一个多维数据,通常是 ADhoc 的查询,为了优化所有排列组合查询,需要建很多多列的索引,这些索引每次在写的时候每个都需要更新,所以就会导致很多的IO。

而 HiTSDB 针对时序数据库的进行写入优化,基于时间序列的时间线数据结构进行存储写入,实际业务使用场景中最高支持到每秒 1000 万的时序数据点写入。基于阿里云 4C8G规格的 ECS,单台平均达到10万/秒的数据写入,峰值达15万/秒。

HiTSDB 具备领先的时序数据分析技术优势

在数据查询方面,HiTSDB 也具备领先的技术优势。在时序数据领域“插值(interpolation)”,“降精度(DownSimple)”以及“聚合计算(Aggregation)”是常见的业务需求。举个例子, 智慧园区的业务系统需要查看一个楼宇的某盏灯的耗电量情况,那么就需要把这盏灯的耗电量数据从数据库中查询并展示出来,如果由于采集的故障导致某个时刻用电量数据缺失,那么需要通过特定算法来近似的估算出这个数据,这个计算补全数据的过程就是“插值”。而当需要查看这盏灯一年的耗电趋势情况时,通常只需要计算出每一天的耗电量,进行查看,而不需要把每一个时刻采集的数据全部输出出来,这个将原始精度转化为业务需求精度的过程就是“降精度”。而如果要统计某一个楼层或者楼宇的用耗电量整体趋势数据时,就需要将所有统计范围内的灯具的耗电量数据做“合并统计”,这个类似的统计过程就是Aggregation。

时序数据降精度是在时间序列维度上做的。对于关系数据库来说,首先要把时间序列维度拿出来,然后在中间插值,而实际上 SQL 是按点来操作的。所以如果要做降精度的话,需要用一个值查询把整条时间序列上的数据查询出来,插好值之后才能做时间序列之间的聚合,那么服务和 SQL 服务器之间的吞吐量非常大,相当于 SQL 只是一个数据通道需要把所有值都拉出来运算一遍,这个查询性能会非常慢,并且每一次计算都需要重新拉取数据,相对 HiTSDB,这个性就能差了几百倍。

HiTSDB 支持线性插值,可以尽量弥补数据异常缺失造成的统计失败。HiTSDB 支持 Max ,Min ,AVG 等各种降精度的计算函数,同时也可以通过“预降精度”的方式,将业务精度的数据在入库的过程中计算完成,提升查询的效率。HiTSDB 在的空间聚合 Aggregator 支持也非常全面,支持 ADhoc 查询,HiTSDB 通过引入倒排索引和数据分片提升检索时间序列的效率,通过并行计算架构,整体计算性能提升非常明显。

HiTSDB 兼容 OpenTSDB 协议,写入性能提升20倍,压缩效率提升10倍。

HiTSDB 兼容 OpenTSDB 访问协议。OpenTSDB 是时序数据库领域相对活跃的技术产品,HiTSDB 通过技术优化后相对于 OpenTSDB 写入性能提升20倍以上。HiTSDB 压缩效率相比较 OpenTSDB 提升10倍左右,通常原始时序数据的大小在 200-300 Byte,OpenTSDB 单数据点消耗约20 Byte,HiTSDB 单数据点消耗约 2Byte,通过 HiTSDB 可以节约90%以上的数据库存储成本。

HiTSDB 所具备的高效数据写入和高压缩比的特性,以及阿里长期业务实践的所提供的稳定性保证,结合阿里云上丰富的产品生态,可以帮助 IoT 企业快速构建自己的智慧物联网监控分析系统,也可以帮助传统的石油化工及制造企业插上物联网的翅膀,打造属于企业自己的智慧系统。

阅读原文请点击

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327075749&siteId=291194637