WebSocket Relay Across Firewalls for On-Premises Messaging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The challenge of establishing a WebSocket connection between an off-premises and an on-premises compute node is hindered by firewalls and web proxy servers that prevent the off-premises node from initiating a connection, limiting communication between these environments.
Innovation Solution
The on-premises WebSocket application initiates the establishment of a WebSocket connection with the off-premises WebSocket application, allowing the on-premises WebSocket application to receive and forward application layer messages encapsulating transport layer segments, and vice versa, despite the firewall restrictions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If the off-premises compute node initiates a connection to the on-premises compute node, then communication between environments is enabled, but the firewall and web proxy server block the connection
Solution Approach 1:
Instead of having the off-premises compute node initiate the WebSocket connection to the on-premises node (which is blocked by firewalls), the solution inverts the connection direction: the on-premises WebSocket application initiates the connection to the off-premises node. This allows the off-premises application to send messages back through the established connection, effectively enabling bidirectional communication while bypassing the firewall restriction on incoming connections.
2Object-affected harmful factors
If the on-premises environment is heavily protected with firewalls and web proxy servers, then security is improved, but communication from external nodes is prevented
Solution Approach 1:
The WebSocket connection acts as an intermediary mechanism that operates within the constraints of the firewall and web proxy server. By using WebSocket protocol (which typically operates on port 443 as HTTPS traffic), the solution finds a communication path through the security infrastructure without compromising the protective measures. The on-premises node initiates the connection through the allowed channels, and the WebSocket protocol enables full-duplex communication while maintaining security boundaries.
3Device complexity
If traditional client-server communication is used, then simple point-to-point communication is achieved, but multiple client interactions require multiple connections
Solution Approach 1:
The WebSocket connection established between the on-premises and off-premises applications serves as a universal communication channel that can handle multiple client-server interactions simultaneously. Instead of creating separate connections for each client, the WebSocket connection acts as a multiplexed channel where multiple clients can send messages through the same connection, reducing connection management complexity and improving communication efficiency.
Data Source
AI summary
A method includes establishing a WebSocket connection between an on-premises WebSocket application hosted on a first on-premises compute node and an off-premises WebSocket application hosted on a first off-premises compute node, wherein the first on-premises compute node is in an on-premises network having a firewall that prevents the first off-premises compute node from initiating a connection with the first on-premises compute node, and wherein the on-premises WebSocket application hosted on the first on-premises compute node initiates the establishing of the WebSocket connection with the off-premises WebSocket application hosted on the first off-premises compute node. The method further includes sending a message from a client application hosted on a second off-premises compute node to a server application hosted on a second on-premises compute node through the WebSocket connection, wherein the second off-premises compute node initiates the sending of the message to the second on-premises compute node.


