Slides: HTTP/2 for PHP developers

Mattias Geniar, Monday, February 1, 2016

Last weekend I had the pleasure of speaking in the PHP & Friends room at FOSDEM, Brussels. The slides for my talk "HTTP/2 for PHP developers" are now available online at speakerdeck.

Embedded below:

I hope to be back next year!



Hi! My name is Mattias Geniar. I'm a Support Manager at Nucleus Hosting in Belgium, a general web geek & public speaker. Currently working on DNS Spy & Oh Dear!. Follow me on Twitter as @mattiasgeniar.


Share this post

Did you like this post? Will you help me share it on social media? Thanks!

Comments

svenn Monday, February 1, 2016 at 17:58 - Reply

Bad luck there is no spoken version. (although the presentation is clear, some pieces are missing) I have a few questions though :
– would straight out of the box nginx with default software (phpBB, wordpress, … that don’t implement any special headers) have advantages accepting/using http/2 ?
– I think Nginx and Apache use keepalive on by default, is this similar to sharding and the http/2 fix ?
– If a client doesn’t accept http2 how would the server react ? The compressed headers would give issues on client side ?
– I seen some Nginx configs referring http/1.1 where does that come in the story ?

Great presentation btw, I finally start getting all the fuss around http/2


    Mattias Geniar Monday, February 1, 2016 at 18:03 - Reply

    Bad luck there is no spoken version. (although the presentation is clear, some pieces are missing) I have a few questions though

    Well, there were recordings made at FOSDEM, I don’t know when/if they come online. If they ever do, they should come online in the H1308 room.

    would straight out of the box nginx with default software (phpBB, wordpress, … that don’t implement any special headers) have advantages accepting/using http/2 ?

    Yes.

    The site will not be optimised for HTTP/2, but it’ll benefit from the multiplexing and header compression straight away. If you’re already on TLS/HTTPS, enabling HTTP/2 should be a no-brainer.

    I think Nginx and Apache use keepalive on by default, is this similar to sharding and the http/2 fix ?

    Not really: keepalive is used to keep a connection open even if your page finished loading. That would make the next page you click to (which is within your $keepalive_timeout) load faster because the TCP/IP connection is already made.

    The browser will still close the TCP connection (even with HTTP/2) after all assets are loaded, unless keepalive is enabled.

    If a client doesn’t accept http2 how would the server react ? The compressed headers would give issues on client side ?

    A client needs to indicate that they support HTTP/2. That means that every connection will always start out as HTTP/1.1 and be upgraded to HTTP/2 if the client supports it. If the client doesn’t indicate compatibility, the connection will remain at HTTP/1.1 and no HPACK (header compression) will be used.

    I seen some Nginx configs referring http/1.1 where does that come in the story ?

    That’s an excellent question, I have no idea (yet). :-)

    Great presentation btw, I finally start getting all the fuss around http/2

    Cool, thanks!


      svenn Monday, February 1, 2016 at 22:25 - Reply

      I find allot of messages reporting about http/1.1 and keepalive, as I understood (my google experience) is that keepalive will keep the TCP connection open and hence resources can be requested w/o the initial TCP handshake (slow). Like CSS/javascript/… once the page is parsed, however the client will still only ask a single item over the TCP line at a time. Limited to 6-8 “TCP connection lines”. From your presentation http/2 can actually request multiple items over a single TCP line at a time (simultaneous), including the compressed header this would make a difference for large complex sites. I might be totally wrong, should test to be sure, anyways you have tricked my interest.

      Although I dislike referencing wikipedia, this seems to hit the spot : https://en.wikipedia.org/wiki/HTTP_persistent_connection


Leave a Reply

Your email address will not be published. Required fields are marked *

Inbound links