Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace TCP with QUIC in bindings #72

Open
gnarea opened this issue Nov 8, 2020 · 0 comments
Open

Replace TCP with QUIC in bindings #72

gnarea opened this issue Nov 8, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@gnarea
Copy link
Member

gnarea commented Nov 8, 2020

Executive summary

QUIC offers much better performance in a connection with a large latency by reducing the number of roundtrips, at the expense of slightly increased bandwidth for error correction purposes. This is the appropriate tradeoff in a Delay-Tolerant Network like Relaynet, so we should try to migrate to QUIC once its supported in all the third party dependencies used in Relaycorp's implementations. We should still support TCP for backwards compatibility.

The problem you're trying to solve

TCP and TLS handshakes require a series of roundtrips before the first byte is transmitted, which can be noticeable in a connection with a large latency. QUIC solves this issue by effectively "combining" the handshakes into one and doing fewer roundtrips (TLS 1.3 helps with the latter).

The solution you'd like

Migrate all bindings to QUIC, once all the dependencies below support QUIC:

  • Axios, or any other HTTP client for Node.js.
  • ws, or any other WebSocket client for Node.js.
  • Ktor, or any other HTTP/WebSocket client for the JVM and Android.
  • gRPC clients for Node.js and JVM/Android.
  • GCP loadbalancer frontends.
  • Cloudflare frontend servers.

We also need WebSocket itself to run over HTTP/3, but it doesn't even support HTTP/2 as of this writing. Alternatively, we could replace WebSocket with a generic or purpose-built L7 protocol.

We'll still support TCP for backwards compatibility, especially with public endpoints.

@gnarea gnarea added the enhancement New feature or request label Nov 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant