分布式负载均衡的Java实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着信息化进程的推进,分布式系统得到了广泛的应用和重视,但是由于任务到达的随机性,分布式系统中经常出现不同机器负载差异过大的现象。为解决这个问题,提出了负载均衡技术。负载均衡技术能合理的将客户端的请求分配到系统节点中,使得各个服务器的负载大致相同,从而能快速响应客户端的请求,提高整个系统的性能。
     本文前三章描述了研究课题的背景和意义,介绍了负载均衡的基本概念并分析了分布式系统中负载均衡实现的方式。在此基础上,提出了一种适用于集中式(即中间节点负责调度任务)分布式系统的动态负载均衡框架。该框架通过SNMP协议远程获取标识服务器负载信息的参数,并通过一种改进的动态负载均衡策略调度任务。它能够有效的选取当前最佳的服务器(通常是空闲和低负载服务器)响应客户端的请求,实现任务的均衡分配。使用中,不需要安装其他的程序,只需将此框架嵌入到分布式系统中间件中即可实现系统的负载均衡。
     本文提出的系统全部使用Java语言实现。得益于Java语言的平台无关性,该框架具有一定的通用性,能运行于不同类型的平台上。然而,由于Java运行的效率相对较低,而且本课题以集中式系统为模型开发,使得该框架在大型复杂系统中具有一定的局限性,主要应用在中小企业的负载均衡中。
     本文的最后,搭建环境测试系统框架的可用性,并通过对结果的分析,证明了该框架的可行性,顺利完成了课题的任务。
With the development of information process, the distributed system has been widely applied and highly valued. However, as the processes arrive randomly, different servers in the distributed system may have considerably defferent load. To solve this problem, the load balancing technology has been proposed. Load balancing can reasonably assign the requests of the client to different servers, which can make each server has roughly the same load. In this way, the system can respond the request quickly and the entire performance of the system improves.
     The first three chapters in this paper describe the background and significance of the research topic, introduce the basic concepts of load balancing and analyze the methods to achieve load balancing in distributed systems. On the basis of these knowledge, a dynamic load balancing framework for centralized (ie, an intermediate node responsible for scheduling tasks) distributed system is proposed. The framework gets parameters that can identify the server's load information remotely through the SNMP protocol, and it improves a dynamic load balancing strategy. It can effectively select the best server (usually idle or low load server) to respond the client's request and distribute the processes to the servers evenly. In practice, embeding this framework in distributed system's middleware simply can achieve the load balancing without installing other programs.
     The framework proposed in this paper achieved totally via Java language. As Java is independent on the platforms, the framework can commonly be used on different types of programs. However, due to the low efficiency of Java and the bottlenecks role of the intermediate node, the framework has certain limitations in large and complex systems but can be well applied to SMES's load balancing systems.
     In the end of the paper, we built a test environment to prove the feasibility of the framework. Through the analysis of the results proved the feasibility of the framework and the successful completion of the task.
