计算机科学与探索 ›› 2023, Vol. 17 ›› Issue (11): 2784-2794.DOI: 10.3778/j.issn.1673-9418.2208104

• 数据库技术 • 上一篇    

金融分布式数据库异步全局索引研究

金磐石,李博涵,秦小麟,邢磊,李晓栋,王进   

  1. 1. 中国建设银行,北京 100010
    2. 南京航空航天大学 计算机科学与技术学院/人工智能学院/软件学院,南京 211106
  • 出版日期:2023-11-01 发布日期:2023-11-01

Research on Asynchronous Global Index of Financial Distributed Database

JIN Panshi, LI Bohan, QIN Xiaolin, XING Lei, LI Xiaodong, WANG Jin   

  1. 1. China Construction Bank, Beijing 100010, China
    2. College of Computer Science and Technology/College of Artificial Intelligence/College of Software, Nanjing University of Aeronautics and Astronautics, Nanjing 211106, China
  • Online:2023-11-01 Published:2023-11-01

摘要: 伴随移动支付的快速发展,传统的金融核心业务所使用的集中式数据库面临性能、可用性等方面的挑战。为此有研究者提出了采用计算和存储分离架构的分布式数据库解决思路,通过网络连接构建在物理上分散、逻辑上集中的分布式数据库管理系统。全局索引是分布式数据库提升查询效率的重要手段,但当前的全局索引主要通过在传统网络中利用同步机制来实现。这种机制在金融数据管理的典型交易和批量导入数据场景下面临单表索引数量少、吞吐量降低、事务响应时间抖动等亟需解决的问题。为此,提出了一种基于分布式数据库的异步全局索引架构,通过新增MQ消息队列、分布式缓存,以及利用RDMA网络,实现一种满足金融典型场景需求的异步全局索引。为了验证有效性,与Oracle、CockroachDB在相同的场景下进行大量对比分析,实验结果表明,在金融核心业务数据的批量导入、交易等场景中,该方法的主要性能指标比现有方法提升60%以上,而对系统资源需求降低20%以上。

关键词: 分布式数据库, 异步, 全局索引, 低时延, RDMA网络

Abstract: With the rapid development of mobile payment, the traditional centralized database used by the  financial core business is confronted with challenges in terms of performance and availability. For this reason, some researchers propose a distributed database solution based on the architecture of separation of computing and storage, and build a physically decentralized and logically centralized distributed database management system through network connection. Global index is an important method for distributed database to improve query efficiency, but current global indexing is mainly achieved through the use of synchronization mechanisms in traditional networks.Under the typical transaction and batch import data scenarios of financial data management, this mechanism faces the problems that need to be solved urgently, such as small number of indices in a single table, reduced throughput, and jittery transaction response time. Therefore, an asynchronous global index architecture of distributed database is proposed. This mechanism is applied to adding MQ message queue and distributed cache, and uses RDMA network to realize an asynchronous global index to meet the demands of the real financial scenarios. Through sufficient comparative experiments with Oracle and CockroachDB, experimental results show that the performance is improved by more than 60% compared with the existing methods, and the demand for system resources is reduced by more than 20% in the batch import and transaction of financial core business data.

Key words: distributed database, asynchronous, global index, low latency;RDMA network