| Multiple API gateways have emerged to address the challenge of providing open APIs in containerized microservices deployment context,including Spring Cloud Gateway,Zuul,Kong,and Istio Gateway.While each of these gateways has its own advantages,they also have limitations,such as high resource occupancy rate of the load balancing module in high-concurrency scenarios,request queuing and processing delays,single gateway proxy failure leading to a single point of failure,and difficulty in extending traffic control policies.Furthermore,in containerized deployment scenarios,compatibility with Dubbo and Spring Cloud frameworks is required.To address these shortcomings,this paper proposes a highly scalable,highly available and high-performance gateway solution.The main contributions of this work are as follows:(1)To address the challenges of gateway plugin development and compatibility with traditional microservice protocols,a network plugin extension module was developed and embedded into the gateway proxy to enable plugin hot-upgrading and deployment.An MCP server was implemented to integrate the service registration list of traditional microservices such as Dubbo and Spring Cloud into the API gateway management platform.(2)To address the problems of response latency and inadequate resources to meet service quality requirements in Kubernetes’ s responsive scaling strategy,an eBPF-based metric collector was used instead of the traditional metrics server to collect the concurrent request volume of the gateway proxy and provide it to the Kubernetes horizontal pod autoscaler component as the elastic scaling judgment standard.This approach improved the response speed of elastic scaling and reduced service loss rate by 6.08%,thereby enhancing the service quality of web applications.The eBPF technology was also used to replace nginx in load balancing between multiple gateway proxies at the gateway access layer,achieving layer-4 load balancing acceleration.Compared with the traditional Nginx reverse proxy,the performance request delay was reduced by 25.6%,and throughput was increased by an average of 7.1%.(3)To address the problem of the inability of the traditional least-connection algorithm to balance load among nodes with significant performance differences in backend server load balancing,an improved dynamic weight load balancing strategy was used in the gateway proxy.This approach considers various indicators of node load and uses consistent hashing to ensure service quality when the failure rate is high.The strategy improves the overall resource utilization of the system and reduces the load imbalance,significantly reducing the number of failed requests in high-concurrency scenarios compared with traditional round-robin and leastconnection algorithms.The experiment results indicate that the proposed eBPF-based cloud-native API gateway system,which is highly scalable,distributed,and extensible,can operate smoothly.The API gateway management platform addresses the challenge of traditional protocol access,and the plugin extension module in the gateway proxy enables the hot upgrading and deployment of network plugins.The backend load balancer using eBPF technology and the improved dynamic weight load balancing strategy achieve high performance,and the elastic scaling module for gateway proxies and the gateway access layer load balancer together ensure the system’s high availability. |