RTC Forums
November 23, 2024, 04:31:16 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: WebSocket Routing and Balancing  (Read 5213 times)
usernametaken
RTC Expired
*
Posts: 6


« on: March 03, 2018, 08:27:50 AM »

When I search for WebSocket Routing/Balancing I only get an OLD response that WebSockets are not Supported.

WebSockets are now supported - ... Smiley

Is it now possible to Root and/or Loadbalance WebSockets?
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: March 03, 2018, 02:49:17 PM »

I have tested basic WebSockets routing functionality, but I recommend you to run your own tests and report if you bump into any problems. It other words, it should be working but since WebSockets are fairly new, there weren't many tests done using WebSockets and Data Routing / Load Balancing components.
Logged
usernametaken
RTC Expired
*
Posts: 6


« Reply #2 on: March 05, 2018, 06:18:48 AM »

If I understand WS correctly - It is based on a TCP socket.

So if I upgrade the HTTP to a WS then it creates a persistent TCP socket on the receiving/processing server and connects directly to the client using a WS(TCP socket)
So if normal routing/load balancing works... then the WEBSockets should also work.

Of course ... because the WS connection stays open/connected; individual messages after connection cannot be rooted/balanced to a different server.

Am I correct in my understanding?
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: March 05, 2018, 07:21:39 AM »

WebSockets are a protocol extension for HTTP. It's not just TCP/IP data being sent and received. After the initial WebSocket upgrade handshake (which is done over HTTP), even though TRtcDataRouter and TRtcLoadBalancer components treat the rest of the data as "raw TCP/IP packets" (there will be no events triggered for WebSocket packet after the upgrade), TRtcHttpClient and TRtcHttpServer components (which are used by TRtcDataRouter and TRtcLoadBalancer components) need to continue checking that data being received actually follows WebSocket protocol rules (frame headers and formatting) and would stop processing packets if these protocol rules were NOT being followed.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.024 seconds with 17 queries.