Jump to content
Sign in to follow this  
w2md

Inherent latency on Lightstreamer price feed

Recommended Posts

I noticed what appears to be an unavoidable latency on the Lightstreamer price feeds, and would like to confirm whether or not this is actually the case.

When running on a machine with good network connectivity, that is ~17ms from the CIAPI streaming servers, as measured by examining the TCP/IP stack’s RTT statistics with TCP keep-alive enabled and the timer set to 1sec, the following plot was recorded:

x9kK2.png

         Min.         1st Qu.          Median            Mean         3rd Qu.
  -2.480983734   124.401330950   199.357509610   319.881618950   287.830829620
          Max.
32144.682884000

Latency here is measured by subtracting the (NTP synchronized) current time on the machine with the ‘TickDate’ field from Lightstreamer.

I am wondering if this is a feature of your Lightstreamer configuration, since as can be seen, occasionally the problem does not manifest (perhaps corresponding to periods of many price changes causing some buffer to be flushed).

In general variance seems to be surprisingly high, sometimes more than 2 seconds (0.4% of samples) and 5 seconds (0.2% of samples). The end result would be an increased order failure rate, as the AuditId from this stream is required to trade successfully.

Is it possible that the machine(s) generating TickDate field have out of sync clocks? I note one tick with a negative(!) latency, suggesting this is at least partially true. (I verified my local NTP status prior to recording the trace).

Edit: just worth noting the 32 second latency may be due to a bug in my client’s reconnect code, so not too worried about that for now.

Share this post


Link to post
Guest andreif

Are you completely sure your local time is synchronized well? It’s better to check how big are NTP time adjustments (in the NTP statistics section)
PS are you testing against preprod or live server?

Share this post


Link to post

Are you completely sure your local time is synchronized well? It’s better to check how big are NTP time adjustments (in the NTP statistics section)

PS are you testing against preprod or live server?

Hi andreif, sorry for the delay. The machine I ran the test from has been down for most of the week, so I can’t re-run just now. Will update shortly.

Share this post


Link to post
Guest mrdavidlaing

Are you completely sure your local time is synchronized well? It’s better to check how big are NTP time adjustments (in the NTP statistics section)

PS are you testing against preprod or live server?

@w2md – We’re actively working on measuring our external latency; but one of the stumbling blocks is that synchronising the clock on the measuring end (especially if the client is running Windows) is very difficult.

Would you be willing to share your measurement code with us; or possibly run our measuring software on your server and report some data back to us?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×