Load Balancing Server Hashing Map Switching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional load balancing systems in server farms face challenges such as high computational costs for maintaining in-memory data structures, potential race conditions, and failure to direct messages correctly after server failures, leading to inefficiencies and lost messages.
Innovation Solution
Implementing a load balancing system that switches between hashing and map-based functions to efficiently direct messages, using hashing for initial message routing and switching to a map-based function when server availability changes, ensuring accurate routing even during server failures.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If in-memory map is used for message routing, then message routing accuracy is improved, but computational overhead increases
Solution Approach 1:
The patent segments the message routing process into two distinct phases: initial routing using hashing algorithm, and subsequent routing using in-memory map. This segmentation allows the system to use the computationally efficient hashing method for the first message of each request, and only use the more resource-intensive in-memory map for tracking subsequent messages, thereby reducing overall computational overhead while maintaining routing accuracy.
Solution Approach 2:
The patent applies preliminary action by using hashing algorithm to initially assign messages to servers before the in-memory map is fully populated. This preliminary routing mechanism ensures that messages can be directed to appropriate servers even before the complete message history is available in memory, reducing the computational burden on the in-memory map while maintaining routing accuracy.
2Measurement precision
If in-memory map is used for message routing, then message routing accuracy is improved, but system reliability deteriorates due to race conditions
Solution Approach 1:
The patent segments the routing system into two independent components: hashing-based initial routing and map-based subsequent routing. The hashing component operates independently without race conditions, while the map component handles only the necessary tracking information. This segmentation isolates the race condition risks to specific operations, improving overall system reliability while maintaining routing accuracy.
Solution Approach 2:
The patent introduces hashing algorithm as an intermediary mechanism between the incoming messages and the in-memory map. Instead of directly accessing the map for every message, the system uses hashing to determine initial server assignment, which then serves as a mediator to reduce direct map access and minimize race conditions between multiple load balancing components.
3Use of energy by moving object
If hashing algorithm is used for message routing, then computational overhead is reduced, but adaptability to server changes deteriorates
Solution Approach 1:
The patent implements a dynamic routing system that switches between hashing algorithm and in-memory map based on operational context. During normal operation with stable server configurations, the system uses the computationally efficient hashing algorithm. When server changes occur, the system dynamically transitions to using the in-memory map to track and adapt to the new configuration, ensuring both computational efficiency and adaptability.
Solution Approach 2:
The patent changes the routing parameter from pure hashing to map-based routing when server availability changes are detected. This parameter change allows the system to adapt to dynamic server configurations by switching to a more flexible routing mechanism that can accommodate added or removed servers, while maintaining low computational overhead during stable periods.
4Productivity
If conventional load balancing is used, then initial message routing is efficient, but message loss occurs during server failures
Solution Approach 1:
The patent applies preliminary action by using hashing algorithm to establish initial server assignments before failures occur. This preliminary routing information is preserved and can be used to quickly redirect messages after server failures, preventing message loss without requiring complete re-routing. The in-memory map also preliminarily tracks which servers are currently available, enabling rapid adaptation to failures.
Solution Approach 2:
The patent implements feedback mechanisms where the in-memory map continuously monitors server availability and updates routing decisions based on current server status. When server failures are detected, the system receives feedback about unavailable servers and automatically adjusts message routing to use only available servers, preventing message loss while maintaining the efficiency benefits of hashing-based initial routing.
Data Source
AI summary
A system for efficiently distributing messages to a server farm uses a hashing function and a map-based function, or combinations thereof, to distribute messages associated with a processing request. In one implementation, for example, the hashing function has inputs of an identifier for each message in a processing request, and a list of available servers. Upon identifying that any of the servers is unavailable, or will soon be unavailable, the load balancing server uses an alternate map-based assignment function for new requests, and inputs each assignment into a server map. The load balancing server can then use the map or the hashing function, as appropriate, to direct messages to an operating server. Upon receiving an updated list of available servers, the load balancing server can switch back to the hashing function after the map is depleted, and use the updated server list as an argument.


