Dragoon Eternal
Dragoon Eternal

Reputation: 11

Debug high latency in the push flow which is using WAMP Router being used for the WEB Socket Connection

We are using the WEB Socket connection to push messages to our Front end Browser. Following is the architecture:

Backend Service A is the backend service that uses WAMP RPC WEB socket invocation to push the message to the Browser via a Proxy P1 which receives the message from the Service A and forwards it to the browser via the WEB Socket connection. Proxy takes some extra responsibilities like authentication and plays a role in all the communication between the browser and the back service A.

We are observing high Latency issues during the initial web socket connection itself via the proxy and latencies are going as high as 8-12 seconds. (p99 average)

We seek help to debug the issue.

We have already checked if Backend Service A which created the WAMP Router is sufficiently provisioned and a similar check was also made for the Proxy Layer in terms of over CPU, memory, connections.

Backend Service A is using https://github.com/gammazero/nexus

Proxy is written in node.js and in the following way websocket is being initialized:

new WebSocket(
      `<URL>`,
      'wamp.2.json',
      {
        origin: 'http://localhost',
        headers: {
          'Sec-Websocket-Protocol': ['wamp.2.json', 'wamp.2.msgpack']
        }
      }
    )

wamp.2 dictates to use wamp for the web socket connection.

We did not find any configuration to explicitly specify the number of wamp connections etc anywhere in the backend service A and in the proxy layer. Kindly help with how can we debug the high latency issue. One of the possible root cause which we found till now is related bad browser internet connection, however, this should not translate to 8-12 seconds of p99 avg latency.

Upvotes: 1

Views: 108

Answers (0)

Related Questions