socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

QUIC support

Open yf-hk opened this issue 4 years ago • 2 comments

It would be super awesome if socket.io can use QUIC as one of its transport layers.

yf-hk avatar Jan 23 '21 02:01 yf-hk

That would be awesome indeed :+1:

Related:

  • https://github.com/nodejs/node/pull/32379
  • https://nodejs.org/api/quic.html

darrachequesne avatar Jan 25 '21 13:01 darrachequesne

Bad news:

  • the experimental support for QUIC was removed from Node.js: https://github.com/nodejs/node/pull/37067

Good news:

  • QUIC has been approved as RFC-9000: https://datatracker.ietf.org/doc/rfc9000/
  • a new implementation is being worked on: https://github.com/nodejs/node/pull/38233

darrachequesne avatar Jun 22 '21 21:06 darrachequesne

@darrachequesne just checking in — any new developments on the node support side (two years later)?

reececomo avatar Jun 21 '23 10:06 reececomo

@reececomo it's coming: https://github.com/socketio/engine.io/releases/tag/6.5.0

We'll use the @fails-components/webtransport package for now, until support lands on Node.js: https://github.com/nodejs/node/pull/44325

darrachequesne avatar Jun 21 '23 12:06 darrachequesne

WebTransport is now supported: https://github.com/socketio/socket.io/releases/tag/4.7.0

We'll add a guide to test it with a self-signed certificate in local environments (soon).

darrachequesne avatar Jun 23 '23 07:06 darrachequesne

Nice one @darrachequesne!

reececomo avatar Jun 26 '23 05:06 reececomo

The guide: https://socket.io/get-started/webtransport

Any feedback is welcome!

darrachequesne avatar Jul 04 '23 08:07 darrachequesne

That is awesome, great job!

Currently we're using geckos.io (WebRTC datachannel), and interested to see if QUIC/webtransport offers any performance improvement/reduces packet overhead.

reececomo avatar Jul 04 '23 12:07 reececomo

Might be interesting to see a side-by-side comparison between websockets and webtransport with a realtime game/sim (i.e. like @yandeu's here: https://www.youtube.com/watch?v=ZEEBsq3eQmg)

reececomo avatar Jul 04 '23 12:07 reececomo

WebTransport is now supported: https://github.com/socketio/socket.io/releases/tag/4.7.0

We'll add a guide to test it with a self-signed certificate in local environments (soon).

Awesome! Is it possible/planned to use datagrams instead of streams?

frabera avatar Jul 06 '23 16:07 frabera

  • https://caniuse.com/webtransport
  • https://caniuse.com/?search=quic (HTTP/3)

Interestingly Desktop Safari and a handful of mobile browsers say they support QUIC (HTTP/3) but not Webtransport. Not fully across the particulars here, we'll continue with WebRTC data channels in the meantime.

reececomo avatar Jul 20 '23 05:07 reececomo