When to use UDP vs TCP in Building a Backend Application?

preview_player
Показать описание
In this video I explain when to use TCP vs UDP as a communication protocol on your backend app. I go through the advantages and disadvantages of UDP I also discuss the protocol within the context of Chatting System, Multiplayer game, and building a browser and a web server

0:00 Intro
2:00 UDP
3:00 TCP
6:00 UDP vs TCP for Building a Chatting System
9:20 UDP vs TCP for Building a Multiplayer game
15:30 UDP vs TCP for Building a Browser and WebServer
19:11 Summary

🏭 Backend Engineering Videos

💾 Database Engineering Videos

🛰 Network Engineering Videos

🏰 Load Balancing and Proxies Videos

🐘 Postgres Videos

🚢Docker

🧮 Programming Pattern Videos

🛡 Web Security Videos

🦠 HTTP Videos

🐍 Python Videos

🔆 Javascript Videos

Become a Member

Support me on PayPal

Become a Patreon

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

i just love how your one video connects to other and it starts making more sense. Beautiful concepts and amazing explanation

theSeniorSDE
Автор

IBM Aspera is a premium product built on UDP I guess. It is pretty expensive but fast. I work at a company that deals w large amounts of data. Good to know about the Quick protocol. I'll tell my manager about it. I am the test developer on the team, the ultimate decision will be in lead developer's hands and our manager's hands.
Fun story, I teach TCP and UDP on Udemy so I am confident that I know some stuff about these. In a recent meeting our manager talked about building a desktop application for file transfer and maybe using TCP or UDP. I said nonchalantly "UDP is too unreliable for data transfer, yes it's fast but it'll screw up our files".
The manager was so upset, I too gathered that my input was uncalled for and unwelcome. I reached him out after the meeting and said sorry.
Not sharing links of my courses because I believe it will damage the purpose of posting this comment, want it to be pure haha.

TestAutomationTV
Автор

I am a great fan of you Hussein. I really appreciate your efforts in removing the idea of abstraction and making us how things work under the hood.
I have been watching out your videos since 2021, I really loved your videos for focusing on the fundamentals instead of the fancy stuff.

consistentlearners
Автор

I've been following you since you had a few thousand subscribers. the journey from 0 to a few thousand must have been very difficult for you. But I am impressed with the quality you bring now. Congratulations on close to 50k subscribers

tambolaking
Автор

Your videos are so good, you need your own subreddit!

tahasaleh
Автор

Please don't forget the vulcain follow up. I'm tired of writing 5 endpoints for different representations of the same entity :( Love your work, cheers from Brazil

davidhsv
Автор

u r helping many beginner backend engineers thanks a lot.

vasuudayar
Автор

So UDP can be used for video streaming or voip like applications right? As there we can afford to lose some data while transmission

vamsishankar
Автор

Thank you so much for this.
Thanks to youtube algorithm that I found your channel.
You're doing a great job.
Explaining in such a smart and funky way.
Love from india.

abhishekgehlot
Автор

Your video always have fun :)
Thank you for this video

norah
Автор

Great video, thank you! Suppose we do need raw UDP to quickly transfer game states from server to client. How would you structure that state, messages and their processing to minimize the effects of bad connection? Maybe you can point to some existing materials on this topic?

saggitt
Автор

I'm trying to use my tcp/udp app to determine what server I'm on in a certain game on xbox. I can use this on my pc but, how do I use it on my xbox if I'm using a VPN router connected directly with my router and xbox?

johnalgozzini
Автор

Hi Hussein, Can you tell me why most of the databases are use TCP for communication. I heard the answer some of your video but forget. Can you tell me the answer one more time?

chandandey
Автор

Thanks 👍🏽. So HTTP/3 moving to UDP will come with some amazing improvement in efficiency 😉.

EddyCaffrey
Автор

Thanks Hussein !! Some Noob questions

1. If TCP is stateful, why HTTP is stateless which built on top of TCP ?
2. Does our HTTP status code depends on the acknowdedgment that server sends to client in TCP ?

hackwithharsha
Автор

Hi @Naseer, How UDP server sends response back to Client? For example like in multpi player game, how Gaming server inform end game user that the building is destroyed?

rahuldeep
Автор

one waited video, thanks for uploading...

SachithNalakaMuhandiram
Автор

Amazing video. You videos help me to get the concepts easily. Need a video on SQL vs NoSQL.

rajatsharma
Автор

Great video! I've seen two videos you did on QUIC in compression to HTTP2 and the possibility of using it to improve databases. Could you please make a video explaining QUIC in depth? How it works, when to use it and how to use it as an alternative to HTTP?

AbdullahAyyash
Автор

So is QUIC just the best of both the worlds? I mean a combination of TCP and UDP features - by processing the ACKs of each channel/StreamID individually? But still, need an ACK for guarantees?

justsaysharu