User Space Checkpoint Restore for Network Socket Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Servers managing a large number of long-lived connections face performance issues due to resource consumption and slow search times in hash tables, especially when inactive connections are maintained, leading to CPU overload and potential client disconnection issues.
Innovation Solution
Implementing a system that suspends inactive network sockets by maintaining their state in a socket image file, allowing them to be restored when necessary, without removing them from the hash table, using a filter to monitor incoming packets and reactivate sockets based on connection behavior or resource availability, thus maintaining client connectivity and reducing CPU load.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the server maintains all sockets in the hash table to ensure client connectivity, then client connection reliability is improved, but the hash table size increases and search performance deteriorates
Solution Approach 1:
The patent segments sockets into two categories: active sockets remaining in the hash table and suspended sockets moved to external storage. This segmentation allows the hash table to contain only actively communicating sockets, maintaining fast search performance while ensuring suspended sockets can be restored when clients reconnect.
Solution Approach 2:
The patent extracts suspended sockets from the hash table structure and stores them externally using checkpoint restore technology. This extraction removes inactive sockets from the critical path of packet processing, improving hash table search speed while preserving the ability to restore connections when needed.
2Productivity
If the server removes inactive sockets from the hash table to reduce CPU load, then processing speed is improved, but client connectivity may be lost
Solution Approach 1:
The patent performs preliminary actions by saving the state of sockets to external storage before removing them from the hash table. This preliminary checkpointing ensures that if a client reconnects, the server can restore the socket state and maintain connectivity, eliminating the risk associated with simply dropping inactive sockets.
Solution Approach 2:
The patent introduces an intermediary checkpoint restore mechanism that mediates between removing sockets to improve performance and maintaining sockets to ensure connectivity. This intermediary layer allows the server to remove sockets from the hash table for performance while providing a restoration path to maintain reliability.
3Adaptability or versatility
If the server maintains a large number of long-lived connections, then service coverage is improved, but resource consumption increases
Solution Approach 1:
The patent changes the state parameter of sockets from active to suspended, allowing the system to maintain support for a large number of long-lived connections while reducing resource consumption. Suspended sockets consume minimal memory while remaining restorable, enabling the server to support more connections than would be possible with fully active sockets.
Data Source
AI summary
A computer-implemented system for network socket management includes a host having a plurality of sockets and a hash table (data structure) storing data on network connections corresponding to the sockets; a firewall with a plurality of rules for routing incoming packets to the sockets; a socket image file that stores a state of each suspended socket. A network connection corresponding to the suspended socket is maintained open. A filter that monitors incoming packets and restores suspended sockets to active status when a packet for the suspended socket is received. The filter is implemented as part of the firewall, or as a hardware front end. The sockets, the firewall and the socket image file are all maintained in user space.


