Questions / Quant development, Networking & latency
A UDP sequence gap
A UDP feed delivers sequences 101, 103, 104 and 107. How many sequence numbers between 101 and 107 are missing?
Answer it in the app It's free. You get hints, a second try if you miss, and a follow-up question.
Show the answer and worked solution
Answer: 3 messages
- The expected run is 101 through 107.
- 102, 105 and 106 never arrived.
- Three gaps must go through the recovery protocol.
Interview shortcut. Missing 102, 105, 106.
Takeaway. A sequence gap means unknown state until recovered.
In the app this has a follow-up where one thing about the setup changes. Try the follow-up.