中国综合性科技类核心期刊(北大核心)

中国科学引文数据库来源期刊(CSCD)

美国《化学文摘》(CA)收录

美国《数学评论》(MR)收录

俄罗斯《文摘杂志》收录

留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

多主云数据库的全局事务日志

卫孝贤 刘文欣 蔡鹏

卫孝贤, 刘文欣, 蔡鹏. 多主云数据库的全局事务日志[J]. 华东师范大学学报(自然科学版), 2020, (5): 10-20. doi: 10.3969/j.issn.1000-5641.202091002
引用本文: 卫孝贤, 刘文欣, 蔡鹏. 多主云数据库的全局事务日志[J]. 华东师范大学学报(自然科学版), 2020, (5): 10-20. doi: 10.3969/j.issn.1000-5641.202091002
WEI Xiaoxian, LIU Wenxin, CAI Peng. Global transaction log of a multi-master cloud database[J]. Journal of East China Normal University (Natural Sciences), 2020, (5): 10-20. doi: 10.3969/j.issn.1000-5641.202091002
Citation: WEI Xiaoxian, LIU Wenxin, CAI Peng. Global transaction log of a multi-master cloud database[J]. Journal of East China Normal University (Natural Sciences), 2020, (5): 10-20. doi: 10.3969/j.issn.1000-5641.202091002

多主云数据库的全局事务日志

doi: 10.3969/j.issn.1000-5641.202091002
基金项目: 国家自然科学基金(61972149)
详细信息
    通讯作者:

    蔡 鹏, 男, 研究员, 博士生导师, 研究方向为数据库. E-mail: pcai@dase.ecnu.edu.cn

  • 中图分类号: TP392

