摘要
随着互联网的普及和智能上网设备的高速发展,网络用户和业务量呈指数增长,热点事件的到来更是会引发网络节点的波动。传统的单一的网络服务器根本无法承担大量并发业务请求,因此服务器集群技术应运而生。为了能在服务器集群中合理分配业务,使各个服务器都发挥应有的性能,负载均衡机制及均衡算法成为了关键。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.
作者
戴伟
马明栋
王得玉
DAI Wei;MA Ming-dong;WANG De-yu(School of Telecommunications & Information Engineering,Nanjing University of Posts and Telecommunications,Nanjing 210003,China;School of Geographical and Biological Information,Nanjing University of Posts and Telecommunications,Nanjing 210003,China)
出处
《计算机技术与发展》
2019年第3期77-80,共4页
Computer Technology and Development
基金
江苏省自然科学基金-青年基金项目(BK20140868)