Client latency/response time

shaunvdberg
shaunvdberg Member Posts: 14 ✭✭

Hi

We are using Solace to push market data to client applications via direct messaging.

I have noticed that some clients struggle to consume data at the same rate due to connectivity issues. When network dips occur or when you reach a wifi 'dead zone' some client fall behind on market data.

In order to alleviate the load, we implemented eliding on Solace. This does work, but still seeing some clients struggling to keep up due to connectivity.

I was thinking of potentially monitoring latency on the client . Does the broker have per connection data around this? If so, I would like to pull this data & disable the client when this happens...

Any thoughts welcome.

Thanks

Shaun

Answers

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 959 admin

    Hi @shaunvdberg,

    If you take a look in PubSub+ Manager you'll find a "Smoothed Round Trip Time (ns)" metrics as well as a "Uptime (sec)" on the `Connection`, but I think that is the closest thing we have to what you're looking for. I believe that first stat might give you what you're looking for. It won't know how long it takes your app to process messages, but at least it gives you a good idea of network performance.

    If you look under "stats" on the client you'll also find a whole bunch of info depending on the protocol being used. But these stats would include things like message discards and bind requests.

    Hope that helps!

  • shaunvdberg
    shaunvdberg Member Posts: 14 ✭✭

    Thanks @marc

    That "Smoothed Round Trip Time (ns)" metric sounds very interesting. I assume this is something I am able to gather using the solclient? I will dig into this further...

    Also, I also decided to build an end-to-end latency monitoring tool. Basically a ping pong. Some server job will fire of messages periodically & the clients will respond as soon as possible, passing their identity. The server app can then determine roundtrip or end-to-end time - ie. dont have to worry about time sync issues etc.

    Thanks again @marc - these metrics will allow me to make decisions on the ui/client. When the app drifts or struggle to keep up during network dips etc, I can always disable certain features until it recovers.

    Any other suggestions are most welcome.

    Thanks

    Shaun

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 538 admin

    Hey @shaunvdberg, the RTT logic to determine what server to connect to is used quite often for different use-cases. When you mentioned wanting to build an e2e latency monitoring tool it reminded me of this video by @Aaron https://www.youtube.com/watch?v=AZDP8DbyfmE where he talks about round trip time to choose the nearest broker to connect to. Tho it's not that related to your original question, but its a cool demo :)

    Also, Aaron had his regular office hours and talked about this post as well you can check it out here https://www.youtube.com/watch?v=zKR6LKvWGHI

  • shaunvdberg
    shaunvdberg Member Posts: 14 ✭✭

    Thanks for that feedback @Tamimi

    Interesting, my e2e only measure RTT on one message, but see @Aaron doing 10 at a time - this might give a more accurate RTT over time.

    Also, thanks for covering this topic in the office hours chat guys.