Server Affinity Load Balancing for Socket Overhead Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current clustered systems do not effectively manage a large number of external client connections, leading to increased socket maintenance and instability, as method calls are load balanced among server instances without considering existing connections.
Innovation Solution
Implementing server affinity algorithms that cause method calls to 'stick' to existing connections, reducing the number of sockets opened between external clients and server instances by prioritizing existing connections for service access and failover, while maintaining load balancing for server-to-server connections.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If traditional load balancing is used to distribute method calls among server instances, then resource utilization is improved, but socket maintenance complexity and system instability increase due to the large number of external client connections
Solution Approach 1:
The patent segments the connection management by introducing a client proxy that handles external client connections separately from server instances. The proxy maintains sockets with clients while server instances process method calls, dividing the complex socket management task into manageable segments and reducing overall system complexity
Solution Approach 2:
The client proxy acts as an intermediary between external clients and server instances. It receives method calls from clients, selects appropriate server instances using affinity algorithms, and forwards calls while maintaining the connection. This intermediary handles socket maintenance centrally, reducing the burden on individual server instances and improving overall manageability
2Productivity
If method calls are load balanced among server instances without considering existing connections, then load distribution is improved, but connection stability deteriorates due to frequent connection changes
Solution Approach 1:
The system performs preliminary action by establishing affinity relationships between clients and server instances before method calls are made. The client proxy selects a server instance for a client and maintains this association, so subsequent method calls from the same client are directed to the same server without requiring new connection establishment
Solution Approach 2:
The patent changes the load balancing parameter from purely random or round-robin distribution to affinity-based distribution that considers existing connections. By modifying the selection algorithm to prioritize existing affinity relationships, the system maintains connection stability while still achieving load distribution across multiple server instances
3Device complexity
If the number of sockets between external clients and server instances is reduced through server affinity, then socket maintenance complexity is improved, but adaptability to different client-server pairing scenarios worsens
Solution Approach 1:
The affinity system is dynamic rather than static. The client proxy can adjust affinity relationships based on server availability, load conditions, and failover scenarios. When a preferred server instance becomes unavailable, the system dynamically creates new affinity relationships with alternative servers, maintaining both connection stability and adaptability
Solution Approach 2:
The client proxy serves multiple functions: it maintains external client connections, implements affinity algorithms, performs load balancing, and handles failover. This universal component manages all client-server pairing logic centrally, reducing the need for multiple specialized connections while maintaining flexibility across different scenarios
Data Source
AI summary
A system and method for server load balancing that includes server affinity. The system can be incorporated into application servers to support load balancing algorithms for RMI objects that provide server affinity. Server affinity uses smart load balancing for external client connections in such a way that it uses preexisting connection and reduces overhead: the client considers its existing connections to the application server instances when choosing the server instance on which to access a service. If a service is configured for server affinity, the client-side stub attempts to choose a server instance to which it is already connected, and continues to use the same server instance for method calls. All stubs on that client will attempt to use that server instance. If the server instance becomes unavailable, the stubs fail over, if possible, to a server instance to which the client is already connected.


