在字节跳动各产品线飞速成长的过程中,对数据分析能力也提出了更高的要求,现有的主流数据分析产品都没办法完全满足业务要求。因此,字节跳动在ClickHouse引擎基础上重构了技术架构,实现了云原生环境的部署和运维管理、存储计算分离、多租户管理等能力,推出了云原生数据仓库ByteHouse。
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:363a8fc2-750c-4477-82eb-a67a0520d393
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:2e47dcc9-534d-4fbb-ad3c-42ecd0366504
我们可以从下面几个方面认识ByteHouse:
极致性能
在延续了ClickHouse单表查询强大性能的同时,新增了自研的查询优化器,在多表关联查询和复杂查询场景下性能提升若干倍,实现了在各类型查询中都达到极致性能。
新一代MPP架构,存算分离
使用新式架构,Shared-nothing的计算层和Shared-everything的存储层,可以性能损耗很小的情况下,实现存储层与计算层的分离,独立按需扩缩容。
资源隔离,读写分离
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:d9ef7265-00b1-4dca-b3a0-457f5970cb8a
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:19919a7f-a90e-4f70-a34d-2cdff7168e85
丰富功能
ByteHouse提供客户丰富的企业级能力,如:兼容ANSI-SQL 2011标准、支持多租户、库表资产管理、基于角色的权限管理以及多样的性能诊断工具等。
ByteHouse整体架构图
云原生数据仓库ByteHouse总体架构图如上图所示,设计目标是实现高扩展性、高性能、高可靠性、高易用性。从下往上,总体上分服务层、计算层和存储层。
服务层
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:ba7d2886-35c3-4f94-8891-7e0357030a3f
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:f932b6ca-dcfc-4587-a934-d6be3067f25e
服务层主要包括如下组件:
- *资源管理器
资源管理器(Resource Manager)负责对计算资源进行统一的管理和调度,能够收集各个计算组的性能数据,为查询、写入和后台任务动态分配资源。同时支持计算资源隔离和共享,资源池化和弹性扩缩等功能。资源管理器是提高集群整体利用率的核心组件。
- *服务节点
服务节点(CNCH Server)可以看成是Query执行的master或者是coordinator。每一个计算组有1个或者多个CNCH Server,负责接受用户的query请求,解析query,生成逻辑执行计划,优化执行计划,调度和执行query,并将最终结果返回给用户。计算组是 Bytehouse 中的计算资源集群,可按需进行横向扩展。
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:11a708f7-f034-4175-97cd-99cc2927bd0d
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:ac30d71a-f87c-49c0-94f0-06f8540ca120
- *元数据服务
元数据服务(Catalog Service)提供对查询相关元数据信息的读写。Metadata主要包括2部分:Table的元数据和Part的元数据。表的元数据信息主要包括表的Schema,partitioning schema,primary key,ordering key。Part的元数据信息记录表所对应的所有data file的元数据,主要包括文件名,文件路径,partition, schema,statistics,数据的索引等信息。
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:90d903e2-b637-4a36-8146-994ff7c237a0
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:ddd09b20-c0c2-4b22-a1a9-3b1f43362d80
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:c783e2d8-a3f4-4a1d-935b-5af84b434652
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:6be29100-1fc1-45ef-b3d3-83b899b08a27
- *安全管理
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:9a156d93-73bf-4dad-a6d4-a391a2dd9ff2
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:60c95a13-9958-4552-8163-d3e3dc2761f7
计算层
通过容器编排平台(如 Kubernetes)来实现计算资源管理,所有计算资源都放在容器中。
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:a06710e8-1a52-494a-bb0d-59583a0ac357
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:80a21bff-a548-4d54-9988-fc7e83e9d457
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:38ee2cff-0662-4b66-8919-000b6e7f44d1
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:d599efaa-d36d-4886-a7d6-f2b041ab7508
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:93e37a33-2239-4dfd-9abf-0cf870fb2dd6
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:d867336f-20b9-458c-95d5-59bcce2d2dfd
存储层
采用HDFS或S3等云存储服务作为数据存储层。用来存储实际数据、索引等内容。
数据表的数据文件存储在远端的统一分布式存储系统中,与计算节点分离开来。底层存储系统可能会对应不同类型的分布式系统。例如HDFS,Amazon S3, Google cloud storage,Azure blob storage,阿里云对象存储等等。底层存储是天然支持高可用、容量是无限扩展的。
不同的分布式存储系统,例如S3和HDFS有很多不同的功能和不一样的性能,会影响到我们的设计和实现。例如HDFS不支持文件的update, S3 object move操作时重操作需要复制数据等。
通过存储的服务化,计算层可以支持ByteHouse自身的计算引擎之外,将来还可以便捷地对接其他计算引擎,例如Presto、Spark等。
ByteHouse包括一个数据导入导出(Data Express)模块,负责数据的导入导出工作。
Data Express模块架构图
Data Express 为数据导入/导出作业提供工作流服务和快速配置模板,用户可以从提供的快速模板创建数据加载作业。
DataExpress 利用 Spark 来执行数据迁移任务。
主要模块:
- JobServer
- 导入模板
- 导出模板
JobServer 管理所有用户创建的数据迁移作业,同时运行外部事件触发数据迁移任务。
启动任务时,JobServer 将相应的作业提交给 Spark 集群,并监控其执行情况。作业执行状态将保存在我们的元存储中,以供 Bytehouse 进一步分析。
ByteHouse支持离线数据导入和实时数据导入。
离线导入
离线导入数据源:
- Object Storage:S3、OSS、Minio
- Hive (1.0+)
- Apache Kafka /Confluent Cloud/AWS Kinesis
- 本地文件
- RDS
离线导入适用于希望将已准备好的数据一次性加载到 ByteHouse 的场景,根据是否对目标数据表进行分区,ByteHouse 提供了不同的加载模式:
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:ae9b481c-ac0f-46a9-9309-391db1bd2a3f
[En]
[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:81404ddc-c9d3-4550-9b80-dce9e126af64
* 增量加载:增量加载将根据其分区将新的数据添加到现有的目标数据表。ByteHouse 将替换现有分区,而非进行合并。
支持的文件类型
ByteHouse的离线导入支持以下文件格式:
- Delimited files (CSV, TSV, etc.)
- Json (multiline)
- Avro
- Parquet
- Excel (xls)
实时导入
ByteHouse 能够连接到 Kafka,并将数据持续传输到目标数据表中。与离线导入不同,Kafka 任务一旦启动将持续运行。ByteHouse 的 Kafka 导入任务能够提供 exactly-once 语义。您可以停止/恢复消费任务,ByteHouse 将记录 offset 信息,确保数据不会丢失。
ByteHouse 在流式导入中支持以下消息格式:
- Protobuf
- JSON
云原生数据仓库ByteHouse是一个具备极致性能、能够存储和计算资源分别按需扩缩容、功能丰富的数据分析产品,是一个面向海量数据、高实时要求的一个企业级OLAP数据引擎。
ByteHouse在字节跳动的众多场景中有着丰富的经验积累,尤其是在实时数据分析场景和海量数据灵活查询场景,都有超大规模的应用。ByteHouse基于自研技术优势和超大规模的使用经验,为企业大数据团队带来新的选择和支持,以应对复杂多变的业务需求,高速增长的数据场景。 目前,ByteHouse已在火山引擎上提供免费试用,欢迎大家来尝试,并为我们提出宝贵建议。
Original: https://www.cnblogs.com/bytedata/p/16517524.html
Author: 字节跳动数据平台
Title: 如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/561879/
转载文章受原作者版权保护。转载请注明原作者出处!