The Network Path to a Feed Handler

The systems fundamentals round asks about TCP, UDP and multicast, and a trading system uses all three in one place: the feed handler that turns exchange packets into an order book, and the gateway that sends orders back. This lesson follows a packet along that path and names the places where it can be delayed or lost.

Two protocols, two jobs

TCP
DeliveryGuaranteed, with retransmission
OrderPreserved
After a lost packetEvery later byte waits for the retransmission
Receivers per sendOne connection
Used forOrder entry and drop copies
UDP multicast
DeliveryNot guaranteed
OrderNot preserved
After a lost packetOnly that packet is gone
Receivers per sendEvery host that joined the group
Used forMarket data

A trading system needs both: every order must arrive exactly once, and a late price is worth less than the next one.

TCP's guarantee has a cost that matters on a feed. When one segment is lost, the receiver cannot hand any later bytes to the application until the retransmission arrives. That is head-of-line blocking, and during a busy open it would hold the whole feed behind one lost packet. UDP multicast avoids it and scales with subscribers: the exchange sends each packet once to a group address, and every host that has joined the group receives it.

The rest of this lesson is for subscribers

Unlock every lesson in Systems Programming for Trading, and every other premium course.

Subscribe to continue

Test your knowledge

Questions are only available to subscribers.

Keep reading Systems Programming for Trading

27 lessons in this course, and every other premium course, on one subscription.

  • Every lesson in every course, with the worked examples and interactive simulators
  • Graded questions on every lesson, with explanations for the wrong answers as well as the right one
  • The trainers, timed assessments and brainteaser library that go with them