My purpose is to use WebSockets with own TCP/IP or ISO/OSI stack. I want to load balance all requests from the client to the application servers (as we know WebSockets can work only with one server which has established a connection). I want to be able to connect to one node and send requests to any node.
The algorithm is the next:
1. Client establishes a connection with one of the node behind the load balancer.
2. Client sends data through the WebSocket to the load balancer.
3. Load balancer receives the data and sends it to any server.
4. Server sees the data and sends it to the application. Even if the connection hasn't been established the server doesn't drop packets it just sends the packets to the application.
In this situation we can load balance WebSockets requests easily. I tried to understand how to to rewrite TCP/IP stack and let packets go directly to the application in user space but I am confused.
Do we need to use DPDK for it? Is yes then can you show a minimum example how to receive and send packets directly or how to skip connection checking? If no then what do we need to use in this situation?