用户名: 密码: 验证码:
基于Nginx的负载均衡技术研究与优化
详细信息    查看全文 | 推荐本文 |
  • 英文篇名:Research and Optimization of Load Balancing Based on Nginx
  • 作者:戴伟 ; 马明栋 ; 王得玉
  • 英文作者:DAI Wei;MA Ming-dong;WANG De-yu;School of Telecommunications & Information Engineering,Nanjing University of Posts and Telecommunications;School of Geographical and Biological Information,Nanjing University of Posts and Telecommunications;
  • 关键词:Nginx ; 负载均衡 ; 反向代理 ; IO复用 ; 动态反馈 ; 服务器集群
  • 英文关键词:Nginx;;load balancing;;reverse proxy;;IO multiplexing;;dynamic feedback;;server cluster
  • 中文刊名:WJFZ
  • 英文刊名:Computer Technology and Development
  • 机构:南京邮电大学通信与信息工程学院;南京邮电大学地理与生物信息学院;
  • 出版日期:2018-12-19 15:53
  • 出版单位:计算机技术与发展
  • 年:2019
  • 期:v.29;No.263
  • 基金:江苏省自然科学基金-青年基金项目(BK20140868)
  • 语种:中文;
  • 页:WJFZ201903016
  • 页数:4
  • CN:03
  • ISSN:61-1450/TP
  • 分类号:83-86
摘要
随着互联网的普及和智能上网设备的高速发展,网络用户和业务量呈指数增长,热点事件的到来更是会引发网络节点的波动。传统的单一的网络服务器根本无法承担大量并发业务请求,因此服务器集群技术应运而生。为了能在服务器集群中合理分配业务,使各个服务器都发挥应有的性能,负载均衡机制及均衡算法成为了关键。Nginx作为一款轻量级高并发的Web服务器,单机可以承受十万级的并发请求,而其模块化的设计,更是可以方便地配置为反向代理服务器,将请求分配给上游服务器。文中将分析Nginx的反向代理优势,通过对其自带的负载均衡算法进行分析,并优化出一种具有实时反馈能力的负载均衡算法。通过测试,改进后的算法分配更加合理,处理连接的速度也更加快速,满足了设计要求。
        With the popularization of the Internet and the rapid development of smart Internet devices,the number of network users and services has grown exponentially,and the arrival of hot-spot events will cause network nodes to fluctuate. The traditional single network server cannot handle a large number of concurrent service requests at all,therefore the server cluster technology arises. In order to distribute the service reasonably in the server cluster and make each server play its performance,load balancing mechanism and balancing algorithm become the key. As a lightweight and highly concurrent Web server,Nginx can withstand 100 000 concurrent requests on a single machine,and its modular design allows it to be easily configured as a reverse proxy server to allocate requests to upstream servers. In this paper,we analyze the advantages of Nginx reverse proxy and its own load balancing algorithm,and optimize a load balancing algorithm with real-time feedback. Through testing,the improved algorithm is more reasonable in allocation and faster in connection processing,which meets the design requirements.
引文
[1] 凌质亿,刘哲星,曹蕾.高并发环境下Apache与Nginx的I/O性能比较[J].计算机系统应用,2013,22(6):204-208.
    [2] 王艳,陈卫卫.基于Nginx替代Apache在高并发WEB负载均衡系统中的应用[J].电子测试,2015,20(6):88-92.
    [3] 田纯青.利用Nginx实现基于URI的Web负载分配[J].现代计算机,2009,11(7):187-190.
    [4] SERRANO D,PATIOMARTNEZ M,JIMNEZPERIS R.An autonomic approach for replication of internet-based services[C]//Proceedings of the IEEE symposium on reliable distributed systems.Naples,Italy:IEEE,2008:54-57.
    [5] 张炜森,陈涛,李康.Nginx高并发负载均衡原理与策略比较研究[J].工业控制计算机,2018,31(1):85-86.
    [6] BITTAU A,BELAY A,MASHTIZADEH A.Hacking blind[C]//IEEE symposium on security and privacy.San Jose,CA,USA:IEEE,2014:154-160.
    [7] BRCIC P.Improving the performance of physical servers using a proxy servers accelerators[C]//21st telecommunications forum telfor.Belgrade,Serbia:IEEE,2013:43-48.
    [8] 张尧.基于Nginx高并发Web服务器的改进与实现[D].长春:吉林大学,2016.
    [9] 杨薇,赵亮.Web服务器性能优化研究[J].电子技术与软件工程,2016(13):20.
    [10] LIU Chaoping,LI Feng.The design and implementation of exquisite course website[C]//International symposium on information technologies in medicine and education.Hokodate,Hokkaido,Japan:IEEE,2012:43-46.
    [11] 李彬,朱亚兴.Nginx在实现网站负载均衡方面的研究[J].信息与电脑:理论版,2013,25(11):49-50.
    [12] 陶辉.深入理解Nginx[M].北京:机械工业出版社,2016.
    [13] 赵峡策.基于Nginx和Memcache的负载均衡集群架构设计[J].电子技术与软件工程,2014,23(5):39-40.
    [14] CHI X,LIU B,NIU Q.Web load balance and cache optimization design based nginx under high-concurrency environment[C]//2012 third international conference on digital manufacturing and automation.[s.l.]:[s.n.],2012:62-67.

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

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

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