DEV Community

Discussion on: Is HTTP/2 really worth it?

Collapse
 
rhymes profile image
rhymes

Not really, being incompatible means a lot of stuff needs to be taken into account.

Rails doesn't really support http/2 for example, unless you put assets on http/2 enabled CDN and proxy the server. Heroku, server destination for many devs, doesn't support http/2

The issue is that by using just the CDN you need to change your pipeline because deploying a single merged JS file as most HTTP/1.1 apps do is not an advantage with HTTP. Also you don't get server pushes and other features.

The situation isn't that great in Python's land either.

Go's webserver enables HTTP/2 by default

Thread Thread
 
david_j_eddy profile image
David J Eddy

Ah, so it is the web server (Puma) not the framework (Rails) that does not support HTTP/2. Bummer. Maybe use a Nginx proxy w/ HTTP/2 in front of a Passenger web server. Might do the trick.

Sounds like HTTP/2 in dev. is a no go for now in this situation. I would still push got HTTPS in dev. 'cause security.

Thread Thread
 
rhymes profile image
rhymes

Ah, so it is the web server (Puma) not the framework (Rails) that does not support HTTP/2

Yes you can proxy with a HTTP/2 web server but you have to terminate the HTTP/2 connection at the proxy.

Rack (the underlying specification/interface) was designed for HTTP/1.1.

The good news is that they recently implemented early hints in Rails 5.2 and Puma

Python has a similar problem with WSGI based web servers.

Sounds like HTTP/2 in dev. is a no go for now in this situation. I would still push got HTTPS in dev. 'cause security.

What do you mean?

Thread Thread
 
david_j_eddy profile image
David J Eddy

Blurry eyed mornings :|.

Thank you for the info. about Rails. Something I was not aware of. Nice that the up coming 5.2/Puma release will address this short coming. I look forward to reading up on it.