cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How Thingworx Connection Sever connect with Platform on Web Socket

Regular Member

How Thingworx Connection Sever connect with Platform on Web Socket

 

We have connected around 20000 device with connection server we can see number of connections on connection server ( using netstat) but we cannot see same amount of connection on Platform.

 

How we can check this same on platform specially on WSS ( Web Socket) 

 

Look like we can see multiple thread on connection server (Based on connected agents) but this is transferring data on platform in single thread?

 

Please suggest

9 REPLIES 9

Re: How Thingworx Connection Sever connect with Platform on Web Socket

That sounds like everything is working as designed, what problems are you seeing?

 

The Connection Server offloads work from the platform server by acting as a multiplexer for edge devices. It handles many connections to edge devices then sends and receives the messages for the edge devices with one connection to the platform.

Re: How Thingworx Connection Sever connect with Platform on Web Socket

Thanks. Appreciate your quick response.
I have couple of more questions.

1. Does this connection goes through tomcat on platform or directly to postgres database. Because I cannot see any connection on tomcat console.

2. Can we detect this connection on platform server?

3. If this queue to platform then this will certainly decrease speed of overall server.

Thanks in advance.

Re: How Thingworx Connection Sever connect with Platform on Web Socket

  1. The connections are through tomcat, not directly to the storage layer.
  2. Yes, you should see the connections via netstat, same as on the connection-server.
    Local address will by tomcat port (8080 in my case):
    tcp        0      0 172.72.0.2:8080         172.72.0.3:33180        ESTABLISHED
    tcp        0      0 172.72.0.2:8080         172.72.0.3:33182        ESTABLISHED
    tcp        0      0 172.72.0.2:8080         172.72.0.3:33176        ESTABLISHED
    tcp        0      0 172.72.0.2:8080         172.72.0.3:33174        ESTABLISHED
    tcp        0      0 172.72.0.2:8080         172.72.0.3:33184        ESTABLISHED
  3. The messages arriving from the 20K devices are not queued.  The protocol can handle multiple concurrent requests without any head-of-line blocking issues, as would be the case with HTTP.

Re: How Thingworx Connection Sever connect with Platform on Web Socket

Sorry I am just trying to understand. You mean to say if we see 20000 connections in connection server same 20000 should be visible to platform. Or it handle through some other way ? Do thingworx have some write up on this.
Highlighted

Re: How Thingworx Connection Sever connect with Platform on Web Socket

Sorry one more question.
If connection is through tomcat why it is not visible in tomcat console. I think tomcat console does not recognise this connection .

Re: How Thingworx Connection Sever connect with Platform on Web Socket

The connection-server offloads connection management from the platform.  The connection-server itself will maintain a small number of connections (5, by default) to the platform.  All messages arriving on the 20K devices are sent over those five connections to the platform.

 

As mentioned previously, the protocol does not have any head-of-line blocking which would require queuing of the incoming messages at the connection-server.

Re: How Thingworx Connection Sever connect with Platform on Web Socket

I'm not sure what the "tomcat console" is.  The connections are standard websocket connections, but there will only be a small number (5) of them from each connection-server.  Does the tomcat console handle websocket, or only HTTP?

Re: How Thingworx Connection Sever connect with Platform on Web Socket

Wow this I want to know that we allow 5 connection to platform. Do you know that this is control by below configuration in cxserver.conf.

 

connections.pipe-count = 5

 

Re: How Thingworx Connection Sever connect with Platform on Web Socket

Yes, that's the configuration entry; it's unlikely that you need to change that value, however.  Unless the volume of messages is large enough to saturate those five TCP connections, increasing the value won't provide any benefit.