摘要
为提升PC构件溯源数据库的可扩展性及高效性,提出一种基于MySQL的分布式数据库集群搭建方法。通过对MySQL采用ZooKeeper分布式搭建,可实现MySQL的分表分库、读写分离及负载均衡,构建多服务器下的数据库集群,在保证高可靠性和扩展性基础上实现运营成本的最优。通过搭建数据采集环境并对分布式MySQL集群进行测试,结果表明在大数据高并发交互状态下分布式MySQL比传统单机模式平均读写时间减少70.434%,在处理大规模数据方面的能力获得明显提升。
In order to improve the scalability and efficiency of the PC component traceability database,a distributed database cluster construction method based on MySQL is proposed.By using ZooKeeper distributed construction for MySQL,MySQL's sub-database partitioning,read-write separation and load balancing can be realized,and database clusters under multiple servers can be built to achieve optimal operation cost based on high reliability and scalability.By building a data collection environment and testing distributed MySQL clusters,the results show that distributed MySQL reduces the average read/write time by 70.434% compared with the traditional stand-alone mode in the high-data concurrent interaction state,and the ability to process large-scale data is significantly improved.
作者
刘申
LIU Shen(Hebei Mechatronics Intermediate Pilot Production Base,Shijiazhuang Hebei 050081,China)
出处
《河北省科学院学报》
CAS
2019年第1期7-12,共6页
Journal of The Hebei Academy of Sciences