How HTTP/2 Works, Performance, Pros & Cons and More

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024

ความคิดเห็น • 126

  • @hnasr
    @hnasr  2 ปีที่แล้ว +3

    Get my Fundamentals of Networking for Effective Backends udemy course Head to network.husseinnasser.com for a discount coupon (link redirects to udemy with coupon applied)

  • @allisonmachado
    @allisonmachado 3 ปีที่แล้ว +167

    Netflix for developers :)

  • @whereismypipey
    @whereismypipey 4 ปีที่แล้ว +44

    I loved the picture grid loading example to nicely visualize the performance and difference in number of connections.

  • @umeshshetty0605
    @umeshshetty0605 2 ปีที่แล้ว +13

    I am a Network Engineer but I love the backend Engineering stuff that you show and it makes it easier for me to understand application problems while troubleshooting the network side of it. Thank You and Keep posting !!!

    • @hnasr
      @hnasr  2 ปีที่แล้ว +2

      Thanks!! Glad to see more network engineers in the channel. Cheers

  • @dean6046
    @dean6046 4 ปีที่แล้ว +14

    thank you Hussein! I want you to understand that this is great content and I love the way you deliver it with such energy and excitement. I frequently download videos from TH-cam for offline use and I just downloaded this one because I think it's great content.

  • @fraollemecha
    @fraollemecha 3 ปีที่แล้ว +3

    HTTP/2: We gotta do it fast.
    Michael Scott: That's what she said.

  • @sreevishal2223
    @sreevishal2223 4 ปีที่แล้ว +8

    michael scott..! , that's what she said.. haha :p :p
    Nice explanation..!

  • @jerweiyeoh7096
    @jerweiyeoh7096 3 ปีที่แล้ว +5

    Awww yis, another 1k like
    Either there is an ongoing meme on the community of leaving the like counts at 999 and I'm screwing it,
    or I'm on fire! XD
    PS: Appreciate the explanations, both high level and low level.

    • @hnasr
      @hnasr  3 ปีที่แล้ว

      🙏🙏🙏

  • @danielkrajnik3817
    @danielkrajnik3817 3 ปีที่แล้ว +6

    the more I learn about software, the more I find that every next upgrade boils down to parallelization

  • @amrudeshs
    @amrudeshs 4 ปีที่แล้ว +5

    Hei. Great info. Thnx. Can you also make a comparison between HTTP2 server push and Websockets based push messages? I understand that they dont serve the same purposes but a short video on it explaining when to use what would be great.

  • @chenrvn
    @chenrvn 4 ปีที่แล้ว +6

    1. Thanks, Gr8 video
    2. It will be helpful if u will show the stream Ids in the http request/response and the TLS connection mechanism 😎

    • @hnasr
      @hnasr  4 ปีที่แล้ว +5

      Thanks Chen!
      That is a great idea diving deep into the belly of the beast of HTTP/2.. will consider it in the future.

    • @chenrvn
      @chenrvn 4 ปีที่แล้ว +1

      @@hnasr you are the men

  • @Tony-dp1rl
    @Tony-dp1rl ปีที่แล้ว +1

    Those CONs of HHTP/2 are certainly a stretch, given a server could return a HTML page with all sorts of unused assets in it anyway which effectively creates a PUSH in terms of network load ... and the chances of having a H1 load balancer and H2 backend are almost zero.

  • @zitro7052
    @zitro7052 3 ปีที่แล้ว +2

    Im in education as IT-Specialist - System Integration right now, third year and almost finished my Project. My Teachers couldnt teach us normal OSI model or SQL, we never had HTML in school. imagine you doin this just in your free time and you are more meaningfull as much Teachers in germanys working schools for myself and some friends. Thanks for that little snack, i just wanna set up an HTTP 2 server now :D! should i go for nginx or more for something like apache?

  • @hhellohhello
    @hhellohhello 4 ปีที่แล้ว +4

    Sorry, but whats the difference between keep alive header and multiplexing?

    • @hnasr
      @hnasr  4 ปีที่แล้ว +2

      hhellohhello no problem! the Keepalived header instructs the server to not immediately close the TCP connection after it is made so we continue send more data through it. This was available since http 1.1
      Multiplexing is the ability to send multiple requests in parallel in that TCP connection. Something we couldn’t in http 1.1 and only available in http2

  • @rahulmalu6741
    @rahulmalu6741 4 ปีที่แล้ว +4

    Hi @husseon Nassar: In the demo for http2, did you used the server push mechanism to push the 100 images or only the protocol was set to http2 (without enabling the server push)?

  • @omriterem6448
    @omriterem6448 4 ปีที่แล้ว +4

    One of the best TH-cam channels for programmers...

  • @balramverma4873
    @balramverma4873 2 ปีที่แล้ว +3

    This channel is to addictive that even in the period I’m focusing on front end stuff i end up watching these.

  • @subhamthemusicalguy8851
    @subhamthemusicalguy8851 4 ปีที่แล้ว +4

    Joined your channel to support you. Excellent work

    • @hnasr
      @hnasr  4 ปีที่แล้ว +2

      ❤️ thanks Subham ! Appreciate your support

  • @nabidulalam6956
    @nabidulalam6956 3 ปีที่แล้ว +1

    powerful stuff :v

  • @harshg2003
    @harshg2003 4 ปีที่แล้ว +2

    How can I check if my web server supports Http/1.1 or H/2 or H/3? How can I force H1 and H2 on either client side or server side, if they supports both?

    • @hnasr
      @hnasr  4 ปีที่แล้ว

      Hey Harash, I recommend chrome dev tools. Good idea ill make a video on this

  • @palaniappanrm6277
    @palaniappanrm6277 4 ปีที่แล้ว +1

    How to host a server in local with HTTP/2 support? Does node http-server, apache tomcat support it?

    • @hnasr
      @hnasr  4 ปีที่แล้ว +1

      Palaniappan RM sure all of those support it! Check out this video where I show h2 on caddy because its the easiest Getting started with Caddy the HTTPS Web Server from scratch
      th-cam.com/video/t4naLFSlBpQ/w-d-xo.html

  • @sidharthvijayakumar3521
    @sidharthvijayakumar3521 11 หลายเดือนก่อน

    This is not right load balancer layer 7 supports http 2. Recently i have created a flask app which only supports http 1.1 which using gunicorn which also does not support http 2 . Then used Cloudrun which was deployed as a backend to Classic application LB in GCP so my api in local shows as http 1.1 but the same Api in the load balancer i get it as http2 so i do not think what you said is relevant now.

  • @AwesomeMetalBands
    @AwesomeMetalBands 3 ปีที่แล้ว +2

    Seriously great content very very interesting!!@

  • @apoorvamishra5952
    @apoorvamishra5952 3 ปีที่แล้ว

    stuff is good, you just need not to make the voices ,
    a simple and straight way of talking would be more clear, i presume.

  • @ankitsah2819
    @ankitsah2819 4 ปีที่แล้ว +3

    Awesome explanation 👍🏻

  • @mohamad5497
    @mohamad5497 3 ปีที่แล้ว +2

    Your content is great! Thanks Hussein!

  • @Lucasmont001
    @Lucasmont001 4 ปีที่แล้ว +2

    excellent video! Thanks! ;)

  • @akashdeepnandi
    @akashdeepnandi 3 ปีที่แล้ว +1

    21:57 that's what she said😂😂😂

  • @virgilbaldovin1852
    @virgilbaldovin1852 5 หลายเดือนก่อน

    If someone asks me “what is an API?” i’ll send them this one

  • @surendrasharma8238
    @surendrasharma8238 2 ปีที่แล้ว

    not much learning. But still good for beginners.

  • @SateeshBandi
    @SateeshBandi 4 ปีที่แล้ว +3

    Very good demo.. I loved it.

  • @Ranjith_P
    @Ranjith_P 2 ปีที่แล้ว

    Its a huge performance difference - thats what she said

  • @이유창-w4z
    @이유창-w4z 4 ปีที่แล้ว +2

    excellent!! very clear provocation and easy to understand.

    • @hnasr
      @hnasr  4 ปีที่แล้ว

      Thank you 🙏

  • @shavishvilitornike
    @shavishvilitornike 2 ปีที่แล้ว

    How do I become member of this channel?

  • @natarajboina7525
    @natarajboina7525 4 ปีที่แล้ว +2

    This was very insightful. Thanks for this video.

    • @hnasr
      @hnasr  4 ปีที่แล้ว +1

      Thanks for your comment Nataraj

  • @waagnermann
    @waagnermann ปีที่แล้ว

    when you showed benchmarks where it was written that there was 6 TCP connections? in network panel

    • @hnasr
      @hnasr  ปีที่แล้ว

      From Google paper
      Popular Web browsers, including IE8 [2], Fire- fox 3 and Google’s Chrome, open up to six TCP connections per domain, partly to increase parallelism and avoid head-of- line blocking of independent HTTP requests/responses, but mostly to boost start-up performance when downloading a Web page.
      static.googleusercontent.com/media/research.google.com/en//pubs/archive/36640.pdf

  • @abnan0001
    @abnan0001 4 ปีที่แล้ว +1

    I checked again brother
    Is there any update for the series

  • @devashishrana1637
    @devashishrana1637 3 ปีที่แล้ว

    Suppose my configuration is client -> gateway -> server, how will http2 behave in this scenario between each layer?? or should I just keep only client and gateway in http2?

  • @oah8465
    @oah8465 3 ปีที่แล้ว +1

    More reasons to love. L4 LBs. Thx Hussein.

  • @venkateswarans1012
    @venkateswarans1012 3 ปีที่แล้ว

    HTTP 2 resolves head of line blocking at application layer but in transport layer (TCP) it's still exist and Quic is trying something to achieve even on transport layer level.

  • @PouriyaJamshidi
    @PouriyaJamshidi 4 ปีที่แล้ว +2

    cURL supports HTTP/3 (experimental) as well.

    • @hnasr
      @hnasr  4 ปีที่แล้ว +3

      Nice! Didn't know that, looks like I need to make a video about cURL, thanks !

    • @PouriyaJamshidi
      @PouriyaJamshidi 4 ปีที่แล้ว

      @@hnasr Thanks to you.

  • @hazemabdelalim5432
    @hazemabdelalim5432 2 ปีที่แล้ว

    The idea here , if the server and client keeps this connection open , isn't that some-kind of wasting resources ? if the client doesn't request anything , the server will still need to have maintain this connection even if the user doesn't use it , probably we can set a ttl to the open connection , so after that time with not being active , it will be closed

  • @abdelrhmanahmed1378
    @abdelrhmanahmed1378 2 ปีที่แล้ว

    does http2 also multiplex the segment inside each request or send them in sync and wait for each segment ack ?!

  • @AMFLearning
    @AMFLearning 3 ปีที่แล้ว

    amflearning by doing

  • @saumyapandey218
    @saumyapandey218 2 ปีที่แล้ว

    What happens when a file is already cached in the client but the server pushes the file because of its configuration?

  • @raphaelkuttruf
    @raphaelkuttruf 4 ปีที่แล้ว +1

    great content :)
    how would i set up http2 in my backend network after a reverser proxy?

  • @flobbie87
    @flobbie87 3 ปีที่แล้ว

    What, where does it say in the spec that i have to wait for the response to send another request? I hope no actual client does that.

  • @romantsyupryk3009
    @romantsyupryk3009 4 ปีที่แล้ว +1

    Thanks so much for this video tutorial.

  • @SatishKumar-jb9qm
    @SatishKumar-jb9qm 3 ปีที่แล้ว +1

    Your content is great! Thank you for posting.

  • @andikakurniawan4188
    @andikakurniawan4188 2 ปีที่แล้ว

    I like this guy. This guy is smart and also have talent to be teacher...

  • @shubhampawar2207
    @shubhampawar2207 4 ปีที่แล้ว +2

    Awesome Presentation!...

    • @hnasr
      @hnasr  4 ปีที่แล้ว +1

      😊🙏 thanks

  • @longtranbao4177
    @longtranbao4177 2 ปีที่แล้ว

    Thanks you! In school people don't teach about this stuff.

  • @AnilSharma-gr6ck
    @AnilSharma-gr6ck 2 ปีที่แล้ว

    very good , thanks

  • @diasflp
    @diasflp ปีที่แล้ว

    That's what she said. 😂

  • @excelinaccounting8094
    @excelinaccounting8094 4 หลายเดือนก่อน

    Hahaha thats what she said

  • @TimothyNyota
    @TimothyNyota 2 ปีที่แล้ว

    Subscribed!! Great content, man!!

  • @hozay6552
    @hozay6552 3 ปีที่แล้ว

    So many advances for the internet that I was not aware of!

  • @amsterdenko9854
    @amsterdenko9854 3 ปีที่แล้ว

    First time on your channel. Subscribed after this first video. I like your style of content delivery. Such a themes become much more entertantaining. Thank You!

  • @akashdeepbilkhu8076
    @akashdeepbilkhu8076 ปีที่แล้ว

    Amazing

  • @shah5364
    @shah5364 2 ปีที่แล้ว

    thanks

  • @sawza0313
    @sawza0313 5 หลายเดือนก่อน

    🎉👏🏼👏🏼👏🏼👏🏼👏🏼👏🏼

  • @abnan0001
    @abnan0001 4 ปีที่แล้ว +1

    Geodatabase related videos have been removed from your channel
    Could u please reupload then
    As the videos were helpful for us
    Thanks

    • @hnasr
      @hnasr  4 ปีที่แล้ว

      Muhammad Abnan hey Muhammed can you try again? Let me know..

    • @abnan0001
      @abnan0001 4 ปีที่แล้ว

      Hi
      It’s not there brother
      Last week I saw but since from afternoon I’m looking those
      But I cannot find it at all

    • @abnan0001
      @abnan0001 4 ปีที่แล้ว

      Nothing is there about geodatabase series and versioning related

    • @hnasr
      @hnasr  4 ปีที่แล้ว

      Muhammad Abnan Multi-User Geodatabase
      th-cam.com/play/PLQnljOFTspQWseiNSmOMgsR5lgugKg_KP.html

  •  4 ปีที่แล้ว

    What is difference HTTP1.1 persistent connection and H2 multiplexing?

    • @hnasr
      @hnasr  4 ปีที่แล้ว

      Both HTTP 1.1 and H2 have persisted connection. (They are not closed as long as requests are being sent)
      The difference is in H1.1 you can only send one request at a time and you can’t send another request until you get a response.. this is made slightly better with pipelining where you can send multiple requests in the same connection but the server must respond in order the requests where sent. This causes problems with proxies and bad implementations.
      So browsers in HTTP 1.1 opens multiple connections to get around this limitations.
      In H2 you can send any number of requests in the same connections in parallel. The reason is each request is uniquely identified with a streamid. So if we get a response we know what request it belongs to
      All of this is hidden from us programmers but its good to understand..
      Watch my HTTP/2 playlist here to learn more
      HTTP/2
      th-cam.com/play/PLQnljOFTspQWbBegaU790WhH7gNKcMAl-.html

  • @pawan29121991
    @pawan29121991 7 หลายเดือนก่อน

    Helllozzzz

  • @YineMiBen
    @YineMiBen 3 ปีที่แล้ว

    thanks youtube has 2x speed :)

  • @ahsannasir6214
    @ahsannasir6214 3 ปีที่แล้ว

    10:41 I see what you did there xD

  • @mageshp5998
    @mageshp5998 4 ปีที่แล้ว +1

    Liked your demo!!

  • @Esmi_here
    @Esmi_here 10 หลายเดือนก่อน

    It was so fun watching!!

  • @GauravJain108
    @GauravJain108 3 ปีที่แล้ว

    Thanks, Hussein! :)

  • @45xtc
    @45xtc 4 ปีที่แล้ว

    Thank a lot Hussein.one question?for example clent says keep alive and server response not keep alive.what does it happen in tcp connection?client will try to re establish again with 3 way handshake?

    • @hnasr
      @hnasr  4 ปีที่แล้ว +1

      If the server doesn’t support keepalive (which I will be surprised if it doesn’t means it is so old its 1997 or prior) the connection will be terminated after the response will be created.
      In http/2 the connection will be always kept alived

    • @45xtc
      @45xtc 4 ปีที่แล้ว +1

      ​@@hnasr thank you very much for you great content that you offer us!keep going

  • @apoorvamishra5952
    @apoorvamishra5952 3 ปีที่แล้ว

    how can we check if it's a 6 TCP connections in case of HTTP/1.1 in developers tool?

    • @hnasr
      @hnasr  3 ปีที่แล้ว +1

      ConnectionID, I illustrate this here th-cam.com/video/LBgfSwX4GDI/w-d-xo.html

    • @apoorvamishra5952
      @apoorvamishra5952 3 ปีที่แล้ว

      @@hnasr cool thanks!

  • @bharat639
    @bharat639 4 ปีที่แล้ว +2

    I have watched a lot of your videos. Thank you very much for sharing your knowledge.

  • @kaleemullah247
    @kaleemullah247 2 ปีที่แล้ว

    Loved the demo.

  • @Twerqt
    @Twerqt 4 ปีที่แล้ว

    Hey, that is a brilliant explanation.
    I have one question.
    How did you say at 18:40 that there are 6 TCP connections sending images in parallel .. I couldn't make it out from the video

    • @hnasr
      @hnasr  4 ปีที่แล้ว

      Siddartha Reddy Thanks 🙏 6 connections are opened in case of HTTP/1 In browsers i explain this here Why Browsers have 6 active TCP Connections for each website?
      th-cam.com/video/Xkr2nm6UPN8/w-d-xo.html

  • @Emmanuel-px9lk
    @Emmanuel-px9lk 4 ปีที่แล้ว

    Why does HTTP 1.1 use '6' TCP connections? Is it a technical reason it is 6 or is this just a common standard?

    • @hnasr
      @hnasr  4 ปีที่แล้ว +1

      kidsWillSeeGhosts why 6 in particular I think it was anecdotal evidence that more than 6 doesn’t give more performance but more TCP overhead..
      If you are asking Why H1 open many connections is to be able to send multiple requests in parallel (can’t do that in a single tcp connection) H2 allowed sending multiple requests in a single tcp connection using streams hope that helps 😊

    •  4 ปีที่แล้ว

      If a lot of multiple objects are loaded in parallel, each object will just compete for this limited bandwidth, so each object will load proportionally slower.
      Also clients might be able to open hundreds of connections, but few web servers will want to do that, because they often are processing requests for many other users at the same time. A hundred simultaneous users, each opening 100 connections, will put the burden of 10,000 connections on the server. This can cause significant server slowdown.

    • @Emmanuel-px9lk
      @Emmanuel-px9lk 4 ปีที่แล้ว

      @ Thanks

  • @maheshkariya
    @maheshkariya 3 ปีที่แล้ว

    Thanks 🙏

  • @treepiesinc1418
    @treepiesinc1418 4 ปีที่แล้ว

    good. thanks.

  • @smohammadhn
    @smohammadhn 3 ปีที่แล้ว

    Fantastic explanation, loved it

  • @masterali3270
    @masterali3270 4 ปีที่แล้ว

    انا رفيق علي احمد

  • @romantsyupryk3009
    @romantsyupryk3009 4 ปีที่แล้ว

    Amazing demo HTTP/1.1 and HTTP/2.0
    Thanks you very very very much.

    • @hnasr
      @hnasr  4 ปีที่แล้ว +2

      thanks Roman for all the love and comments!!!

    • @romantsyupryk3009
      @romantsyupryk3009 4 ปีที่แล้ว +1

      @@hnasr 😃😉

  • @matsematse9034
    @matsematse9034 4 ปีที่แล้ว

    can you make the videos in arabic too?

    • @hnasr
      @hnasr  4 ปีที่แล้ว

      matse matse I was considering making another channel as a test or at least include subtitles but it is a lot of work.

  • @masterali3270
    @masterali3270 4 ปีที่แล้ว

    مرحبا

  • @masterali3270
    @masterali3270 4 ปีที่แล้ว

    Hello

  • @suyashjain07
    @suyashjain07 3 ปีที่แล้ว

    time consuming video. could be made bit shorter.

  • @Shmancy_pants_69
    @Shmancy_pants_69 3 ปีที่แล้ว

    Hey noob question, how did you run that test on the image? that was cool. Please reply :-)

    • @hnasr
      @hnasr  3 ปีที่แล้ว +1

      It was a Python script I found online stackoverflow.com/questions/5953373/how-to-split-image-into-multiple-pieces-in-python