TCP vs. UDP for Real-Time Data Transfer Oct 24, 2017 by Matt Cook in Best Practices, Changing the Way the World Communicates, Lifesize, Meeting Room, Technology, Tech Notes In our Video Conferencing Network Best Practices Guide, we outlined a few tips and considerations for optimizing your network topology to efficiently route video traffic without risking security or network reliability. To add to that conversation, we wanted to take a more detailed look at how the Lifesize service processes data transfers to make the most out your meeting experience. When it comes to TCP and UDP ports in particular, many of our customers ask about the uses and applicability of the published server addresses and why Lifesize uses TCP-based connections for some services but UDP or others. Rest assured, there’s a method to our madness. First, let’s consider how we transfer information in IP-based networks. Almost all network applications use one of two connection types, TCP (Transport Control Protocol) or UDP (User Datagram Protocol). TCP is what’s commonly known as an acknowledged mode protocol. This means that when data is being exchanged, a built-in feedback mechanism checks and acknowledges whether the data was received correctly. If any data is missing or lost, further mechanisms retransmit the corrupt or missing information. These mechanisms make TCP the perfect protocol for transferring information such as still images, data files (like spreadsheets and documents) and web pages (including graphics, text and the languages that interpret how things are meant to display). The reliability that the “acknowledgment” provides is what makes it perfect for these applications. This does come at a cost, however, as these control and feedback mechanisms result in a larger protocol overhead, which means that you use a larger percentage of the valuable bandwidth on your network connection for sending this additional control information. UDP is an unacknowledged mode protocol, meaning that there is no active mechanism to retransmit data that has been lost during the exchange. As such, you might think that UDP would be a bad way to send and receive data compared to TCP — and you’d be right if you were sending an email, viewing a webpage or downloading a file. However, other factors make UDP superior for real-time communications. With UDP being unacknowledged, there are fewer protocol overheads to take up valuable space that could be used for useful data, making transmission quicker and potentially more efficient. At Lifesize, we always strive to deliver 30 frames of video or more per second for excellent motion-handling during video calls. This image-refresh interval is so fast that you don’t have time to wait for data retransmissions. The same flow controls that make TCP more reliable than UDP are too slow to recover the missing data quickly enough to be useful in real-time video communications. Data integrity is important, but it needs to be balanced with speed to ensure that the fast pace of communication can continue unhindered. Lifesize employs strategies such as error concealment, error correction and rate controls to add greater robustness to real-time UDP media connections without the potential latency penalties of solely relying on TCP. Another potential shortcoming of TCP is that regular protocol flow-control acknowledgements (or ACKs) will occur during transmission regardless of whether the connection is 100% reliable or not. Poor-performing networks compound this problem because, for every negative acknowledgement (NACK) where a packet of data has been lost, the data retransmission adds more load to an already congested network. By avoiding the unnecessary overheads of TCP transport for real-time media, this problem is virtually eliminated. Using UDP is therefore both more efficient in terms of bandwidth and less demanding of poor-performing networks. The Lifesize web and desktop apps have been developed to prioritize UDP over TCP for media transport, while our Icon meeting room systems exclusively use UDP for real-time media. We always recommend that our customers enable access via UDP toward our cloud servers, as ultimately this can help achieve the best possible user experience. Check out our help file for opening network ports for more network configuration information.