摘要
随着Web2.0网络应用的兴起和大数据技术的发展,传统的关系型数据库(ORDBMS)已经难以满足海量数据的存储需求。非关系型数据库(NoSQL)因其高扩展性、高伸缩性、高可用性和容错性等特点,得到了越来越多的应用。作为一种新兴的NoSQL数据库,MongoDB数据库因具有模式自由、易于扩展、故障自动恢复、支持自动分片等特点,被广泛应用于大数据处理与分析中。文中首先介绍了MongoDB自动分片架构原理和实现机制,然后分析了MongoDB自带的负载均衡算法,其虽能使各个节点数据量达到平衡,但没有考虑各个节点的负载均衡。为了解决节点的负载平均问题,在原算法基础上提出了一种基于节点实时负载的负载均衡改进算法,改进算法的主要思想是引入节点负载指数作为chunk块迁移的一个判断条件。通过搭建测试环境并进行实验,验证了改进的负载均衡算法可以有效地均衡分片中的数据,提高集群的并发读写性能,从而证明了算法的有效性。
With the rise of Web2.0 network applications and the development of big data technology,the traditional relational database(ORDBMS)has been difficult to meet the storage requirements of massive data.Non-relational database(NoSQL)has been applied more and more because of its high expansibility,high scalability,high availability and fault tolerance.As a new NoSQL database,MongoDB is widely used in big data processing and analysis because of its free mode,easy expansion,automatic fault recovery and automatic fragmentation.We firstly introduce the principle and implementation mechanism of MongoDB automatic fragmentation architecture,and then analyze the load balancing algorithm of MongoDB.Although it can balance the data volume of each node,the load balancing of each node is not considered.In order to solve the load averaging problem of nodes,an improved load balancing algorithm based on real-time load of nodes is proposed.Its main idea is to introduce the load index of node as a judgment condition for chunk block migration.By setting up the test environment and conducting experiments,it is verified that the improved load balancing algorithm can effectively balance the data in the fragment and improve the concurrent read-write performance of the cluster,which proves its effectiveness.
作者
陈敬静
马明栋
王得玉
CHEN Jing-jing;MA Ming-dong;WANG De-yu(School of Telecommunications&Information Engineering,Nanjing University of Posts and Telecommunications,Nanjing 210003,China;School of Geographical and Biological Information,Nanjing University of Posts and Telecommunications,Nanjing 210003,China)
出处
《计算机技术与发展》
2020年第3期88-92,共5页
Computer Technology and Development
基金
江苏省自然科学基金-青年基金项目(BK20140868)。