Load Balancing Algorithm of API Gateway Based on Microservice Architecture for a Smart City

Author:

Cao Xiaoming1,Zhang Huabing2ORCID,Shi Hongyu1

Affiliation:

1. Yunsheng Science and Technology Park 1 , No. 11 Spectral Middle Rd., Huangpu District, Guangzhou City, Guangdong Province510700, China

2. Yunsheng Science and Technology Park 2 , No. 11 Spectral Middle Rd., Huangpu District, Guangzhou City, Guangdong Province510700, China (Corresponding author), e-mail: 15820291759@163.com , ORCID link for author moved to before name tags https://orcid.org/0000-0001-8272-5272

Abstract

Abstract As the entrance of the computer systems, the API gateway is an indispensable part of the microservice architecture. To realize the load balancing of API gateway, this paper studies the load balancing algorithm of the API gateway based on the microservice architecture. In doing this, we analyze the microservice architecture level from the data layer, the basic layer, and other levels, take the container cloud as the carrier of the microservice architecture, combine it with the client and API gateway, and design the API gateway based on the microservice architecture. We then judge whether the microservice identifier in the request source of the API gateway client is included in the API gateway routing table and determine the service cluster to which the microservice belongs according to the microservice identifier. After retrieving the qualified backend microservice container list according to the service cluster information, it adopts a load balancing algorithm based on dynamic weight, takes central processing unit (CPU) utilization and memory utilization as parameters to evaluate the resource load of microservers, uses an extreme gradient lifting model to predict CPU utilization and memory utilization, calculates the weight of microservers based on the prediction results, selects the microserver with the highest weight value to make API gateway service requests, and initiates API gateway service calls to specific backend microservice containers, thereby completing the load balancing of the API gateway. The experimental results show that the average load balancing degree of the algorithm is about 95 %, the average network resource utilization rate is as high as 89 %, and the algorithm execution time is short.

Publisher

ASTM International

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3