Containerized Microservice Load Balancing With Direct Container Routing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In Kubernetes microservice architectures, the API Server experiences high load and slow distribution of service configuration information due to the large number of nodes and increasing data volume, leading to inefficiencies in service discovery and load sharing.
Innovation Solution
A load balancing method that intercepts messages using a proxy component, encapsulates them through a tunnel, and sends them to a centralized load balancing component for distribution, allowing direct communication between source and destination containers based on network address translation, reducing the need for extensive service configuration information distribution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If each node acquires and delivers service configuration information through the API Server, then service discovery and load sharing are enabled, but the API Server experiences high load and slow distribution when there are a large number of nodes
Solution Approach 1:
The patent segments the centralized API Server's distribution function into distributed peer-to-peer transmissions between nodes. Each node independently delivers service configuration information to other nodes directly, rather than all nodes communicating through a single central API Server. This segmentation reduces the API Server's load and accelerates distribution speed across the cluster.
Solution Approach 2:
The patent combines the service configuration information delivery function with the existing peer-to-peer communication infrastructure. Nodes utilize their established communication channels to simultaneously exchange service configuration information and other cluster data, eliminating the need for a separate centralized distribution path through the API Server.
2Device complexity
If service configuration information is distributed through the API Server, then centralized control is maintained, but communication links are long and throughput is reduced with increased delay
Solution Approach 1:
The patent segments the communication path from a single long centralized route (client → API Server → destination node) into multiple shorter direct peer-to-peer links. Service configuration information is delivered directly between nodes through established communication channels, shortening the communication path and reducing delay while maintaining controlled distribution through coordinated node participation.
Solution Approach 2:
The patent introduces intermediate nodes as mediators in the information distribution process. Instead of direct client-to-API Server-to-destination communication, intermediate nodes relay service configuration information along peer-to-peer paths, effectively distributing the communication burden and reducing the length of critical communication links while maintaining systematic control.
3Loss of information
If the API Server distributes service configuration information to all nodes, then comprehensive service awareness is achieved, but the distribution pressure and load on the API Server increase significantly
Solution Approach 1:
The patent extracts the information distribution function from the API Server and transfers it to the node network itself. Each node extracts and propagates service configuration information directly to its peers through established communication channels, removing the burden of comprehensive information distribution from the API Server while ensuring all nodes receive complete service configuration data through the distributed propagation process.
Solution Approach 2:
The patent enables nodes to serve themselves and their peers by autonomously acquiring and propagating service configuration information. Each node independently retrieves service configuration information and actively distributes it to other nodes through peer-to-peer communication, making the network self-sufficient in information distribution and eliminating the need for continuous centralized pushing from the API Server.
Data Source
AI summary
A load balancing method based on a containerized microservice architecture, a storage medium and an electronic device are provided. The load balancing method includes: intercepting a first message initiated by a source container of a client that accesses a destination service in a microservice cluster, encapsulating the first message using a tunnel, and then sending the first message to a centralized load balancing component; distributing the first message to a destination container of the destination service such that the destination container generates a first response message for the first message; and receiving the first response message, and generating a first connection tracking record of a communication between the source container and the destination container based on the first response message.


