where does most of the latency hide when trading off social media posts
Trying to work out where my delay really is on x based signals and my numbers keep disagreeing with each other. For a while i only logged one timestamp, when the message hit my box, and it turns out that tells you almost nothing.
Now i log three, publish time, receive time and order out time. The publish time for x comes from the tweet id, so i don't need a separate lookup for it. First batch was useless though because my clock had drifted about 200ms, so ntp runs all the time now. I also had a feed from 1322io in the mix while testing, and a few posts showed up twice because of edits and reposts, so i dedupe on post id now. That cleaned up a lot of fake signals.
Still not sure my setup is right. I report p50, p90 and p99 instead of averages, but the tail is still noisy and i can't tell if it's the network, my own code or the exchange side.
What do you log beyond those three timestamps? And do you correct for clock offset separately or just trust ntp?