暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
SIGMOD 2023-PolarDB-IMCI- A Cloud-Native HTAP Database System at Alibaba.pdf
429
14页
6次
2023-05-31
免费下载
PolarDB-IMCI: A Cloud-Native HTAP Database System at Alibaba
Jianying Wang
, Tongliang Li
, Haoze Song
, Xinjun Yang
, Wenchao Zhou
, Feifei Li
Baoyue Yan
, Qianqian Wu
, Yukun Liang
, Chengjun Ying
§
, Yujie Wang
, Baokai Chen
Chang Cai
, Yubin Ruan
, Xiaoyi Weng
, Shibin Chen
, Liang Yin
, Chengzhong Yang
, Xin Cai
,
Hongyan Xing
, Nanlong Yu
, Xiaofei Chen
, Dapeng Huang
, Jianling Sun
§
Alibaba Group
§
Zhejiang University
{beilou.wjy, litongliang.ltl, songhaoze.shz, xinjun.y, zwc231487, lifeifei, baoyue.yby, daisy.wqq, liangyukun.lyk
zhencheng.wyj, baokai.cbk, caichang.cc, yubin.ryb, echo.wxy, wuha.csb, allen.yinl, chengzhong.ycz
frank.cx, diane.xhy, nanlong.ynl, chenxiaofei.cxf, wuzang.hdp}@alibaba-inc.com
{yingcj,sunjl}@zju.edu.cn
ABSTRACT
Cloud-native databases have become the de-facto choice for mission-
critical applications on the cloud due to the need for high availabil-
ity, resource elasticity, and cost eciency. Meanwhile, driven by
the increasing connectivity between data generation and analysis,
users prefer a single database to eciently process both OLTP and
OLAP workloads, which enhances data freshness and reduces the
complexity of data synchronization and the overall business cost.
In this paper, we summarize ve crucial design goals for a cloud-
native HTAP database based on our experience and customers’
feedback, i.e., transparency, competitive OLAP performance, min-
imal perturbation on OLTP workloads, high data freshness, and
excellent resource elasticity. As our solution to realize these goals,
we present PolarDB-IMCI, a cloud-native HTAP database system
designed and deployed at Alibaba Cloud. Our evaluation results
show that PolarDB-IMCI is able to handle HTAP eciently on
both experimental and production workloads; notably, it speeds up
analytical queries up to
×
149 on TPC-H (100
𝐺𝐵
). PolarDB-IMCI
introduces low visibility delay and little performance perturbation
on OLTP workloads (< 5%), and resource elasticity can be achieved
by scaling out in tens of seconds.
CCS CONCEPTS
Information systems DBMS engine architectures
; Data-
base transaction processing; Online analytical processing engines.
KEYWORDS
cloud databases, hybrid transactional and analytical processing
ACM Reference Format:
Jianying Wang, Tongliang Li, Haoze Song, Xinjun Yang, Wenchao Zhou,
Feifei Li, Baoyue Yan, Qianqian Wu, Yukun Liang, Chengjun Ying, Yujie
Wang, Baokai Chen, Chang Cai, Yubin Ruan, Xiaoyi Weng, Shibin Chen,
Liang Yin, Chengzhong Yang, Xin Cai, Hongyan Xing, Nanlong Yu, Xiaofei
Chen, Dapeng Huang, Jianling Sun. 2023. PolarDB-IMCI: A Cloud-Native
HTAP Database System at Alibaba. In Procee dings of International Conference
This work is licensed under a Creative Commons Attribution Inter-
national 4.0 License.
SIGMOD’23, June 18–23, 2023, Seattle, WA, USA
© 2023 Copyright held by the owner/author(s).
ACM ISBN 978-x-xxxx-xxxx-x/YY/MM.
https://doi.org/10.1145/3589785
on Management of Data (SIGMOD’23). ACM, New York, NY, USA, 14 pages.
https://doi.org/10.1145/3589785
1 INTRODUCTION
In recent years, cloud-native databases [
8
,
20
,
25
,
52
] have become
an inexorable trend in the database industry. Dierent from on-
premise databases, a cloud-native database decouples its architec-
ture into two layers: a computation layer and a storage layer, allow-
ing resources to scale independently. Nodes equipped with disks
(in the storage layer) form a shared storage pool that serves as a
unied data interface for nodes in the computation layer. This dis-
aggregation architecture enables database systems to oer extreme
elasticity, exible on-demand charging models, and low operat-
ing costs for customers. As a result, the market of cloud-native
databases has quickly taken o [36].
Meanwhile, we have witnessed another trend that the line be-
tween classic OLTP and OLAP databases started to blur: there is a
growing need for a database to provide sucient support for both
transactional processing and analytical processing, especially in
the elds of business intelligence [
51
], social media [
5
,
38
], fraud
detection [
7
], and marketing [
21
,
56
]. To provide such capability,
traditional solutions often deploy data and application logic into
two databases, one specialized in OLTP and the other in OLAP (e.g.,
MySQL [
40
] for OLTP, and ClickHouse [
16
] for OLAP), and rely
on data synchronization techniques (such as Extract-Transform-
Load [
50
] (ETL) workow) for ensuring consistencies between them,
as shown in Figure 1. According to our statistics, nearly 30% of the
customers of PolarDB, an OLTP database, synchronize data to an
independent data warehouse system for data analytics needs.
Such solutions are costly, as it negatively impacts the OLTP per-
formance, and introduces a time-consuming data synchronization
process, which further leads to delays or even inconsistencies be-
tween the data maintained at the TP/AP databases. In practice, these
issues lead to sub-optimal user experience and a large number of
user inquiries. To address these issues, it calls for a cloud-native Hy-
brid Transactional and Analytical Processing (HTAP) database. In
this paper, we present PolarDB-IMCI, a cloud-native HTAP database
deployed at Alibaba Cloud. We summarize the crucial design goals
of PolarDB-IMCI below, which are also applicable to the design of
a general cloud-native HTAP database.
G#1: Transparent Query Execution.
To serve mixed work-
loads in a single database, database users should not be required
arXiv:2305.08468v1 [cs.DB] 15 May 2023
SIGMOD’23, June 18–23, 2023, Seale, WA, USA Jianying Wang et al.
OLTP DBMS
(e.g., MySQL)
OLAP DBMS
(e.g., ClickHouse)
ETL
REDO
HTAP DBMS
(PolarDB-IMCI)
QT
T Q
Figure 1: Comparison of ETL and PolarDB-IMCI.
to understand the working logic of the database, nor should they
identify query types manually. That is, users should not perceive
two isolated systems (e.g., engines, indexes, interfaces, etc.) for
OLAP and OLTP queries respectively. Our system should provide
a unied SQL interface for both OLAP and OLTP workloads.
G#2: Advanced OLAP Performance.
As a major goal of any
HTAP database, the OLAP performance (e.g., execution latency)
of PolarDB-IMCI should be comparable to typical databases spe-
cialized in processing OLAP queries (typically through the intro-
duction of columnar data storage).
G#3: Minimal Perturbation on OLTP Workloads.
While the
performance of OLAP queries is signicantly improved, it should
have a minimal negative impact on the performance of OLTP
queries. In fact, as we have practically validated in real application
scenarios, OLTP queries are usually more mission-critical and
are more sensitive to performance degradation. This requires
eective resource isolation for OLTP and OLAP queries.
G#4: High Data Freshness.
High data freshness is an important
property of HTAP databases, which is a distinguishing advan-
tage compared to the traditional Extract-Transform-Load (ETL)
method. In this paper, we follow earlier similar work [
12
,
27
]
using the visibility delay as a freshness score for a query. By
denition, the visibility delay is the time interval during which
updates to the database can be visible to OLAP queries.
G#5: Excellent Resource Elasticity.
In HTAP scenarios, the
consumption of CPU/IO resources uctuates signicantly, from
hundreds to thousands of times. As a key feature of cloud-native
databases, our system should ensure high resource elasticity
(e.g., scale-out in minutes or even seconds) to adaptively serve
the changing data volume and analytical workloads with stable
performance and high resource utilization.
PolarDB-IMCI meets all desired goals (i.e., G#1-5) with the fol-
lowing innovations. First, to meet G#1 and G#2, we implemented
in-memory column index (IMCI, §4) as complementary storage.
PolarDB-IMCI absorbs diverse advanced optimizations from the
OLAP community and derives a new SQL engine (§6.3) to match
the execution mode on columns. Further, PolarDB-IMCI proposes
a new query routing mechanism (§6.1) that dispatches queries trans-
parently.
Second, to meet G#3, PolarDB-IMCI resides column indexes on
separated read-only (RO) nodes (§3.1) with a shared storage archi-
tecture to provide eective resource isolation between OLTP and
OLAP requests. Updates are propagated to RO nodes by reusing
REDO logs (§5.3) (i.e., the dierential logging for the row store)
instead of shipping additional logical logs (i.e., MySQL Binlogs).
Third, to meet G#4, we enhance our update propagation frame-
work with commit-ahead log shipping (CALS, §5.1) and 2-Phase
conict-free log replay (2P-COFFER, §5.2). CALS ships transaction
logs before committing. 2P-COFFER eciently parses and applies
REDO logs to RO nodes. Furthermore, we implemented the column
index as append-only storage (§4): records are organized in insert or-
der rather than primary key order. Thus, updates to column indexes
are performed out-place and quickly.
Finally, to meet G#5, the checkpoint mechanism of the colum-
nar index is seamlessly built into PolarDB’s original storage en-
gine. Therefore fast scale-out capability can be achieved by quickly
pulling up a RO node using the checkpoint on shared storage (§7).
We started the design and development of cloud-native PolarDB
in 2017, and seek for an HTAP solution (i.e., PolarDB-IMCI) in 2019.
By now, PolarDB-IMCI is severing a large number of internal and
external customers (Table 3). The key contributions of this work
are listed as follows:
We propose PolarDB-IMCI, an HTAP solution for cloud-
native relational database systems. To the best of our knowl-
edge, PolarDB-IMCI is the rst cloud-native HTAP database
to satisfy all of the aforementioned design goals.
We design an architecture that provides dual-format stor-
age on read-only nodes under the storage-computation sep-
aration architecture, which enables ecient execution of
analytical queries and minimizes the impact on OLTP load.
Additionally, PolarDB-IMCI is the rst practical template
to demonstrate that it is possible and applicable to imple-
ment replication from row-store to dual-format storage with
physical redo logs while reducing replication latency to mil-
lisecond levels.
We evaluate PolarDB-IMCI with diverse experiments (in
both experimental and production environments). The ex-
perimental results show that PolarDB-IMCI outperforms
row-based PolarDB up to
×
149 on a standard analytical
workload TPC-H (100
𝐺𝐵
), and its performance is compa-
rable to the advanced OLAP databases (e.g., ClickHouse).
Performance degradation on OLTP is tiny (less than 5%),
even when OLAP workloads increase continuously. The visi-
bility delay of PolarDB-IMCI at is <5
𝑚𝑠
on typical workloads,
and <30
𝑚𝑠
under heavy workloads. PolarDB-IMCI can scale
out in tens of seconds.
The remainder of the paper is organized as follows. §2 introduces
the background of HTAP and cloud-native databases. §3 presents
the architecture. PolarDB-IMCI’s components and update prop-
agation framework are introduced in §4 and §5 respectively. §6
discusses query dispatch, optimization, and execution. §7 intro-
duces the checkpoint mechanism. §8 details the experiments and
evaluation. §9 concludes the paper.
2 BACKGROUND AND RELATED WORK
2.1 Hybrid Transactional/Analytical
Processing
For long decades, OLTP and OLAP databases are dedicatedly de-
signed for their respective workloads. For instance, OLTP engines
(e.g., MySQL [
40
]) prefer row-based data formats, row-at-a-time
operators, and early materialization strategy, favoring data mod-
ication and point queries. On the contrary, OLAP engines (e.g.,
of 14
免费下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