摘要
大规模路灯向云平台发送数据会导致服务器在高并发情况下的各节点出现负载失衡、引起通信故障。针对该问题,文中基于微服务提出了一种基于智慧路灯云平台的动态权重负载均衡算法。该算法在初始化时根据各个服务器的硬件性能计算出各自的权重系数及各节点的初始权值,并在请求过程中结合CPU(Central Processing Unit)和网络带宽的空闲率动态地调节服务器权重,实现负载的优化。通过设定最低阈值与计算出的剩余负载率进行比较,将到达负载上限的服务器权值置为0,防止服务器出现过载情况。测试结果表明,在实验环境下,文中算法相比于最小连接数算法和平滑加权轮询算法具有更优的负载均衡效果,相比于动态权重算法,平均响应时间和实际并发连接数也有所提升。
A large-scale street lights send data to the cloud platform,causing load imbalance among nodes of the server in high concurrency,resulting in communication failure.In view of this problem,based on microservices,this study proposes a dynamic weight load balancing algorithm based on the smart street lamp cloud platform.The algorithm calculates the respective weight coefficients and the initial weights of each node according to the hardware performance of each server during initialization,and dynamically adjusts the server weights according to the idle rate of CPU(Central Processing Unit)and network bandwidth during the request process to realize load optimization.By setting the minimum threshold and comparing it with the calculated remaining load rate,the weight of the server that reaches the upper limit of the load is set to 0 to prevent the server from being overloaded.The test results show that the proposed algorithm has a better load balancing effect than the minimum number of connections algorithm and the smooth weighted round robin algorithm in the experimental environment.Compared with the dynamic weight algorithm,the average response time and the actual number of concurrent connections of the proposed method are also improved.
作者
杨泽民
夏长权
李佳颖
朱金荣
韩一帆
YANG Zemin;XIA Changquan;LI Jiaying;ZHU Jinrong;HAN Yifan(School of Physical Science and Technology,Yangzhou University,Yangzhou 225100,China)
出处
《电子科技》
2024年第7期89-94,共6页
Electronic Science and Technology
基金
国家自然科学基金(61802336)
江苏省研究生创新计划(SJCX22_1707)。
关键词
云平台
动态权重
负载均衡
物联网
微服务
集群
智慧路灯
剩余负载
cloud platform
dynamic weight
load balancing
internet of things
microservice
cluster
smart street light
residual load