TD Feed latency
The latency endpoints return the current feed latency, which is the difference in time from when the message was sent to when we received it.
This data is available at both the top level (i.e. for all messages) and for each individual describer. These are the endpoints which provide this data:
- Top level
- http://api.area51.onl/rail/1/td/latency
- http://api.area51.onl/rail/1/td/latency/current
- http://api.area51.onl/rail/1/td/latency/history
- Train describer level where :area is the area ID:
- http://api.area51.onl/rail/1/td/:area/latency
- http://api.area51.onl/rail/1/td/:area/latency/current
- http://api.area51.onl/rail/1/td/:area/latency/history
The output of each set of endpoints is the same, just the scope of the underlying data is different. Each set of endpoints returns the following:
- latency
- returns both the current and up to the last 6 hours of historical data
- latency/current
- Returns just the current latency
- latency/history
- Returns up to the last 6 hours of historical data
The latency object returns the following:
- current
- The current latency
- history
- Up to the last 6 hours of history
- lastUpdate
- The time the last message was received
The latency/current endpoint and the current object returned by the latency endpoint returns the following:
- value
- The latency in ms of the last message
- max
- The maximum latency in this sample period
- min
- The minimum latency in this sample period
The history endpoint and the history object returned by the latency endpoint returns the last 6 hours of history in 5 minute segments.
- time
- The time of the most recent history entry
- history
- Array of 0..72 history entries with the most recent first
Each history entry consists of:
- time
- The time of this entry in ISO format
- timestamp
- The time of this entry in milliseconds since the UNIX epoch
- value
- The latency in ms of the last message
- max
- The maximum latency in this sample period
- min
- The minimum latency in this sample period
What is latency?
This time is measured in milliseconds but is only an estimate as multiple factors can affect this so this is only a guide figure but it's being made available as other users of the source TD feeds often ask if anyone is seeing various delays in the data.