Status of HTTP/2 support in Play 2.6 and beyond?

Hi!

I’m exploring the possibility of upgrading our inter-service API requests to HTTP/2, but after a survey of Play documentation it appears that H2 support is still a work-in-progress.

From what I can gather, it appears that Play v2.6 has experimental server-side support (HTTPS/TLS-only), and v2.7 might also allow H2 over plain HTTP (non-TLS). As for client-side, I haven’t been able to find any documentation on Play WS / HTTP Client support.

So in summary, it sounds like server-side is still experimental, and client-side isn’t yet implemented? Is there any sort of published roadmap/timeline?

(Also to be clear, I’m not complaining at all, I know it’s a lot of work to implement H2, just trying to understand the current state of things before continuing down the H2 path.)

1 Like

Mike,

I am at the same stage as you were in November. What did you end up doing? Did you find out any information from other sources?

thanks,
Brian

Hi Brian,

We ended up holding off on Play/H2 for now. I did not find any other information, but we’re waiting for H2 support to mature.

This isn’t a critical feature for us, as we’d only use Play/H2 for internal API communications (and potentially small performance boost), as our customer-facing traffic uses CDN-provided H2.

Hey @mparent61,

That is all correct. Play uses Akka HTTP to provide HTTP/2, so we will promote HTTP/2 to be a “supported” feature when Akka HTTP moves it from “preview” to “supported” as well.

Yes, play-ws does not supports HTTP/2. We cannot add it until we have support in the underlying library. As far as I know, OkHttp is a good alternative and it shouldn’t be hard to integrate it with Play.

Correct. And no, there is no roadmap to fully move HTTP/2 to “supported” level right now. What I would suggest is, use the server side implementation and if you run into bugs, report them to us. Having more people using it and giving us feedback about how it is working is part of the work necessary to mature HTTP/2 in both Play and Akka HTTP.

Thanks for the detailed feedback, @marcospereira.

Understood that community involvement will help push H2 support forward, and appreciate suggestion for OkHttp. Given the modest potential performance gain of H2 for our internal connections, realistically we’ll wait for async-http-client to support H2 instead of retooling for OkHttp. However, once that is supported, testing and providing feedback for Play H2 support is feasible!

1 Like

It seems like AsyncHttpClient has been “abandoned” according to this issue.