Fork me on GitHub
#ring
<
2024-05-09
>
TJ Campanella13:05:37

Does ring jetty support http 2 and if so how do you enable it?

TJ Campanella13:05:29

For one of my sites lighthouse is complaining about the use of http 1.1 so i'm just curious if there is an easy fix for that.

TJ Campanella13:05:12

I found the issue it was nginx that was not using http2 I changed that and it worked nvm.

weavejester14:05:23

No, not yet, but https://github.com/sunng87/ring-jetty9-adapter does, I believe. However, most of the time Ring Jetty will be running behind a load balancer or some kind of reverse proxy like nginx that will support HTTP2.

TJ Campanella14:05:26

Yeah that is the case in my setup so nginx now does http2 and then proxies requests to jetty via http 1.1. Thanks for the link I will check that out as well

weavejester14:05:26

It's worth noting that nginx doesn't support HTTP2 on the server it proxies to, so even if Ring Jetty had HTTP2, nginx wouldn't be able to use it.

TJ Campanella14:05:43

Ok thanks the main thing for us was configuring nginx to use http2 for the external requests, that significantly increased all our lighthouse scores.