fastify icon indicating copy to clipboard operation
fastify copied to clipboard

QUIC implementation

Open aggarwaldev opened this issue 4 years ago • 16 comments

🚀 Feature Proposal

Implementation of QUIC ~~https://tools.ietf.org/html/draft-ietf-quic-transport-27~~

RFC: https://datatracker.ietf.org/doc/rfc9000/

More related RFCs:

  • https://datatracker.ietf.org/doc/rfc8999/
  • https://datatracker.ietf.org/doc/rfc9001/
  • https://datatracker.ietf.org/doc/rfc9002/

About QUIC:

  • https://dl.acm.org/doi/abs/10.1145/3098822.3098842
  • https://blog.cloudflare.com/the-road-to-quic/
  • ~~https://blog.cloudflare.com/http3-the-past-present-and-future/~~
  • https://www.researchgate.net/publication/318801580_QUIC_Better_for_what_and_for_whom

This shall pave way for implementation of HTTP/3 since HTTP over QUIC is proposed to be called HTTP/3. QUIC will likely be used for transporting more than just HTTP.

Motivation

  • The web is gaining a new protocol for communication (HTTP/3)
  • ~~Nodejs recently merged QUIC initial implementation with master branch. nodejs/quic#390~~ -- Implementation was removed: https://github.com/nodejs/node/pull/37067
  • ~~QUIC shall be essential for implementation of HTTP/3 and node is working hard on this: nodejs/node#23064~~ One should read this discussion, it's really interesting

Misc

  • New tracking issue: https://github.com/nodejs/node/issues/38478

QUIC will likely be used for transporting more than just HTTP.

This turned out to be true. Checkout WebTransport: https://datatracker.ietf.org/doc/draft-ietf-webtrans-http3/

Example

N/A

aggarwaldev avatar Jul 07 '20 11:07 aggarwaldev

A few interesting points: Fastify was the first framework for Node.js to support HTTP/2 and this was part of the initial idea of using our own custom Request and Reply objects. I was one of the devs that added HTTP/2 support on Node.js. I expect we add HTTP/3 support as soon as it lands on core. We have little to do here until that happens.

I would recommend you to join the discussion in core and see if you could help in implementing some of it.

cc @jasnell

mcollina avatar Jul 07 '20 12:07 mcollina

@mcollina Thank you so much for considering me. I would love to take this opportunity. Do let me know if you need any help

aggarwaldev avatar Jul 07 '20 13:07 aggarwaldev

i would also be happy if fastify is one of the first web frameworks for nodejs that support QUIC 👍 As I have seen, iOS 14 seems to have implemented QUIC experimentally.

1606B76F-AF10-43F0-8BFE-7ED1D5BCEB53

niklasgrewe avatar Aug 27 '20 19:08 niklasgrewe

@mcollina Node.js v15 (Current) supports QUIC.

Ref: https://github.com/nodejs/node/releases/tag/v15.0.0

aggarwaldev avatar Oct 22 '20 09:10 aggarwaldev

I'd be happy to review some (external) modules/plugins etc that can enable us to use QUIC/HTTP3 internally. There is no HTTP/3 in core, nor any binary of Node.js with Quic enabled.... because we need a patch on top of OpenSSL that they are not adding: https://www.openssl.org/blog/blog/2020/02/17/QUIC-and-OpenSSL/.

mcollina avatar Oct 22 '20 10:10 mcollina

@aggarwaldev ... The quic support in Node.js 15 is still under active development, is not yet officially supported, and still has a long way to go, not to mention the fact that it relies on an unofficial patch to openssl that is unsupported. I'm currently exploring a few options to move things forward, but, given that the Openssl omc has decided not to pick up official quic support until well after openssl 3.0 is out the door, it's going to take some time

jasnell avatar Oct 22 '20 12:10 jasnell

Suppose Node.js releases a final working quic with nothing experimental could fastify core benefit from Quic out of the box or will the api have to be exposed in a certain manner to benefit from it?

adminy avatar Dec 16 '20 15:12 adminy

Out of the box, no, there would need to be some work in fastify to enable it because it would be a different set of APIs. Once that internal work is done, however, for end users of fastify it should require nothing more than a configuration option.

jasnell avatar Dec 16 '20 15:12 jasnell

How is it looking as of today with QUIC?

flawnn avatar Aug 31 '21 20:08 flawnn

How is it looking as of today with QUIC?

Same as 9 months ago.

mcollina avatar Aug 31 '21 20:08 mcollina

Are the any behind the scenes happenings now that Node.js 17 uses OpenSSL 3.0? https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V17.md#openssl-30 - seems this can move forward? Edit: It is moving forward! More info here: https://github.com/nodejs/node/pull/38233

erulabs avatar Dec 15 '21 00:12 erulabs

Are the any behind the scenes happenings now that Node.js 17 uses OpenSSL 3.0? https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V17.md#openssl-30 - seems this can move forward? Edit: It is moving forward! More info here: nodejs/node#38233

Awesome, hope fastify will be first to use quic.

ivanjeremic avatar Mar 19 '22 08:03 ivanjeremic

hows this going?

mrinc avatar Jun 20 '23 17:06 mrinc

We need to wait this: https://github.com/nodejs/node/pull/44325

Eomm avatar Jun 20 '23 19:06 Eomm