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

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

Комментарии • 67

  • @theSeniorSDE
    @theSeniorSDE 2 года назад +2

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

  • @TestAutomationTV
    @TestAutomationTV 4 года назад +4

    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.

  • @consistentlearners
    @consistentlearners Год назад

    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.

  • @SachinDolta
    @SachinDolta 4 года назад +10

    TCP-> foreplay
    Got it 👍

    • @moslehmahamud
      @moslehmahamud 4 года назад +1

      when he said foreplay i legit cracked

  • @davidhsv2
    @davidhsv2 4 года назад +3

    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

  • @tambolaking5383
    @tambolaking5383 4 года назад +1

    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

    • @hnasr
      @hnasr  4 года назад

      Thank you for being a long time sub and for all your feedback ❤️

  • @vasuudayar3691
    @vasuudayar3691 3 года назад

    u r helping many beginner backend engineers thanks a lot.

    • @hnasr
      @hnasr  3 года назад

      It's my pleasure (L)

  • @tahasaleh4697
    @tahasaleh4697 3 года назад +1

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

    • @hnasr
      @hnasr  3 года назад

      Maybe one day!

  • @EddyCaffrey
    @EddyCaffrey 4 года назад +2

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

    • @hnasr
      @hnasr  4 года назад +2

      Yup killing this head of line blocking

  • @abhishekgehlot2647
    @abhishekgehlot2647 3 года назад

    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.

  • @rajatsharma8147
    @rajatsharma8147 4 года назад +5

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

  • @norah5073
    @norah5073 3 года назад

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

  • @yodude2493
    @yodude2493 2 года назад

    Thanks man for videos

  • @saggitt
    @saggitt 4 года назад +3

    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?

  • @vamsishankar2825
    @vamsishankar2825 3 года назад +3

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

  • @andreytamelo1183
    @andreytamelo1183 3 года назад

    Super video! I applauded for $2.00 👏

  • @chandandey8271
    @chandandey8271 2 года назад +1

    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?

  • @viraj_singh
    @viraj_singh 4 года назад +2

    Very informative 👍

    • @hnasr
      @hnasr  4 года назад

      Viraj Singh 🙏

  • @bobby9568
    @bobby9568 4 года назад +1

    Just what I needed, thanx!

    • @hnasr
      @hnasr  4 года назад +1

      Your welcome 🙏

  • @hackwithharsha5228
    @hackwithharsha5228 4 года назад +1

    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 ?

    • @hnasr
      @hnasr  4 года назад +3

      HackWithHarsha good questions
      1) HTTP is stateless and is built on TCP which is stateful. There is no state stored on the server at the application side for HTTP every request comes with all the information it needs. It just different design. HTTP always easier horizontal scalability, or if the server goes down and came back up the requests will still be served..
      Check out my stateless vs stateful video
      2) status codes have nothing to do with TCP its pure application level codes .

    • @hackwithharsha5228
      @hackwithharsha5228 4 года назад

      @@hnasr Got it, thanks.. I will check your stateless vs stateful video

    • @_SoundByte_
      @_SoundByte_ 4 года назад +1

      TCP headers are tracked (seq numbers, error correction etc). Http headers are not tracked by the server. Hence stateless.

    • @hnasr
      @hnasr  4 года назад

      Yup 👍👍

  • @tonyramesh8184
    @tonyramesh8184 4 года назад +2

    thanks again ❤❤❤

  • @SachithNalakaMuhandiram
    @SachithNalakaMuhandiram 4 года назад

    one waited video, thanks for uploading...

    • @hnasr
      @hnasr  4 года назад +1

      Sure thing! Thanks for watching

  • @artieedwards
    @artieedwards 3 года назад

    Brilliant, fucking beautiful lecture!!!

  • @serhiihorun6298
    @serhiihorun6298 3 года назад

    Cool, thanks

  • @rajeshkishore7171
    @rajeshkishore7171 3 года назад

    excellent

  • @AbdullahAyyash
    @AbdullahAyyash 4 года назад

    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?

    • @hnasr
      @hnasr  4 года назад +3

      I still need to make that video yes! Still researching it but I think I am ready to make it 😊

  • @toekneema
    @toekneema 3 года назад

    Great analogies

  • @ravitejavankam2977
    @ravitejavankam2977 3 года назад

    UDP will be useful for logistics tracking

  • @johnalgozzini2165
    @johnalgozzini2165 Год назад

    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?

  • @TestAutomationTV
    @TestAutomationTV 4 года назад

    Yah, still here bro! 😁

  • @markreyronolo1482
    @markreyronolo1482 3 года назад

    Hussein "Sent the dang packet" Nasser

  • @waynewatson7970
    @waynewatson7970 4 года назад

    Hi Hussein, newbie here, can you post a video on hosting a basic website, which hosting platform. I get confused by all the options and I am trying to learn web dev on a budget. For example say I progress from hello world page to a node.js/mongodb/postgres page/app, how do I host that, where do I host that. It is very confusing. I want to be able to at some point in the future have my own website with multiple links to different projects, some of which may use leaflet.js and postgres or mongodb. I also would like to make sure once I set up a login page that the node server is secure etc. Can you shed some light, I ask you because I have enjoyed your video's and they help me understand things better. I know I could walk through all your videos and piece it together, but I am hoping for at least a general idea on what is important and what is not. Maybe I just go to AWS or Azure, but the last time I was with AWS and posted a simple website I was unsure of possibly getting charges I didn't understand. Thank you.

    • @hnasr
      @hnasr  4 года назад

      Hey Wayne I love to start from scratch and host the website on my own laptop so that people understand how things work before jumping to the cloud..
      You are right there are so many options out there so if you self host on your own machine you know exactly what you need to do the work
      See my caddy web server video its the easiest ruclips.net/video/t4naLFSlBpQ/видео.html

    • @waynewatson7970
      @waynewatson7970 4 года назад

      @@hnasr thank you sir, will look at video and see where I am at.
      :)

  • @rahuldeep4811
    @rahuldeep4811 4 года назад

    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?

    • @hnasr
      @hnasr  4 года назад

      The udp packet has a source ip address the server can use to send replies back

    • @asimarunava
      @asimarunava 3 года назад

      @@hnasr it means the client will act as a server when recieving data. So client must run a udp server? Am i making sense with my question?

  • @medilyesoudhini7411
    @medilyesoudhini7411 3 года назад +2

    14:50 low latency* not high latency

  • @justsaysharu
    @justsaysharu 4 года назад

    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?

    • @hnasr
      @hnasr  4 года назад +1

      I wouldn’t go as far as say that QUIC is the best.. QUIC was designed to solve the limitation where a client need to send multiple requests to the same host in parallel specifically stateless requests.. web browsing is great for that.. does it fit all cases ? Maybe yes maybe no..
      QUIC comes with cost that people are still try to minimize.. nothing beats raw TCP/UDP so far as we know

    • @LordNementon
      @LordNementon 4 года назад

      @@hnasr SCTP ? 🙃

  • @rezmed1144
    @rezmed1144 2 года назад

    Amazing you're an arabic version of Lunduke

  • @_SoundByte_
    @_SoundByte_ 4 года назад +1

    Nice haircut :P less distraction

    • @hnasr
      @hnasr  4 года назад

      For me too haha

  • @tambolaking5383
    @tambolaking5383 4 года назад +1

    TCP makes sure your receive
    UDP just sends
    TCP is a good salesman. Follows up. UDP is an unmotivated employee. Ask it to send, it sends, nothing more, nothing less.

    • @hnasr
      @hnasr  4 года назад +2

      I am UDP always

  • @大盗江南
    @大盗江南 4 года назад +7

    Tcp is like the first 3 years of ur marriage, u talk, ur wife listens. UDP is tge marriage after hahaha. U two just don't care whether the other one listens to u or not hhh.

    • @hnasr
      @hnasr  4 года назад

      采花大盗江南 😂😂

  • @mmu200
    @mmu200 3 года назад

    Hahaha, Like your blaaaaaaa for describing UDP.

  • @АндрейЗубков-ж2б
    @АндрейЗубков-ж2б 4 года назад

    why vpn apps use UDP ?

    • @hnasr
      @hnasr  4 года назад

      Because otherwise the VPN will suffer from TCP meltdown.

  • @eccosabanovic1589
    @eccosabanovic1589 3 года назад

    ...so UDP is Alpha and TCP is simp..lol