2
votes

I heard when TCP packet gets lost, everything gets stuck because of congestion until lost packet eventually gets received. e.g. server sends these packets on the same port:

1(UDP), 2(UDP), 3(TCP), 4(UDP), 5(UDP), 6(UDP)

so if packet 3 gets lost, client won't be able to receive 4, 5, 6, until packet 3 gets received, right?

If application uses two ports, one for TCP and other one for UDP, would TCP congestion affect UDP port performance? I mean would UDP packets get stuck?

1
Where on earth did you hear this rubbish? - user207421
Just think about it: how would a server ever function properly if every client had to wait when a single connection had lost packets. - Sami Kuhmonen
okay, maybe client doesn't wait, but it puts other received packets in the queue list, right? End result is still the same. gafferongames.com/networking-for-game-programmers/udp-vs-tcp How TCP implements reliability - Gintas_

1 Answers

3
votes

TCP congestion should only affect the current connection (socket).

In short, for each connection there is a TCP sliding window which is used to assemble the packets. If one packet gets lost, other packets on te same connection will be received and placed in the window, unless the the window is full.

https://technet.microsoft.com/cc162519.fig02_L.gif

So this should not affect other connections.

See TCP window scale option, Congestion window and TCP Receive Window Auto-Tuning.