HTTP/2 is released and supported by all major browsers. There are implementations shipping in major web servers like Apache and nginx.
But for us Rubyists, the choices are currently quite limited, it seems. Once upon a time (Dec 2014), Aaron Patterson was exploring ideas for supporting HTTP/2 in Rack 2.0, but that hasn't yet materialized. He's also posted a few gists with possibilities for Puma and WEBrick. That's all I've managed to find.
My question is, broadly: if I am interested in using HTTP/2 in a Rails app, what options exist, which features of HTTP/2 do they include, and are any of them ready for production?
In browsers, HTTP/2 is supported by the most current releases of Edge, Safari, Firefox and Chrome. Other browsers based upon Blink will also support HTTP/2 (e.g., Opera and Yandex Browser).
Browser Compatibility: HTTP/2 is compatible with almost all browsers and is backward compatible with previous protocol versions like HTTP/1.1.
If you want to claim to support HTTP/2 for its own sake, you can just run NGinX with HTTP/2 and use a Ruby backend, roughly as normal (https://www.nginx.com/blog/how-nginx-plans-to-support-http2/). That won't give you HTTP/2-specific features like pushing assets from the server without a client request, though.
I believe it will give you the basic HTTP/2 feature you care about, multiple requests per connection (no slow-start) and muxing on a connection (don't need multiple connections.)
So that's nice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With