引文
[1]李先毅.LVS集群管理系统[D].:大连理工大学,2004.
    [2]许伟.分布式系统中的主机负载预测与动态负载均衡研究[D].中南大学,2004.
    [3]周美娜.超大规模分布式系统负载平衡研究[D].大连理工大学,2008.
    [4]张华.移动HLR用户管理系统的负载均衡方案研究[D].太原理工大学,2006.
    [5]刘爱洁.负载均衡技术浅析[J].电信工程技术与标准化,2002,(6):78-83.
    [6]陈榕.票据交易系统Web服务器负载均衡研究[D].上海交通大学,2008.
    [7]王春娟,董丽丽,贾丽等.Web集群系统的负载均衡算法[J].计算机工程,2010,36(2):102-104.
    [8]冯青峰.基于JavaRMI的分布对象负载均衡研究与实现[D].西安电子科技大学,2002.
    [9]陈登伟,鲁智勇.网络动态负载均衡算法分析[J].现代电子技术,2003,26(21):81-84.
    [10]黄曦.Web服务器集群负载均衡技术的应用研究[D].重庆大学,2004.[11]周伟.基于SNMP的计算机网络性能管理系统研究与实现[D].太原理工大学,2003.
    [12]丁云正.SNMP v3的安全性分析及其在网管应用中的改进[D].南昌大学,2005.
    [13]吴晓葵.利用SNMP获取网络资源信息[J].现代电子技术,2004,27(16):45-48.
    [14]李登.分布式系统负载均衡策略研究[D].中南大学,2002.
    [15]苏占玖.构建网络教育应用系统的高可用可伸缩基础平台[D].北京邮电大学,2010.
    [16]范国闯,朱寰,黄涛等.Web应用服务器自适应负载平衡服务[J].软件学报,2003,14(6):1134-1141.
    [17]马慧,张勇.一种动态负载均衡中间件的研究与实现[J].福建电脑,2008,24(11):17-18,29.
    [18]李磊.分布式计算引擎的集群管理及负载均衡策略研究[D].:电子科技大学,2011.
    [19]尹锋.分布式系统动态负载分配算法研究[J].微计算机信息,2009,(18).
    [21]马宁.动态反馈负载均衡算法的研究[J].华中科技大学学报(自然科学版),2010,(2).
    [22]柳清瑞.中间件的负载均衡技术研究[J].小型微型计算机系统,2002,(3).
    [23]岑驾科,邵秀丽.负载均衡策略及可扩展存储资源预约协议[J].计算机工程与应用,2005,(7).
    [24]马自谦.基于组件代理服务器的DCOM负载平衡策略与实现[D].:山东大学,2005.
    [25]张靖.Web服务器负载均衡研究[D].:电子科技大学,2005.
    [26]浦冰融.基于SNMP的网络实时性能监视系统的设计与实现[D].:北京邮电大学,2006.
    [27]李悦.利用SNMP对网络管理系统的分析与设计[D].:天津大学,2006.
    [28]Load Balancing in a Cluster Computer. Paul Werstein, Hailing Situ and Zhiyi Huang, Proceedings of the Seventh International Conference on Parallel and Distributed Computing,Applications and Technologies (PDCAT06),2006
    [29]Markus Aleksy, Axel Korthaus, and Martin Schader. Design and Implementation of a Flexible Load Balancing Service for CORBA-based Applications. In Proceedings of the International Conference on Parallel and Distributed Processing Techniques and Applications (PDPTA'01), Las Vegas, USA, June 2001. IEEE.
    [30]Thomas Barth, Gerd Flender, Bernd Freisleben and Frank Thilo. Load Distribution in a CORBA Environment. In Proceedings of the International Symposium on Distributed Objects and Applications (DOA'99), Edinburgh, Scotland, September 1999. OMG.
    [31]Ossama Othman, Carlos O'Ryan, and Douglas C. Schmidt. Strategies for CORBA Middleware-Based Load Balancing. IEEE Distributed Systems Online,2(3), March 2001.
    [32]M. V. Devarakonda and R. K. Iyer. Predictability of processs resource usage:A measurement-based study on UNIX. IEEE Transactions on Software Engineering,15(12):1579-1586,1989.
    [33]D. Ferrari and S. Zhou. An empirical investigation of load indices for load balancing applications. In B. A. Shirazi, A. R. Hurson, and K. M. Kavi, editors, Scheduling and Load Balancing in Parallel and Distributed Systems, pages 487-496. IEEE Computer Society Press, Los Alamitos, California,1995.
    [34]O. Kremien, J. Kramer, and J. Magee. Scalable, adaptive load sharing for distributed systems. IEEE Parallel and Distributed Technology, Systems and Applications, 1(3):62-70,1993.
    [35]S. Sharma, S. Singh and M. Sharma, "Performance Analysis of Load Balancing Algorithms", World Academy of Science, Engineering and Technology (PWASET), vol.28, pp.208-267, April 2008.
    [36]Y. Hamam and K. S. Hindi. Assignment of program modules to processors: A simulated annealing approach. European Journal of Operational Research, vol. 122(2), pp.509-513, April 2000.
    [37]M Yoshida, K.Sakamoto, Code Migration Control in Large Scale Loosely Coupled Distributed Systems, Proc. Of the 4th International Conference on Mobile Technology, Applications and Systems, Singapore, vol.65, pp.345-455, September 2007.
    [38]Evangelos P. Markatos and Thomas J. LeBlanc, "Load Balancing vs Shared-Memory Multiprocessors",21th International Conference on Parallel Processing, vol.22, pp.234-345, August 1992.
    [39]Susan F. Hummel, Edith Schonberg and Lawrence E. Flynn, "Factoring:A Practical and Robust Method for Scheduling Parallel Loops", IEEE, Supercomputing'91, Albuquerque, vol.1, pp.610-619, November,1991.
    [40]C. Kruskal and A, Weiss, "Allocating Independent Subtasks on Parallel Processors", IEEE Transaction on Software Engineering, SE-10, vol.10, October, 1985.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700