Gateway Switching TCP UDP for WebSocket Server Load
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
WebSocket servers face challenges in maintaining low-delay communication while managing a large number of connections, leading to increased server operation costs and potential delays due to the need for periodic polling methods.
Innovation Solution
A communication device with a first and second connection maintaining unit, and a switch instructing unit that dynamically switches between TCP and UDP communication methods based on predetermined conditions to optimize connection management and reduce server load.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a WebSocket server maintains a large number of connections to support multiple terminal devices, then the communication coverage and service capability are improved, but the server operation cost increases due to the need to secure connection information and transmission-reception buffers for each connection
Solution Approach 1:
The patent merges multiple WebSocket connections from different terminal devices into a single server connection by introducing a gateway device. Multiple terminal devices communicate through the gateway, which maintains one connection to the server, thereby consolidating resource usage and reducing the total number of connections the server must maintain.
Solution Approach 2:
The gateway device serves as an intermediary between terminal devices and the WebSocket server. It establishes a single connection to the server on behalf of multiple terminal devices, acting as a mediator that reduces the connection burden on the server while maintaining communication capabilities for multiple devices.
2Quantity of substance
If terminal devices use periodic polling to maintain communicable state with the server, then the number of server connections is reduced, but communication delay increases compared to WebSocket connection maintenance
Solution Approach 1:
The patent combines the benefits of both approaches by having the gateway maintain persistent WebSocket connections to the server while terminal devices communicate through the gateway. This merging allows the server to maintain fewer connections while still achieving low-delay communication for all terminal devices through the gateway's relay functionality.
3Loss of time
If two terminal devices establish direct connection for two-way communication through the same WebSocket server, then communication delay is minimized, but the server must maintain separate connections for each device increasing operation cost
Solution Approach 1:
The gateway acts as an intermediary that enables direct-like communication between terminal devices without requiring the server to maintain separate connections for each device. The gateway relays messages between devices, achieving fast communication while the server only needs to maintain one connection to the gateway.
Data Source
AI summary
According to an embodiment, a communication device performs communication with a terminal device via a network and includes first and second connection maintaining units and a switch instructing unit. The first connection maintaining unit maintains a connection established with the terminal device and mediates communication between the terminal device and another terminal device. The second connection maintaining unit maintains a communicable state of the terminal device with the communication device according to a method different from a method implemented by the first connection maintaining unit. When a predetermined switching condition is satisfied, the switch instructing unit instructs the terminal device to switch a method for maintaining a communicable state either from a first method, which is a method implemented by the first connection maintaining unit, to a second method, which is a method implemented by the second connection maintaining unit, or from the second method to the first method.


