计算机与现代化 ›› 2022, Vol. 0 ›› Issue (04): 58-64.

• 网络与通信 • 上一篇    下一篇

基于Nginx的DRC集群动态负载均衡策略

  

  1. (1.成都理工大学计算机与网络安全学院,四川成都610059;2.成都大学大数据研究院,四川成都610106)
  • 出版日期:2022-05-07 发布日期:2022-05-07
  • 作者简介:倪雅婷(1996—),女,河南焦作人,硕士研究生,研究方向:大数据技术,E-mail: 1353020757@qq.com; 杨文晖(1969—),女,上海人,副教授,研究方向:大数据技术,E-mail: ywhui@cdut.edu.cn; 苗放(1958—),男,北京人,教授,博士,研究方向:大数据技术,E-mail: miaofang@126.com; 黄安琪(1996—),男,四川德阳人,硕士研究生,研究方向:大数据技术,E-mail: 937654932@qq.com; 蒋媛(1997—),女,四川简阳人,硕士研究生,研究方向:大数据技术,E-mail: 2228767481@qq.com。
  • 基金资助:
    国家自然科学基金资助项目(61071121)

Dynamic Load Balancing Strategy of DRC Cluster Based on Nginx

  1. (1. School of Computer and Network Security, Chengdu University of Technology, Chengdu 610059, China;

    2. Big Data Research Institute, Chengdu University, Chengdu 610106, China)
  • Online:2022-05-07 Published:2022-05-07

摘要: 面向数据的体系架构(DOA)为海量异构数据流通共享提供了新的有效解决方案。而数据注册中心(DRC)作为DOA的核心部件,它的访问性能尤为关键。针对高并发访问带来的DRC集群服务过载问题,采用Nginx反向代理负载均衡技术处理高并发访问。对Nginx的负载策略进行分析优化,提出一种由动态配置、负载收集、算法调度组成的动态负载均衡策略,并在负载调度模块对Nginx加权最小连接调度算法(WLC)进行改进,通过自适应权值不断调度下一个周期内性能最优的节点来处理请求。通过高并发性能测试验证了所提出的负载均衡策略在DRC集群中能更有效处理大流量的访问需求,提高集群的资源利用率和缩短请求响应时间。

关键词: DRC集群, 最小加权连接, 动态负载均衡, 自适应权值, Nginx

Abstract: The data-oriented architecture (DOA) provides a new effective solution for the circulation and sharing of massive heterogeneous data. The data registration center (DRC) is the core component of DOA, and its access performance is particularly critical. Aiming at the problem of DRC cluster service overload caused by high concurrent access, Nginx reverse proxy load balancing technology is used to handle high concurrent access. We analyze and optimize the load strategy of Nginx, propose a dynamic load balancing strategy consisting of dynamic configuration, load collection, and algorithm scheduling, and improve the Nginx weighted least connection scheduling algorithm (WLC) in the load scheduling module. The adaptive weight continuously schedules the node with the best performance in the next cycle to process the request. The high concurrency performance test verifies that the proposed load balancing strategy can more effectively deal with the access demand of large traffic in the DRC cluster, improve the resource utilization of the cluster and shorten the request response time.

Key words: DRC cluster, minimum weighted connection, dynamic load balancing, adaptive weight, Nginx