pekko-http icon indicating copy to clipboard operation
pekko-http copied to clipboard

http/3 support

Open pjfanning opened this issue 2 years ago • 3 comments

Relates to https://github.com/akka/akka-http/issues/3692

  • not an issue that has been mentioned in pekko discussions before (afaik)
  • if anyone wants to have a look then this might be a useful enhancement

pjfanning avatar Sep 12 '23 15:09 pjfanning

This basically means a rewrite of the complete backend, including

  • TCP (QUIC reimplements many TCP algorithms on top of UDP)
  • TLS (QUIC does not stack on top of existing TLS infrastructure but more tightly integrates it, which makes it incompatible with the existing JVM TLS infrastructure)
  • multiplexing (QUIC supports multiple streams in the same "connection")
  • and parts of the HTTP layer (HTTP/3 reuses part of HTTP/2 but integrates it differently)

It would be nice to have but this is an effort that basically would at least double the size of the backend implementation. In the best case, some of the layers could reuse available third-party components (TLS, transport layer) so that a first implementation could focus on the more HTTP-related parts.

jrudolph avatar Sep 18 '23 12:09 jrudolph

For triaging it would be good to gather good motivation about why to do this in the first place. Also, whether client or server side might be more important.

In some way, it might be more interesting to implement QUIC as a general, low-latency, multiplexing connection solution, than HTTP/3 which is used mostly in communication between browsers and servers. Most backend servers are deployed behind a reverse proxy where HTTP/3 in the upstream backend server itself might be less of a requirement.

jrudolph avatar Sep 18 '23 12:09 jrudolph

For triaging it would be good to gather good motivation about why to do this in the first place. Also, whether client or server side might be more important.

In some way, it might be more interesting to implement QUIC as a general, low-latency, multiplexing connection solution, than HTTP/3 which is used mostly in communication between browsers and servers. Most backend servers are deployed behind a reverse proxy where HTTP/3 in the upstream backend server itself might be less of a requirement.

That's a good point about reverse proxies (eg nginx). With the right network security topology, you could terminate the http/3 connection at the reverse proxy and forward plain http traffic to the pekko-http backends.

Users could also consider using Web Sockets if they want to avoid the overhead of separate HTTP(S) requests.

pjfanning avatar Sep 18 '23 13:09 pjfanning