Distributed Load Balancer Flow Affinity via Consistent Hashing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed computing environments, maintaining flow affinity across stateful and stateless network functions is challenging, especially during failures, additions, and elastic scaling of load balancer and network function nodes, which disrupts data flow and requires inefficient centralized flow tables.
Innovation Solution
A high-performance system that integrates packet forwarding with replication to efficiently replicate connection entries across nodes, using a consistent hashing ring and a synchronization protocol to ensure connection affinity and tolerate node failures and reconfigurations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a centralized flow table is used to store all flow entries, then flow affinity can be maintained, but the system becomes inefficient and expensive in terms of resource usage
Solution Approach 1:
The centralized flow table is segmented into distributed flow tables across multiple load balancer nodes. Each node maintains a portion of the flow table locally, eliminating the need for a single centralized table while preserving flow affinity through distributed storage of flow entries.
Solution Approach 2:
Flow table entries are replicated across multiple nodes using consistent hashing. When a flow entry needs to be stored, it is copied to multiple load balancer nodes according to the consistent hash ring, ensuring availability and affinity without requiring a centralized table.
2Adaptability or versatility
If load balancer nodes are added or removed for elastic scaling, then system capacity increases, but flow affinity is disrupted
Solution Approach 1:
The system uses dynamic reconfiguration of the consistent hash ring to accommodate node additions and removals. When nodes are added or removed, the hash ring is dynamically updated, and flow entries are automatically reassigned to maintain flow affinity without disruption to active connections.
Solution Approach 2:
The system implements feedback mechanisms where load balancer nodes continuously report their status and flow table state. This enables the system to detect node failures or additions and automatically redistribute flow entries to maintain affinity, ensuring reliability during elastic scaling operations.
3Adaptability or versatility
If node chains are reconfigured during operation, then system flexibility improves, but entry consistency across nodes becomes inconsistent
Solution Approach 1:
Before reconfiguring node chains, the system performs preliminary actions by preparing the new configuration and validating consistency. Flow entries are pre-synchronized to the new node arrangement, ensuring that when reconfiguration occurs, entry consistency is maintained without interruption to packet processing.
Solution Approach 2:
The system replaces mechanical synchronization protocols with a more efficient distributed consensus mechanism. Instead of traditional locking and manual synchronization, the system uses asynchronous consistency protocols that automatically ensure entry consistency across reconfigured node chains without blocking operations.
Data Source
AI summary
A system can include a gateway, a plurality of network function nodes, and a distributed load balancer including load balancer nodes each having a flow table portion stored thereon. The load balancer nodes can form a node chain having a tail and head nodes. A load balancer node can receive a packet from the gateway. In response, the load balancer node can generate a query, directed to the tail node, that identifies the packet and a network function identifier associated with a network function node that is proposed to handle a connection. The tail node can determine whether an entry for the connection exists in a flow table portion associated with the tail node. If not, the tail node can initiate an insert request for writing the entry for the connection via the head node. The entry can then be written to all load balancer nodes in the node chain.