Global transaction log of a multi-master cloud database

  • 摘要: 随着云计算的盛行, 用户对云数据库的需求越发复杂, 而当下基于共享存储的一写多读的云数据库系统并不能支持写性能的动态扩展. 多个主节点同时提供写服务, 会引起跨节点的读写冲突, 进而导致多主节点缓存不一致. 对于这个问题, 基于全局有序的事务日志的乐观冲突检测可以检测出跨节点事务冲突, 并回滚冲突的事务, 维持整个系统的隔离级别与一致性. 另外, 通过广播和回放全局有序的事务日志, 可以将主节点的修改同步到其余节点, 保证每个节点的独立服务能力. 这一基于事务日志的多主缓存一致性解决方案已实现在开源数据库MySQL上,并通过实验验证了该解决方案对系统性能的影响.
  • 图  1  基于MySQL的多主数据库架构

    Fig.  1  Multi-master database architecture based on MySQL

    图  2  全局事务日志采集模块

    Fig.  2  Global transaction log collection module

    图  3  同步日志广播与异步日志广播时间轴对比

    Fig.  3  Timeline comparison of synchronous log broadcast and asynchronous log broadcast

    图  4  基于Paxos提议的全局事务ID分配机制

    Fig.  4  Global transaction ID allocation mechanism based on the Paxos proposal

    图  5  基于切片的全局事务ID分配机制

    Fig.  5  Global transaction ID allocation mechanism based on slice

    表  1  不同ID分配方式的系统扩展性

    Tab.  1  System scalability with different ID assignment methods

    ID分配方式节点数量/个TPS
    切片 1 933
    3 2 575
    5 4 272
    Paxos提议 1 939
    3 1 546
    5 89
    下载: 导出CSV

    表  2  单次全局ID分配的平均时延

    Tab.  2  Average delay of a single global ID assignment

    ID分配方式节点数量/个平均分配时延/μs
    切片 1 0.162
    3 0.172
    5 0.167
    无冲突Paxos提议 1 0
    3 2 380
    5 907 257
    有冲突Paxos提议 1 0
    3 2 144 001
    5 3 129 936
    下载: 导出CSV

    表  3  单次事务执行的平均时延

    Tab.  3  Average latency for the execution of a single transaction

    ID分配方式节点数量/个平均事务时延/μs
    切片 1 17 541
    3 18 165
    5 19 054
    Paxos提议 1 17 573
    3 33 108
    5 984 902
    下载: 导出CSV
  • [1] VERBITSKI A, GUPTA A, SAHA D, et al. Amazon aurora: Design considerations for high throughput cloud-native relational databases [C]//Proceedings of the 2017 ACM International Conference on Management of Data. ACM, 2017: 1041-1052.
    [2] VERBITSKI A, GUPTA A, SAHA D, et al. Amazon aurora: On avoiding distributed consensus for i/os, commits, and membership changes [C]//Proceedings of the 2018 International Conference on Management of Data. ACM, 2018: 789-796.
    [3] CAO W, LIU Z J, WANG P, et al. PolarFS: An ultra-low latency and failure resilient distributed file system for shared storage cloud database [J]. Proceedings of the VLDB Endowment, 2018, 11(12): 1849-1862. DOI:  10.14778/3229863.3229872.
    [4] HUANG G, CHENG X T, WANG J Y, et al. X-Engine: An optimized storage engine for large-scale E-commerce transaction processing [C]//Proceedings of the 2019 International Conference on Management of Data. ACM, 2019: 651-665.
    [5] ANTONOPOULOS P, BUDOVSKI A, DIACONU C, et al. Socrates: The new SQL server in the cloud [C]//Proceedings of the 2019 International Conference on Management of Data. ACM, 2019: 1743-1756.
    [6] DEPOUTOVITCH A, CHEN C, CHEN J, et al. Taurus database: How to be fast, available, and frugal in the cloud [C]//Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data. ACM, 2020: 1463-1478.
    [7] ORACLE. Oracle Real Application Clusters (RAC) [EB/OL].[2020-07-01]. https://www.oracle.com/database/technologies/rac.html.
    [8] ZIKOPOULOS P, EATON C. What is DB2 pureScale? [EB/OL].(2010-01-22)[2020-07-01]. https://www.ibm.com/developerworks/data/library/dmmag/DBMag_2010_Issue1/DBMag_Issue109_pureScale/.
    [9] 姜承尧. MySQL技术内幕: InnoDB存储引擎 [M]. 北京: 机械工业出版社, 2011.
    [10] 阿里云RDS-数据库内核组. MySQL · 引擎特性 · InnoDB redo log漫游 [EB/OL]. (2015-05-01)[2020-07-01]. http://mysql.taobao.org/monthly/2015/05/01/.
    [11] LAMPORT L. Paxos made simple [J]. ACM Sigact News, 2001, 32(4): 51-58.
    [12] HERCULE K K, EUGENE M M, PAULIN B B, et al. Study of the master-slave replication in a distributed database [J]. International Journal of Computer Science Issues (IJCSI), 2011, 8(5): 319-326.
    [13] BERNSTEIN P A, HADZILACOS V, GOODMAN N. Concurrency Control and Recovery in Database Systems [M]. [S.l.]: Addison-Wesley, 1987.
    [14] ZHENG J J, LIN Q, XU J T, et al. PaxosStore: High-availability storage made practical in WeChat [J]. Proceedings of the VLDB Endowment, 2017, 10(12): 1730-1741. DOI:  10.14778/3137765.3137778.
    [15] KOSSMANN D, KRASKA T, LOESING S. An evaluation of alternative architectures for transaction processing in the cloud [C]//Proceedings of the 2010 ACM SIGMOD International Conference on Management of data. ACM, 2010: 579-590.
    [16] LARSON P Å, BLANAS S, DIACONU C, et al. High-performance concurrency control mechanisms for main-memory databases [J]. Proceedings of the VLDB Endowment, 2011, 5(4): 298-309. DOI:  10.14778/2095686.2095689.
    [17] HARDING R, VAN AKEN D, PAVLO A, et al. An evaluation of distributed concurrency control [J]. Proceedings of the VLDB Endowment, 2017, 10(5): 553-564. DOI:  10.14778/3055540.3055548.
  • 加载中
图(5) / 表(3)
计量
  • 文章访问数:  172
  • HTML全文浏览量:  253
  • PDF下载量:  11
  • 被引次数: 0
出版历程
  • 收稿日期:  2020-08-02
  • 网络出版日期:  2020-09-24
  • 刊出日期:  2020-09-24

目录

    /

    返回文章
    返回