Arbitrate Redundant Multicast Feeds and Recover Sequence Gaps
Last updated: November 29, 2026
Quick Overview
An exchange publishes the same sequenced market data on two UDP multicast lines, A and B. Design and implement the component that merges them into one in-order, duplicate-free stream and requests retransmission when a gap is not filled by either line within a timeout.
Hudson River Trading
November 29, 20260
0
0 solved
An exchange publishes the same sequenced market data on two UDP multicast lines, A and B. Design and implement the component that merges them into one in-order, duplicate-free stream and requests retransmission when a gap is not filled by either line within a timeout.
Hudson River Trading trades on many exchanges whose feeds use sequenced UDP multicast with redundant lines, and a mishandled gap leaves the order book wrong while strategies keep quoting against it. This onsite question checks networking basics (why UDP, why two lines, what loss looks like) together with careful state-machine code and judgment about latency versus correctness.
What the Interviewer Expects
- Explain why exchanges use UDP multicast and why packets can be lost, duplicated, or reordered
- Deliver messages strictly in sequence order and drop duplicates from the second line
- Buffer out-of-order messages and wait briefly for the other line before requesting recovery
- Bound the buffer and the wait so a long outage escalates instead of stalling or using unbounded memory
- Describe what downstream consumers should do while a gap is open (mark the book stale, stop quoting)
Key Topics to Cover
How to Approach This
- Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
- Choose data structures based on access patterns, not familiarity.
- Prefer immutable data and message passing over shared mutable state for concurrency.
- Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
- How would you pick the gap timeout, and should it differ by exchange?
- What do you do if the retransmit server is down or the gap is too large to replay?
- How would you handle a sequence reset at session start or after a failover?
- How would you test this component without a live exchange connection?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Each packet carries a starting sequence number and a batch of messages. Output: every message exactly once, in sequence order, as early as possible. If a gap stays open past a timeout (for example a f...
High-Level Design
UDP multicast lets the exchange send one packet to every subscriber with no per-client state, but there are no retransmits, so loss happens under microbursts or NIC buffer overflow. Two lines on separ...