Тёмный

TCP vs UDP Crash Course 

Hussein Nasser
Подписаться 408 тыс.
Просмотров 132 тыс.
50% 1

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

Наука

Опубликовано:

 

16 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 452   
@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.
@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.
@mishrasidhant
@mishrasidhant 4 года назад
I'm thoroughly enjoying your explanations. They're invaluable! Much love, excited to watch your channel grow. Thank you!
@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.
@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.
@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.
@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.
@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!
@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!
@RomanFalcon13
@RomanFalcon13 3 года назад
I reached until the end, thanks for the long videos and all the insights!
@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.
@IzzatBinAfiff
@IzzatBinAfiff 4 года назад
"These exotic foreign hosts, man. They keep closing these connections, man!" 23:58 hahaha!
@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!
@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!
@shashikantsingh840
@shashikantsingh840 2 года назад
You are inspiring a ton of backend engineers . Having so much fun while going through your videos.Thanks a lot man:)
@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!!
@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
@M0rdFustang
@M0rdFustang 4 года назад
One of the better explanations on this subject on RU-vid, thanks
@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 👍
@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 🙌
@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.
@jayjayma
@jayjayma 3 года назад
Made it to the end. Thanks. Your videos really help keep me awake during long drives.
@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.
@elijahlair
@elijahlair Год назад
Reached to the end. Never knew you could build Servers in Nodejs for tcp and udp. Very insightful, Thanks
@dabbopabblo
@dabbopabblo 2 года назад
God there's so much value in your videos, literally the most useful educational videos on RU-vid
@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.
@mohammadhumayunkhan3642
@mohammadhumayunkhan3642 2 года назад
I wanna thank RU-vid for recommending your video. Your style of teaching is addictive! 😃
@mohamedgnana1705
@mohamedgnana1705 Год назад
This was really one of the best videos I have seen on TCP and Udp. Thanks Hussein
@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 ❤️
@hardikawasthi6210
@hardikawasthi6210 3 года назад
Hey, I reached until the end ! The depth of your content is really amazing. Thanks for such amazing videos.
@thatfunkyduck
@thatfunkyduck 4 года назад
Great vid as always dude, just started liking each one and have subscribed!
@maryblessingumeh1320
@maryblessingumeh1320 3 года назад
I made it to the end and I am still going on to the next, thanks for the good work.
@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
@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!!!!
@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.
@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
@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 :)
@ronokdev
@ronokdev 3 года назад
As always SPOT ON !! Thank you for your hard work !!
@vladyslavkarpenko9372
@vladyslavkarpenko9372 Год назад
Thank you Hussein 🤝 You had described a lot of stuff that rarely even discussed in the RU-vid world.
@engsalahmahmoud2418
@engsalahmahmoud2418 3 года назад
Hey I reached until the end! THANK YOU!
@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!
@dhruvbhavsar1669
@dhruvbhavsar1669 Год назад
Hey Thanks so much! Really shows how much you put effort without expecting anything in return. Giving is a bliss❤
@lenkamoravcikova311
@lenkamoravcikova311 3 года назад
obligatory I reached until the end :D thanks for much for this and all of your videos!
@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.
@dhvanitpopat2952
@dhvanitpopat2952 3 года назад
Hey I reached until the end! This is amazing! THANK YOU! looking forward to learn more
@duongcaomusic8062
@duongcaomusic8062 3 года назад
Hey, I reached until the end! Very useful! Thanks!
@AbhishekJaiswal608226
@AbhishekJaiswal608226 2 года назад
This is my first RU-vid comment since I started watching RU-vid 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
@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. :)
@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
@pratikgiri878
@pratikgiri878 Год назад
Make a video long as long you want . I wanna understand everything in depth . Thank you so much for these videos .
@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
@protyaybanerjee5051
@protyaybanerjee5051 3 года назад
Love from India, Brother. Keep making longer videos. You are a mentor i wish i had access to in person
@widyguilias3738
@widyguilias3738 3 года назад
I reach till the end, it's just make sense. Thanks for the video
@chaitanyaasati
@chaitanyaasati 3 года назад
I watched till last. Thank you for showing coding part of UDP and TCP both.
@amitkumargouda1768
@amitkumargouda1768 Год назад
You are really helping me in getting my CS fundamental correct.
@SpinningPsycho
@SpinningPsycho 3 года назад
Keep explaining the details please! Love it. Made to the end.
@shaoyihu6354
@shaoyihu6354 3 года назад
Wow, your video is excellent. I refreshed my knowledge after watching it!
@sadsorbet3897
@sadsorbet3897 2 года назад
I'm addicted to your tutorials, thanks
@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 :)
@shahlazulkarnine9628
@shahlazulkarnine9628 2 года назад
Hey Hussein, I reached the end. Love your tutorials, Thank you so so much!
@shellyhan8827
@shellyhan8827 2 года назад
Really love your enthusiasm! Content is very well delivered and explained in a very entertaining way!
@pratikgaur21
@pratikgaur21 3 года назад
I reached until the end. Thanks for the effort to explain.
@ericlien86
@ericlien86 Год назад
Gratefulness from Taiwan...really love your videos, can’t wait to watch the next one!
@bautistabuyatti6495
@bautistabuyatti6495 10 месяцев назад
Coming from the field of physics and wanting to understand everything to a deeper level, this is gold to start getting into networks eng!
@neuodev
@neuodev 2 года назад
I reached to the end. Thanks for the great work!
@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!
@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
@GuyjinBu
@GuyjinBu 10 месяцев назад
Great video, learned a lot! Also very good sense of humor. Looking forward to learning more from your videos!
@coffeesoup
@coffeesoup 3 года назад
I reached until the end! Love your vids Hussein!
@kurianbenoy2
@kurianbenoy2 3 года назад
Hey I reached until the end. Thanks and I am binge-watching your Backend playlist for beginners today
@hnasr
@hnasr 3 года назад
Enjoy 😊
@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.
@Prodbyhope.mp3
@Prodbyhope.mp3 4 года назад
I love how long the videos they are. So much better than reading
@hnasr
@hnasr 4 года назад
Thanks! I am glad you enjoy the length or the video, its very difficult to explain various related topics to clarify the main one in a short video.
@chandrakant2852
@chandrakant2852 Год назад
Superb explanation! Glad you are helping the community. Keep up the good work :)
@mumeich.4348
@mumeich.4348 3 года назад
I love you you make everything clear with your examples!
@GREGORIAN100able
@GREGORIAN100able 2 года назад
Very concise and clear. Thanks a lot Hussein.
@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.
@varunkmr19
@varunkmr19 3 года назад
Hey! I reached until the end. THANK YOU! for this amazing content.
@hnasr
@hnasr 3 года назад
You rock! thanks Varun!
@j03Biz
@j03Biz 3 года назад
Watched through the whole thing to broaden my backend knowledge.
@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
@sunshine-music
@sunshine-music Год назад
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 🙂 !
@DeepakSingh-hl3er
@DeepakSingh-hl3er 3 года назад
Such a clear explanation & demo. Thanks a ton!
@sdeske
@sdeske 19 дней назад
Very Good. Long videos are good. Packed with code and facts. Perfect.
@pankajkaushik913
@pankajkaushik913 2 года назад
That is some amazing stuff Hussein. Thank you so much!
@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!
@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
@ardyjovi3414
@ardyjovi3414 3 года назад
Made it to the end lol Thanks for the video, man! Thought I lost a bunch of fundamentals and now trying to recollect it slowly and your vids help a lot! Anyway I think you should keep post the long video, it serves the right amount of info I guess. Nice one! Oh and maybe you can address what to learn next or some references to check out to after watching the vids, it might help some ppl who's just trying to learn step by step
@hnasr
@hnasr 3 года назад
Thanks Ardy! And good idea to what to learn next. I can use end screens for that or a playlist. I suggest the TCP 3 way handhake next ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-bW_BILl7n0Y.html
@ardyjovi3414
@ardyjovi3414 3 года назад
@@hnasr Thank you! Yes and actually I watch your videos starting with the Backend Engineer Playlist, in order. If it's already in the right order then it's cool! 🙇
@embededmind418
@embededmind418 4 месяца назад
Hey reached till end..! Really appreciate your effort mate :)
@vimalmunjani
@vimalmunjani 4 года назад
This is my first comment on RU-vid in life. This guy's humor and teaching skills are exceptional. GREAT CONTENT
@hnasr
@hnasr 4 года назад
I am honored to receive your first comment 😊 thank you so much for taking the time to watch. Glad you liked the content
@vimalmunjani
@vimalmunjani 4 года назад
@@hnasr Hi, I see you are bit of a nodejs enthusiast too. It would be great to have a "Hussien Nasser" style video of under the hoods of node, specially event loop, libuv and related internals. Just a thought.
@shubhamsaxena587
@shubhamsaxena587 3 года назад
I just want to say, Absolutely love your videos. Also great point when you said your videos are long because you try to cover all information, I have seen 5 min TCP videos which don't explain anything. Keep up the good work
@hnasr
@hnasr 3 года назад
❤️❤️ thank you
@juanferrua5743
@juanferrua5743 2 года назад
This channel is awesome. Thanks for making these videos!
@abdourahman87
@abdourahman87 4 месяца назад
Thank you so much husseine, I started my journey to be a software engineer inshaa Allah , and I can say your videos have being very helpful and has made me understand what happens under the hood. Allahuma barik 😊
@joelkarie
@joelkarie Год назад
Really really good stuff. Thanks for the enthusiasm and clear examples.
@jbisa
@jbisa 3 года назад
Your videos are amazing. Very clear explanations, thank you!!
@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. 😇
@tosin8885
@tosin8885 3 года назад
Got to the end! Thank you
@ibukunadeeko
@ibukunadeeko 2 года назад
Reached the end, thanks for the video 👍🏻
Далее
The OSI Model - Explained by Example
25:16
Просмотров 175 тыс.
Самый надежный автомобиль
01:00
Просмотров 676 тыс.
When to use HTTP GET vs POST?
21:10
Просмотров 28 тыс.
TCP Meltdown - Computerphile
14:52
Просмотров 219 тыс.
Network Ports Explained
10:33
Просмотров 1,5 млн
Proxy vs Reverse Proxy Server Explained
14:18
Просмотров 129 тыс.
Cross Origin Resource Sharing (Explained by Example)
23:15
Top 8 Most Popular Network Protocols Explained
6:25
Просмотров 252 тыс.
keren sih #iphone #apple
0:16
Просмотров 1,7 млн
solve bubbling fan issue
0:24
Просмотров 2,6 млн
Holographic transparent flexible LED panel.
0:20
Просмотров 3,5 млн
Bardak ile Projektör Nasıl Yapılır?
0:19
Просмотров 6 млн
How To Unlock Your iphone With Your Voice
0:34
Просмотров 23 млн