Underlying protocol - UDP versus TCP

Imported from previous forum

The scope of HFTWG states “Underlying protocols - don’t assume IP but state nature of service required”.

UDP is unreliable and faster, TCP/IP is reliable and slower

If TCP is used for HFT, then HFT Session only needs to represent Trading workflows / semantics because reliablity is already provided.

If UDP is used for HFT, then HFT Session needs to provide both -reliability and Trading workflows / semantics. In providing both reliability and semantics in single layer of HFT Session, better performance can be achieved than by having two layers of TCP + HFT Session.

Coding effort of HFT Session on UDP would be more than HFT Session on TCP.

The reliability of TCP is over-rated from an application standpoint. TCP is only reliable in the sense that anything that is delivered within a TCP (transport) session is guranteed to be complete, non-duplicated, and in sequence. This is not enough from a transaction point of view. The FIX session protocol is used to complement the transport protocol. Please refer to the discussion in:
http://fixprotocol.org/discuss/read/04cfcef5

On a side-note: the relative performance of TCP and UDP is highly implementation dependent. There are however other issues such as resource utilization (CPU, cache, memory etc) that need to be considered. The UDP protocol is more “light-weight” in comparison to the TCP protocol and that may provide better scalability in usage scenarios where 1000’s of application sessions are maintained in parallel, such as at the big exchanges.

/Rolf

The scope of HFTWG states “Underlying protocols - don’t assume IP but state nature of service required”.

UDP is unreliable and faster, TCP/IP is reliable and slower

If TCP is used for HFT, then HFT Session only needs to represent Trading workflows / semantics because reliablity is already provided.

If UDP is used for HFT, then HFT Session needs to provide both -reliability and Trading workflows / semantics. In providing both reliability and semantics in single layer of HFT Session, better performance can be achieved than by having two layers of TCP + HFT Session.

Coding effort of HFT Session on UDP would be more than HFT Session on TCP.