
OceanBase分布式关系数据库架构与技术
阳振坤 杨传辉 韩富晟 王国平 杨志丰 成肖君
(北京奥星贝斯科技有限公司 北京 100102)
(zhengxiang@oceanbase.com)
Infrastructure and Technology of OceanBase Distributed Relational Database
YangZhenkun,YangChuanhui,HanFusheng,WangGuoping,YangZhifeng,andChengXiaojun
(Beijing OceanBase Technology Co., Ltd., Beijing 100102)
Abstract Relational database is the key information infrastructure of today's society. The Internet and digitization
have brought high concurrency and massive data. Due to their centralized architectures, the processing power and
storagecapacityoftraditionalrelationaldatabasesarestretched.OceanBaseisadistributedrelationaldatabasebased
on commodity PC servers. It achieves online horizontal scalability, automatic lossless disaster recovery from data
center failure and high-ratio data compression. It has been used in finance, government affairs, telecommunication
systems, Internet, etc. This paper introduces the infrastructure and some key technologies of OceanBase, including
distributed transaction processing, LSM-tree-based storage system and distributed SQL optimizer. In addition, this
paperexplainsindetailthehighavailabilityanddataconsistencyofOceanBase,whichcanensurethatRPOis0and
RTOislessthan8seconds.Atthesametime,italsointroducesOceanBase’smulti-tenantmechanism,whichadoptsa
nativemulti-tenantdesignwithintheclustertoimplementmultipleindependentdatabaseservicesinthecluster.Based
ontheSysbenchandTPC-Hevaluationbenchmarks,comparativeexperimentalresultsshowthat1)inastand-alone
mode,theperformanceofOceanBaseis1.27timestoover2timesthatofMySQL;2)inasingle-mastermode,the
performanceofOceanBaseis1.25timestonearly2timesthatofMySQL;3)Inamulti-mastermode,theperformance
ofOceanBaseis1.09to3.1timesthatofMySQL,andforcomplexOLAPqueries,theperformanceofOceanBaseis6
to327timesthatofMySQL.
Key words relationaldatabase;distributedtransaction;LSM-tree-basedstorage;distributedSQLoptimizer;multi-
tenant
摘 要 关系数据库是当今社会的关键信息基础设施,互联网和数字化带来了高并发和海量数据,传统关
系数据库均为集中式架构,处理能力和存储容量都捉襟见肘.OceanBase分布式关系数据库基于通用PC
服务器,不仅实现了在线水平伸缩,还实现了机房故障自动无损容灾以及高倍率数据压缩等,已经应用于
金融、政务、通信和互联网等行业.介绍了OceanBase分布式关系数据库的系统架构和关键技术,包括分布
式事务处理、基于LSM-tree的存储系统以及分布式SQL优化器.详细阐述了OceanBase数据库的高可用
和数据一致性,包括RPO为0和RTO小于8秒.也介绍了OceanBase数据库多租户机制,即采用了集群内
原生多租户设计,在集群内实现多个互相独立的数据库服务.基于Sysbench和TPC-H评测基准,对比实验
结 果 表 明, 1)在 单 机 模 式 下 , OceanBase的 性 能 是 MySQL的 1.27倍 至 2倍 多 ; 2)在 单 主 模 式 下 ,
OceanBase的性能是MySQL的1.25倍至近2倍;3)在多主模式下,OceanBase的性能是MySQL的1.09倍
至3.1倍,对于下OLAP复杂查询,OceanBase的性能是MySQL的6倍到327倍.
收稿日期:2023-10-19;修回日期:2023-12-14
通信作者:阳振坤(zhengxiang@oceanbase.com)
计算机研究与发展
DOI:10.7544/issn1000-1239.202330835
JournalofComputerResearchandDevelopment
x(x):xx−xx,xxxx
评论