In: Computer Science
Web Technologies IT230
Please Use your own words . sorry No handwriting.
Users prefer to stream high quality videos (e.g., watch YouTube) without lagging (i.e., slow loading). In this context, explain how UDP is better than TCP when streaming videos? thank you
UDP is better than TCP when streaming videos because UDP is lightweight because of the following reasons:
i) Connection-less
ii) No Acknowledgement Required (Packets can be lost in transit)
iii) Basic error checking as compare to extensive-error checking and flow control in TCP.
Now Since we are transferring the video files, So we can afford to lose some frames of the video. There will be some glitches while watching the video but acceptable as compared to the wait for retransmission of the same frame if video transfer on TCP.
So, in cases where we can afford to lose packets like if we want to know the time from server, and the reply from the server lost, so instead of re-transmitting the packet, the client can request the time again as new time will be different from old-time(no dependency between packets).
The case is similar in videos also, we can afford to lose some frames rather than waiting for retransmission of the same frame.