• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学

• 论文 • 上一篇    下一篇

云环境中基于LVS集群的负载均衡算法

王晓龙,蒋朝惠   

  1. (贵州大学计算机科学与技术学院,贵州 贵阳 550025)
  • 收稿日期:2015-07-08 修回日期:2016-09-11 出版日期:2016-11-25 发布日期:2016-11-25
  • 基金资助:

    贵州省基础重大项目(黔科合JZ字[2014]200121)

A loadbalancing algorithm based on LVS cluster in cloud

WANG Xiaolong,JIANG Chaohui   

  1. (College of Computer Science and Technology,Guizhou University,Guiyang 550025,China)
  • Received:2015-07-08 Revised:2016-09-11 Online:2016-11-25 Published:2016-11-25

摘要:

为了解决传统负载均衡技术应用到云计算环境中引发的新问题,提出一种云环境下基于LVS集群分组负载均衡算法。该算法首先根据硬件性能计算各节点的权值,将性能相同(或近似相同)的服务器分为一组,每组节点数量相等(或近似相等),负载均衡器定期地收集各节点CPU、内存、I/O、网络利用率以及响应时间,动态改变节点的权值,使用改进算法选择该组内最佳节点,并计算节点的综合负载和组负载。最后再次使用改进算法由组负载均衡器选择集群最佳节点,并进行任务请求的合理分配,从而解决因并发量过大而引起的时延等问题。实验结果表明,与加权轮询算法(WRR)和加权最少连接算法(WLC)相比,本算法能够在并发量较大的情况下维持较短的响应时间和较高的吞吐率,使集群负载更加均衡。

关键词: 云计算, 动态, 负载均衡, LVS, 算法

Abstract:

In order to deal with the new issue caused by the application of traditional load balancing techniques in the cloud computing environment, we propose a loadbalancing algorithm based on LVS cluster. Firstly, we calculate the weight of each node and divide the servers into different groups, in which their performance should be equal (or approximately equal). The number of nodes in each group should also be equal (or approximately equal). The load balancer regularly collects the data of CPU, memory, I/O, network utilization and response time of each node in the cluster, and dynamically alters the weight of nodes, and selects the best node in this group by using the improved algorithm. At the same time, the comprehensive load of each node and the group load are calculated. Finally, we select the best node of the cluster and carry out the rational distribution of task requests via the group load balancer (GLB), to solve the delay caused by too many concurrent requests in the cloud computing environment. Experimental results show that compared with the weighted round Robin (WRR) and weighted least connections (WLC), the proposed algorithm can concurrently maintain a shorter response time and a higher throughput, which makes the cluster system load balanced.

Key words: cloud computing, dynamic, load balance, LVS, algorithm