TCP vs UDP Crash Course

preview_player
Показать описание
TCP and UDP are communication protocols that allows us to send and receive data in a network. We have both for a reason since each has its advantages and disadvantages. In this video we will talk about two protocols, pros and cons of each one and will write tcp and udp server with nodejs showing you these in ACTION. We also talk about how reliable udp is used in gaming for intermitted network connection.

Code!

Jump Codes 🏷
0:00 Intro
04:12 TCP pros cons
19:00 Tcp demo (code)
24:25 UDP pros cons
31:25 UDP demo (code)
35:40 Summary

Explain TCP
Pros:
acknolwedgment,
garenteed delivery,
connection based
congestion control
ordered packets

Cons
Larger packets
More bandwidth since more headers.
Slower (because of retransmission)
stateful once connection is lost its lost, cannot resume it.

TCP Example (Code)
telnet 127.0.0.1 8080

Explain UDP
Pros
Statless,
Less bandwidth
smaller packets
Faster to transmit

Cons
no ack,
no garenteed delivery,
no congestion control
no ordered packets

UDP client
echo "foo" | nc -w1 -u 127.0.0.1 41234

Stay Awesome!
Hussein
Рекомендации по теме
Комментарии
Автор

You have taught me 2 semester worth of knowledge in a few hours !!! Thanks for your long videos...love your work

jeronlloyd
Автор

Nobody in the history of mankind has ever explained tcp and udp this perfect way. Thanks.

shahrukh
Автор

Great video as usual. 33:51 The reason you got 3 byte is because you piped "hi\n" and in the TCP example it was "hi\r\n" as it was sent by pressing enter in the terminal. 13 is the ascii number for carriage return \r and 10 is the ascii number for newline feed \n.

ssreejit
Автор

I am a software engineer (backend dev primarily) for almost 2 years now. kinda got interested in the DevOps field lately and these videos are a refresher. Very well explained and I hope that others will benefit from it too. Thank you so much Nasser for your time and effort into creating videos for the 'Backend Engineering' series

Maniac-
Автор

I highly appreciate that you go in-depth on these subjects. It really helps me to retain information when I have the full context behind it.

AbandonedVoid
Автор

Honestly dude, I have been looking more into your tutorials and this stuff is just amazing. Love how you keep it with minimal code while demonstrating understanding for the basic concepts. Genius...I AM A FAN OF YOURS NOW.

newtonsarr
Автор

Great video. This is the first time I have ever understood TCP and UDO properly. Beautifully explained.

kartheeque
Автор

"These exotic foreign hosts, man. They keep closing these connections, man!" 23:58 hahaha!

IzzatBinAfiff
Автор

Dude, I just wanna say thanks for the video, very informative and well structured. I'll admit, your accent can be a bit hard to follow at times but overall still coherent. looking forward to watching more of your content.

djsigmann
Автор

Loved the video! Thanks, my networking prof was very boring so I skimmed these topics just to pass the course. Now that I've interviewing for backend engineering positions at large companies, all the gaps in my knowledge is coming back to bite me in the ass! Your videos are great and are really helping me go over topics that I haven't thought about for a while / barely learned. Thank you for making these, it is literally directly influencing my life. Thanks again!

dylanroberts
Автор

It's like a friend is telling a story around the campfire somewhere in Mt. Shashta/NorCal and everyone is listening intently. Thanks Hussein.

iftekharuddin
Автор

Best video for some one who is just getting into software engineering. Love the long video format upto 40mins-1hr. Thanks a lot Hussein Nasser, you are a great teacher. Please keep adding more content!

glenfernandes
Автор

Newly hired backend SWE here, just letting you know I finished this video and watching your beginners backend engineering Playlist. I appreciate all the content you make.

Crucialzz
Автор

My man's been on fire lately. I really appreciate this content. It feels wrong to consume it for free, it's so good.

raffayhussain
Автор

This is my first comment on YouTube in life. This guy's humor and teaching skills are exceptional. GREAT CONTENT

vimalmunjani
Автор

For anyone like me who struggles to understand low level fundamentals of modern software engineering - your channel is a splendid place! Thanks so much Hussein for your hard work!

sirpeace_coding
Автор

I'm thoroughly enjoying your explanations. They're invaluable! Much love, excited to watch your channel grow. Thank you!

mishrasidhant
Автор

Thanks for posting these. It’s really helpful. I’m taking an intro to networking course and these videos are are way better than the course material/lectures.

bajojohn
Автор

The best explanation to TCP and UDP through this video! Cannot emphasize how useful this was, in-depth, crisp and well-explained with examples 💯💯

Gonna check out the entire playlist now 🙌

devansuyadav
Автор

Thanks Hussein, you are a superb educator. Love the thoroughness in your videos. Even though I have been working as a developer in the industry for a number of years I always learn something new on this channel and it enriches my understanding of what the heck I'm trying to do. Keep up the great work!

RoryGaddin