In order to satisfy the increasing access number to the Web server, a load balancing algorithm based on Nginx is designed in this paper. The algorithm can choose the appropriate server in high concurrency situation, make full use of the hardware resources and reduce the system blocking or delay. The experimentshow that the algorithm is able to deal with connections faster with smaller error ratiocompared to the Nginx load balancing algorithm,and achieve the design requirement.%为了满足日益增长的网站访问量对服务器的需求,提出了一种基于Nginx的负载均衡算法,并完成算法的软件实现.该算法能在高并发的情况下选择合适的后台服务器,充分利用硬件资源,减少系统阻塞或延时.测试结果表明,相比Nginx自带的负载均衡算法,该算法处理连接的速率更高,稳定性更好,达到了设计要求.
展开▼