TCP vs UDP Crash Course

  Рет қаралды 132,554

Hussein Nasser

Hussein Nasser

Күн бұрын

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!
github.com/hnasr/javascript_p...
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

Пікірлер: 451
@hnasr
@hnasr Жыл бұрын
Get my fundamentals of networking engineering udemy course head to network.husseinnasser.com for a discount coupon
@jeronlloyd4703
@jeronlloyd4703 4 жыл бұрын
You have taught me 2 semester worth of knowledge in a few hours !!! Thanks for your long videos...love your work
@hnasr
@hnasr 4 жыл бұрын
Jeron Lloyd thanks Jeron for taking the time and leaving a comment. Really genuinely happy that I could help. Cheers !
@aryankumar87771
@aryankumar87771 Жыл бұрын
same for me
@shahrukh49
@shahrukh49 3 жыл бұрын
Nobody in the history of mankind has ever explained tcp and udp this perfect way. Thanks.
@IzzatBinAfiff
@IzzatBinAfiff 4 жыл бұрын
"These exotic foreign hosts, man. They keep closing these connections, man!" 23:58 hahaha!
@ssreejit3674
@ssreejit3674 3 жыл бұрын
Great video as usual. 33:51 The reason you got 3 byte is because you piped "hi " and in the TCP example it was "hi " as it was sent by pressing enter in the terminal. 13 is the ascii number for carriage return and 10 is the ascii number for newline feed .
@Mastermind-pz9eu
@Mastermind-pz9eu 2 жыл бұрын
It’s usually a windows vs unix thing. I believe that it happens because different tools were used for sending data. And they just adhere to different standards. The logic behind having “/r/n” is related to printers. This way you could send all file characters to the printer and it would know to go back to the left and drop to a new line. Unix (or at least the modern ones) says that it’s redundant and just rolls with “/n”. Sometimes this can cause weird git commit if the developers don’t stick to the same new line encoding and may even cause python scripts to malfunction on different systems.
@AbandonedVoid
@AbandonedVoid 3 жыл бұрын
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.
@newtonsarr1234
@newtonsarr1234 3 жыл бұрын
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.
@mishrasidhant
@mishrasidhant 4 жыл бұрын
I'm thoroughly enjoying your explanations. They're invaluable! Much love, excited to watch your channel grow. Thank you!
@glenfernandes5248
@glenfernandes5248 2 жыл бұрын
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!
@dylanroberts4577
@dylanroberts4577 2 жыл бұрын
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!
@karamjotsingh7479
@karamjotsingh7479 3 жыл бұрын
Your channel made backend engineering more fun for me. Your videos provide the best foundation to learn about a topic and set the path to dive deeper.
@Maniac-007
@Maniac-007 Жыл бұрын
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
@bajojohn
@bajojohn 3 жыл бұрын
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.
@RomanFalcon13
@RomanFalcon13 3 жыл бұрын
I reached until the end, thanks for the long videos and all the insights!
@nuncapierdaslaclase3216
@nuncapierdaslaclase3216 4 жыл бұрын
Hey I reached until the end! This is amazing! THANK YOU!
@hnasr
@hnasr 4 жыл бұрын
nunca pierdas la clase thank you 😊 i am glad you enjoyed the video!!
@M0rdFustang
@M0rdFustang 4 жыл бұрын
One of the better explanations on this subject on KZbin, thanks
@RoryGaddin
@RoryGaddin 3 жыл бұрын
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!
@djsigmann
@djsigmann 4 жыл бұрын
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.
@Ryfibi
@Ryfibi 3 жыл бұрын
I reached until the end. And I think you do a good job explaining complex things in a NOT boring way. Cheers!
@devansuyadav6738
@devansuyadav6738 2 жыл бұрын
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 🙌
@shashikantsingh840
@shashikantsingh840 2 жыл бұрын
You are inspiring a ton of backend engineers . Having so much fun while going through your videos.Thanks a lot man:)
@gjuoun
@gjuoun 4 жыл бұрын
wow, I made it to the end! It refreshed my knowledge about UDP and TCP, thanks a lot!
@hnasr
@hnasr 4 жыл бұрын
Nice 👍
@dabbopabblo
@dabbopabblo 2 жыл бұрын
God there's so much value in your videos, literally the most useful educational videos on KZbin
@sudhirag
@sudhirag 3 жыл бұрын
Amazing stuff !!! I watched from start till the end in one sitting and not only this video but I do this for all of your videos. Keep posting, thanks.
@mohamedgnana1705
@mohamedgnana1705 Жыл бұрын
This was really one of the best videos I have seen on TCP and Udp. Thanks Hussein
@iftekharuddin
@iftekharuddin Жыл бұрын
It's like a friend is telling a story around the campfire somewhere in Mt. Shashta/NorCal and everyone is listening intently. Thanks Hussein.
@sebantichandra9318
@sebantichandra9318 3 жыл бұрын
thank you so much! I can finally say I have a much clearer understanding of concepts like DOS, congestion control, acknowledgment than I did earlier by mindlessly going through all those videos and pages after pages of very difficult explanation.
@raffayhussain6717
@raffayhussain6717 2 жыл бұрын
My man's been on fire lately. I really appreciate this content. It feels wrong to consume it for free, it's so good.
@maryblessingumeh1320
@maryblessingumeh1320 3 жыл бұрын
I made it to the end and I am still going on to the next, thanks for the good work.
@elijahlair
@elijahlair Жыл бұрын
Reached to the end. Never knew you could build Servers in Nodejs for tcp and udp. Very insightful, Thanks
@dankman7603
@dankman7603 3 жыл бұрын
I've reached the end and am now going back to The Complete Guide to WebSockets . You make back end easy to understand, thank you.
@hnasr
@hnasr 3 жыл бұрын
Thanks for watching! Hope you are enjoying the content , take your time and ask questions ❤️
@thatfunkyduck
@thatfunkyduck 4 жыл бұрын
Great vid as always dude, just started liking each one and have subscribed!
@ronokdev
@ronokdev 3 жыл бұрын
As always SPOT ON !! Thank you for your hard work !!
@jayjayma
@jayjayma 3 жыл бұрын
Made it to the end. Thanks. Your videos really help keep me awake during long drives.
@engsalahmahmoud2418
@engsalahmahmoud2418 3 жыл бұрын
Hey I reached until the end! THANK YOU!
@zenocitium7114
@zenocitium7114 3 жыл бұрын
Man you are the GOAT! learn more from that JS code server stuff than all the hours put in before. Keep on teaching mate! Natural
@matts8911
@matts8911 9 ай бұрын
22:55 you had me laughing out loud 😂man, I recently found your channel and I want to say I really appreciate your videos and what you do, teaching us so much while also just sharing your thoughts and authentic self. You're helping tons of people and spreading positive energy, particularly in a community that doesn't have enough of it, imo. Thank you so much!!!!
@lenkamoravcikova311
@lenkamoravcikova311 3 жыл бұрын
obligatory I reached until the end :D thanks for much for this and all of your videos!
@mohammadhumayunkhan3642
@mohammadhumayunkhan3642 2 жыл бұрын
I wanna thank KZbin for recommending your video. Your style of teaching is addictive! 😃
@hardikawasthi6210
@hardikawasthi6210 3 жыл бұрын
Hey, I reached until the end ! The depth of your content is really amazing. Thanks for such amazing videos.
@ahmedtarek8792
@ahmedtarek8792 3 жыл бұрын
Even though I knew about TCP and UDP, I reached at the end of video. You represented it so nicely. Your videos are very entertaining, I don't really feel any learning stress.
@sadsorbet3897
@sadsorbet3897 2 жыл бұрын
I'm addicted to your tutorials, thanks
@vladyslavkarpenko9372
@vladyslavkarpenko9372 Жыл бұрын
Thank you Hussein 🤝 You had described a lot of stuff that rarely even discussed in the KZbin world.
@chaitanyaasati
@chaitanyaasati 3 жыл бұрын
I watched till last. Thank you for showing coding part of UDP and TCP both.
@duongcaomusic8062
@duongcaomusic8062 3 жыл бұрын
Hey, I reached until the end! Very useful! Thanks!
@Crucialzz
@Crucialzz 2 жыл бұрын
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.
@romankhabibulin3341
@romankhabibulin3341 3 ай бұрын
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!
@neuodev
@neuodev 2 жыл бұрын
I reached to the end. Thanks for the great work!
@pratikgaur21
@pratikgaur21 3 жыл бұрын
I reached until the end. Thanks for the effort to explain.
@amitkumargouda1768
@amitkumargouda1768 Жыл бұрын
You are really helping me in getting my CS fundamental correct.
@vamsishankar2825
@vamsishankar2825 3 жыл бұрын
I literally binged your channel and just subscribed now.. please make lot of longer videos with in depth explanations. Really liked your videos
@coffeesoup
@coffeesoup 3 жыл бұрын
I reached until the end! Love your vids Hussein!
@mtushar
@mtushar Жыл бұрын
Hey Hussein, I reached the end! This was a truckload of reliable and deep knowledge for something I suck at right now. Thank you for your content as always, big fan and evangelist here :)
@SpinningPsycho
@SpinningPsycho 3 жыл бұрын
Keep explaining the details please! Love it. Made to the end.
@codingwithsmallsteps2878
@codingwithsmallsteps2878 3 жыл бұрын
Hey I reached till the end. I really enjoyed your video. You put a lot of efforts to understand the concepts. Thank you for this. Plus the examples you showed were like the cherry on the cake. :)
@ericlien86
@ericlien86 Жыл бұрын
Gratefulness from Taiwan...really love your videos, can’t wait to watch the next one!
@dhruvbhavsar1669
@dhruvbhavsar1669 Жыл бұрын
Hey Thanks so much! Really shows how much you put effort without expecting anything in return. Giving is a bliss❤
@pankajkaushik913
@pankajkaushik913 2 жыл бұрын
That is some amazing stuff Hussein. Thank you so much!
@pratikgiri878
@pratikgiri878 Жыл бұрын
Make a video long as long you want . I wanna understand everything in depth . Thank you so much for these videos .
@GREGORIAN100able
@GREGORIAN100able 2 жыл бұрын
Very concise and clear. Thanks a lot Hussein.
@embededmind418
@embededmind418 4 ай бұрын
Hey reached till end..! Really appreciate your effort mate :)
@efimovta
@efimovta 2 жыл бұрын
I've reached until the end :D Cool content!
@dhvanitpopat2952
@dhvanitpopat2952 3 жыл бұрын
Hey I reached until the end! This is amazing! THANK YOU! looking forward to learn more
@piyushkantidas
@piyushkantidas 3 жыл бұрын
Just loved your presentation. Thank you for taking the time to make such great content. And yeah, I reached the end of this long 40 minutes video :D
@widyguilias3738
@widyguilias3738 3 жыл бұрын
I reach till the end, it's just make sense. Thanks for the video
@shaoyihu6354
@shaoyihu6354 3 жыл бұрын
Wow, your video is excellent. I refreshed my knowledge after watching it!
@mehrshaddarvish2762
@mehrshaddarvish2762 2 жыл бұрын
you always say that your videos are too long, however my friends and I are your fan because we believe you explain essential and important sessions in short videos :)
@AbhishekJaiswal608226
@AbhishekJaiswal608226 2 жыл бұрын
This is my first KZbin comment since I started watching KZbin which might be several years ago. I reached till the end and first time I understood the differences between TCP and UDP so clearly. Thanks for such crisp and detailed quality stuff
@hnasr
@hnasr 2 жыл бұрын
Thanks for watching! Glad you enjoyed the content
@mumeich.4348
@mumeich.4348 3 жыл бұрын
I love you you make everything clear with your examples!
@protyaybanerjee5051
@protyaybanerjee5051 3 жыл бұрын
Love from India, Brother. Keep making longer videos. You are a mentor i wish i had access to in person
@ibukunadeeko
@ibukunadeeko 2 жыл бұрын
Reached the end, thanks for the video 👍🏻
@rodmajuelojr
@rodmajuelojr 4 жыл бұрын
Appreciate the long explanations. Shows how knowledgable you are with the topic, includes easy to understand examples and insights. Looking forward to more!
@rodmajuelojr
@rodmajuelojr 4 жыл бұрын
In the udp code test maybe 'w' means wait i dunno...
@hnasr
@hnasr 4 жыл бұрын
Thanks Rod for your message! Appreciate you
@sdeske
@sdeske 29 күн бұрын
Very Good. Long videos are good. Packed with code and facts. Perfect.
@MonikaImbibe
@MonikaImbibe 11 ай бұрын
I have become your fan. I have been trying to learn backend for 3 years and every time the topic came up - I procrastinated, ended up honing my skills at front-end, UI, design etc.etc. Not only your videos are so explanatory but you have made the topic so interesting that a beginner like me can truly enjoy it, would want to sneak deep into it. Thank you so much.
@hnasr
@hnasr 11 ай бұрын
appreciate it dear thank you! all the best on your career
@shahlazulkarnine9628
@shahlazulkarnine9628 2 жыл бұрын
Hey Hussein, I reached the end. Love your tutorials, Thank you so so much!
@ashutoshdas3010
@ashutoshdas3010 2 жыл бұрын
Not boring at all, finished the whole video in a go
@shellyhan8827
@shellyhan8827 2 жыл бұрын
Really love your enthusiasm! Content is very well delivered and explained in a very entertaining way!
@sunshine-music
@sunshine-music 2 жыл бұрын
We need more teachers like you. @Hussein, Kindly start teaching to teachers especially of Institutes where faculties makes interesting lecture so boring. You are amazing 🙂 !
@juanferrua5743
@juanferrua5743 2 жыл бұрын
This channel is awesome. Thanks for making these videos!
@DeepakSingh-hl3er
@DeepakSingh-hl3er 3 жыл бұрын
Such a clear explanation & demo. Thanks a ton!
@j03Biz
@j03Biz 3 жыл бұрын
Watched through the whole thing to broaden my backend knowledge.
@saifsalim6084
@saifsalim6084 3 жыл бұрын
I have written my networking paper by cramming all these and spitting out in the examination paper. But now after watching this video till end, I really learnt a lot. Looking forward to learn more. 😇
@jakubpatrik2326
@jakubpatrik2326 2 жыл бұрын
super duper talk, extremely insightful :)
@JulianInsua
@JulianInsua Жыл бұрын
Thanks man! This is just AWESOME!!!
@tosin8885
@tosin8885 3 жыл бұрын
Got to the end! Thank you
@mohitdhingra27
@mohitdhingra27 4 жыл бұрын
Great work man. I really like all of your videos. It really clears the concepts. Thanks for such a good work. #KeepBeingAwesome.
@hnasr
@hnasr 4 жыл бұрын
mohit dhingra thanks Mohit! Appreciate it and glad I could help. Stay Awesome!
@hooow23
@hooow23 3 жыл бұрын
Dude, I love the way you're teaching things, and how you demystify concepts and explain them in great details. I would really like to support your channel, so can you please guide me on how to do that ! Good luck hussein, you're the best.
@bautistabuyatti6495
@bautistabuyatti6495 11 ай бұрын
Coming from the field of physics and wanting to understand everything to a deeper level, this is gold to start getting into networks eng!
@chandrakant2852
@chandrakant2852 Жыл бұрын
Superb explanation! Glad you are helping the community. Keep up the good work :)
@mridulverma1535
@mridulverma1535 3 жыл бұрын
love from all the engineers on this engineering day. Thankyou Hussein.
@mridulverma1535
@mridulverma1535 3 жыл бұрын
Also I reached till the end.
@hnasr
@hnasr 3 жыл бұрын
Sending love ❤️ back to all engineers
@RK-xl2uq
@RK-xl2uq 3 жыл бұрын
reached the end, not sure why i saw your videos but they are addicting so i'll watch more in coming days :)
@hnasr
@hnasr 3 жыл бұрын
❤️ thank you for watching
@arbaztyagi123
@arbaztyagi123 2 жыл бұрын
Honestly man.. enjoying your explanation.. You channel have lots of lots of high quality content videos..I must watch all of them..I am sure I'm gonna do this.
@GuyjinBu
@GuyjinBu 10 ай бұрын
Great video, learned a lot! Also very good sense of humor. Looking forward to learning more from your videos!
@varunkmr19
@varunkmr19 3 жыл бұрын
Hey! I reached until the end. THANK YOU! for this amazing content.
@hnasr
@hnasr 3 жыл бұрын
You rock! thanks Varun!
@excelinaccounting8094
@excelinaccounting8094 29 күн бұрын
loved it, reached thru the end
@tuanvinhto1849
@tuanvinhto1849 3 жыл бұрын
Thanks for your video, it's very good to understand deeply about the network layer, now I can say I understand TCP/UDP and can make choice if needed later
@johnlynch5896
@johnlynch5896 3 жыл бұрын
Hey Hussein, thank you! I love your passion and your humility. Would love to sit down with you with coffee to discuss the vagaries of software engineering! After watching three of your videos, I am hooked!
@khaingkhanthtun
@khaingkhanthtun 2 жыл бұрын
Thank you so much, your channel is gold!
@jbisa
@jbisa 3 жыл бұрын
Your videos are amazing. Very clear explanations, thank you!!
@user-oy4kf5wr8l
@user-oy4kf5wr8l 4 жыл бұрын
Jesus man.... Plz keep doing this great job... U r amazing....
TCP vs UDP - Explaining Facts and Debunking Myths - TCP Masterclass
20:24
Practical Networking
Рет қаралды 84 М.
СНЕЖКИ ЛЕТОМ?? #shorts
00:30
Паша Осадчий
Рет қаралды 8 МЛН
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 5 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 4,8 МЛН
Don't Use Websockets (Until You Try This…)
6:46
Code With Ryan
Рет қаралды 286 М.
UDP and TCP: Comparison of Transport Protocols
11:35
PieterExplainsTech
Рет қаралды 1,2 МЛН
The OSI Model - Explained by Example
25:16
Hussein Nasser
Рет қаралды 177 М.
What is a Protocol? (Deepdive)
18:14
LiveOverflow
Рет қаралды 158 М.
Что такое TCP/IP: Объясняем на пальцах
15:38
TCP vs UDP Comparison | Cisco CCNA 200-301
7:13
CertBros
Рет қаралды 294 М.
When to use HTTP GET vs POST?
21:10
Hussein Nasser
Рет қаралды 29 М.
DNS is beautiful
41:01
Hussein Nasser
Рет қаралды 45 М.
TCP Meltdown - Computerphile
14:52
Computerphile
Рет қаралды 219 М.
💅🏻Айфон vs Андроид🤮
0:20
Бутылочка
Рет қаралды 731 М.
APPLE совершила РЕВОЛЮЦИЮ!
0:39
ÉЖИ АКСЁНОВ
Рет қаралды 4,1 МЛН
How To Unlock Your iphone With Your Voice
0:34
요루퐁 yorupong
Рет қаралды 27 МЛН