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

Add HTTP/3 support #38595

Closed
AlvaroVasconcelos opened this issue Sep 26, 2019 · 51 comments
Closed

Add HTTP/3 support #38595

AlvaroVasconcelos opened this issue Sep 26, 2019 · 51 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue library-io P2 A bug or feature request we're likely to work on triaged Issue has been triaged by sub team type-enhancement A request for a change that isn't a bug

Comments

@AlvaroVasconcelos
Copy link

I searched for an issue to track progress of implementing HTTP/3 in the standard library but couldn't find one, so I'm opening this new issue to track this (presumably inevitable) effort.

@lrhn lrhn added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io type-enhancement A request for a change that isn't a bug labels Sep 27, 2019
@iapicca
Copy link

iapicca commented Oct 20, 2020

@irhn
given that

What are the plans for Dart's implementation?
Will it be a separate package like http2 or grpc?
Any timeline for a release?

@mraleph
Copy link
Member

mraleph commented Oct 20, 2020

There are currently no plans (or bandwidth) to implement HTTP/3 support as either builtin dart:io feature or even as a package.

@lrhn do you think we should maybe close this as not planned to reflect the current thinking around dart:io and networking package priorities?

/cc @mit-mit @a-siva

@lrhn
Copy link
Member

lrhn commented Oct 20, 2020

Not sure closing is the right thing to do. When HTTP/3 becomes a stable standard, we will most likely have to implement it.
We are just not going to be riding the bleeding edge and implement the draft specification.
It's unlikely that there will be any clients or back-ends which will be HTTP/3 only, so falling back on HTTP/2 is a valid option.

So, keeping this open as a place where people needing the feature can weigh in, but with no near-time plans to do an implementation in Dart.
It's a non-trivial piece of networking code, especially for the server code, so we'll have to ensure we have someone qualified to implement it when the time comes. At that time, we can figure out whether we want it in a separate package or not.

@gargakshit
Copy link

What about the quic protocol in general, apart from HTTP/3?

@lovung
Copy link

lovung commented Dec 1, 2020

There have already had https://tools.ietf.org/html/draft-ietf-quic-transport-32. It's a really nice package that the Dart SDK should have.

@iapicca
Copy link

iapicca commented Jul 2, 2021

@lrhn
this feature request could help implementing the feature

@flawnn
Copy link

flawnn commented Aug 29, 2021

Any update on this? I'd really want to use QUIC with my application. Isn't it a bit overdue for such a cutting-edge framework like Flutter to implement this?

@mraleph
Copy link
Member

mraleph commented Aug 29, 2021

@flawnn

Nothing has changed since #38595 (comment)

If you want to use QUIC just bind to a library that implements it (e.g. cronet, see https://github.com/google/cronet.dart).

@Mehmetyaz
Copy link

Mehmetyaz commented Dec 30, 2021

@lrhn @mraleph

I see there is no update.

I'm developing a back-end framework (There is not enough documentation yet. Sorry about that). Also, a library with various easy codes for Flutter (or any client).

Not ready yet. But I want to offer http2 and http3 support when ready. In this context, when I examine the drafts, I think I can do it with native dart even if it takes a long time (a quic and an http3 package). For this, I will need to find developers I can collaborate with.

Knowing whether the Dart team will be working on http3 in the current or (short or medium term) future is important so that my efforts are not wasted.

@zs-dima
Copy link

zs-dima commented Dec 30, 2021

@lrhn @mraleph
It is good time to introduce HTTP/3 support for the Dart and Flutter

@mraleph
Copy link
Member

mraleph commented Jan 3, 2022

I believe that nothing has changed here: we still have no bandwidth to provide http/3 implementations in the core SDK.

I strongly believe that HTTP3 protocol implementation should be implemented in package, contributed and maintained by the community.

@esenmx
Copy link

esenmx commented Feb 23, 2022

I believe that nothing has changed here: we still have no bandwidth to provide http/3 implementations in the core SDK.

I strongly believe that HTTP3 protocol implementation should be implemented in package, contributed and maintained by the community.

Since http3 support for gRPC(grpc/grpc#19126) and nodeJs(nodejs/node#38478) on the way, I think it's time to increase priority for this feature.
Also, probably very few people in community has network programming experience since Flutter itself is an UI framework, some internal wiggling from Google would be very nice, otherwise chances are high we won't have this feature for a long time.

@a-siva
Copy link
Contributor

a-siva commented Feb 24, 2022

/cc @brianquinlan

@robbecker-wf
Copy link

HTTP/3 was standardized as RFC 9114.
Already supported in Edge, Firefox, and Chrome in version 101.
And the best news
Amazon CloudFront is scheduled to be the first AWS service to integrate s2n-quic with its support for HTTP/3 in 2022.

@khteh
Copy link

khteh commented Jul 2, 2022

+1

@marwenbk
Copy link

it's sad to see Flutter which is known for "Cutting edge technology" be one of the last framework to join the QUICK protocol

@aospiridonov
Copy link

@marwenbk
Just now, have cronet (https://pub.dev/packages/cronet) but they have bug, but if the authors update the version, then the rules will be. I hacked with rebuilding what was needed.

Additional pub cronet with grpc (https://pub.dev/packages/grpc_cronet)

@brianquinlan
Copy link
Contributor

cupertino_http is a new experimental Flutter plugin that provides access to Apple's Foundation URL Loading System - which has HTTP/3 support

cupertino_http has the same interface as package:http Client so it is easy to use in a cross-platform way. For example:

late Client client;
if (Platform.isIOS) {
  final config = URLSessionConfiguration.ephemeralSessionConfiguration()
    # Do whatever configuration you want.
    ..allowsCellularAccess = false
    ..allowsConstrainedNetworkAccess = false
    ..allowsExpensiveNetworkAccess = false;
  client = CupertinoClient.fromSessionConfiguration(config);
} else {
  client = IOClient(); // Uses an HTTP client based on dart:io
}

final response = await client.get(Uri.https(
    'www.googleapis.com',
    '/books/v1/volumes',
    {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'}));

I would really appreciate it if you can try cupertino_http out.

Comments or bugs in the cupertino_http issue tracker would be appreciated!

@brianquinlan
Copy link
Contributor

Hey, would those of you who want HTTP/3 support briefly explain what HTTP/3 features are important to you e.g. QUIC (to provide better multiplexing), better header compression, etc.?

Thanks!

@Jure-BB
Copy link

Jure-BB commented Aug 13, 2022

Hey, would those of you who want HTTP/3 support briefly explain what HTTP/3 features are important to you e.g. QUIC (to provide better multiplexing), better header compression, etc.?

Thanks!

  • QUIC to improve response times when requesting resources over larger geographic distances and less reliable networks
  • 0-RTT QUIC to lower the number of round trips required to establish a secure TLS connection with the server

@a-siva a-siva added triaged Issue has been triaged by sub team and removed library-io-triaged labels Dec 20, 2022
@SamuelMauricioL
Copy link

Are there plans to support http3?

@fisforfaheem
Copy link

Any updates on plans to support QUIC protocol HTTP/3

@CristovoXDGM
Copy link

Are there plans to support http3?

@brianquinlan
Copy link
Contributor

package:cronet_http

@brianquinlan is there any plan for a non-flutter implementation?

Not in the short term. What's your use case @iapicca ?

@iapicca
Copy link

iapicca commented Apr 4, 2023

@brianquinlan is there any plan for a non-flutter implementation?

Not in the short term. What's your use case @iapicca ?

@brianquinlan
literally any attempt to build a backend in dart using http3

@brianquinlan
Copy link
Contributor

@iapicca I meant:

  1. do you need HTTP/3 for outbound connections, inbound connections or both?
  2. what platform are you deploying to?
  3. what HTTP/3 features to do you need e.g. server push?

And any other details that you can provide.

@iapicca
Copy link

iapicca commented Apr 4, 2023

@brianquinlan

  1. do you need HTTP/3 for outbound connections, inbound connections or both?
  2. what platform are you deploying to?
  3. what HTTP/3 features to do you need e.g. server push?
  1. both, I miss the value of a "one-direction" connection
  2. AT THE VERY LEAST being able to build a http3 server in multi-stage linux container,
    but I don't see why we should intentionally sabotage flutter desktop and web
    not sure if anyone actually uses osx/win server anywhere (and why!?)
  3. I would like for me and other developers to be able to build
    a backend and connect it to an app (whatever the platform)
    with ALL the http3 feature available

what I would NOT do

// ignore_for_file: double_negatives
  • do not ignore flutter web with dart:io based implementation
  • do not ignore flutter desktop with mobile based implementations
  • do not ignore pure dart / backend use case with mobile based implementations

what would I do

@brianquinlan
Copy link
Contributor

@iapicca

The reason why there are multiple HTTP client implementations is because there are multiple use cases. For example:

The idea behind pluggable HTTP clients is that you can chose the client that best suites your needs and the client in dart:io is a lowest-common-denominator that is supportable everywhere (except the web) but reasonably simple.

Also, if we build nghttp3/cronet/quiche into the Dart VM, then every Dart user will pay the price in terms of disk usage.

I also thing that this model is pretty common - Python, Java, Node, etc. have multiple HTTP client implementations. Even the official android documentation points to multiple implementations.

@iapicca
Copy link

iapicca commented Apr 7, 2023

The reason why there are multiple HTTP client implementations is because there are multiple use cases. [...]

@brianquinlan
I didn't mean to tell dart team what to implement and how,
I'm sure that there are good reason for the decisions that are taken

my point is solely that a mobile ONLY implementation is less than ideal
both for flutter development and backend development

lastly, an option that I haven't mention is a pure dart implementation
that doesn't require binding to existing native libraries
(I know it's a tall order, but should be taken in consideration as a option)

@Reprevise
Copy link

4 years and still no progress on this issue. HTTP/3 is growing in popularity and Dart needs to implement this. A http3 package solution is completely fine like what was done with http2.

Can we get an update from the Dart team? It's been 6 months since there's been any activity in this issue.

@mraleph
Copy link
Member

mraleph commented Oct 24, 2023

@Reprevise

Can we get an update from the Dart team?

The update is the same as before: the core team bandwidth is severely limited and we encourage community to step up and own pieces like this. If nobody steps up then most likely there will never be a http3 implementation - I know this might sound disappointing but that's the reality we are living in right now.

We have tried to fill the client capabilities by providing pluggable HTTP clients, like package:cupertino_http and package:cronet_http (see @brianquinlan posts). As I understand it - these client libraries have HTTP/3 support.

We have currently neither plans nor bandwidth to provide a HTTP/3 server implementation.

With native assets feature coming together it will become easy to create and distribute cross-platform Dart packages which depend on native libraries.

@a-siva a-siva added the closed-not-planned Closed as we don't intend to take action on the reported issue label Feb 23, 2024
@a-siva
Copy link
Contributor

a-siva commented Feb 23, 2024

Closing issue as not planned.

@a-siva a-siva closed this as completed Feb 23, 2024
@vukitoso
Copy link

Who is using what solutions now as an HTTP/3 server and client?

@fisforfaheem
Copy link

Iot device s

@vukitoso
Copy link

Iot device s

What library do you use as an HTTP/3 dart server/client?

@ugran
Copy link

ugran commented Aug 31, 2024

What about webtransport usecase?

@h3x4d3c1m4l
Copy link

I think a solution based on Flutter Rust Bridge and a proven HTTP library (e.g. reqwest) could provide a viable solution here for all platforms. The API could simply implement dart:io's HttpClient.

@fisforfaheem
Copy link

Nice to hear, But this should be endorced

@sabin26
Copy link

sabin26 commented Sep 2, 2024

I think a solution based on Flutter Rust Bridge and a proven HTTP library (e.g. reqwest) could provide a viable solution here for all platforms. The API could simply implement dart:io's HttpClient.

https://pub.dev/packages/rhttp

@iapicca
Copy link

iapicca commented Sep 2, 2024

I think a solution based on Flutter Rust Bridge and a proven HTTP library (e.g. reqwest) could provide a viable solution here for all platforms. The API could simply implement dart:io's HttpClient.

https://pub.dev/packages/rhttp

it's a great idea, but it's "flutter-only"
at the time of writing doesn't allow to create a server

@vukitoso
Copy link

vukitoso commented Sep 2, 2024

at the time of writing doesn't allow to create a server

For an HTTP3/QUIC server, it may be better to use more highly specialized software: nginx, haproxy, Tengine, Caddy, Traefik, Envoy, Angie. Add request proxying with any other settings, such as balancing, request filtering, etc. In addition, you can add larger services such as Cloudflare and others. Those. installing your HTTP3 server on an external connection is becoming less relevant.
This is just my opinion.

@Tienisto
Copy link
Contributor

Tienisto commented Sep 2, 2024

I agree that a backend (that receives requests) should mostly exposed indirectly with nginx or any other software in the middle. Especially when it comes to letsencrypt, it is so much easier and safer to work with nginx.

This does not solve the issue of making (not receiving) requests in backend though.

@khteh
Copy link

khteh commented Sep 2, 2024

I disagree with the idea of terminating all the load balancer. Doesn't this end all the benefits that HTTP/2 or HTTP/3 brings about at the load balancer and the last-mile traffic suffers from the depreviation of those benefits and become the bottleneck, deceiving the end-users of "HTTP/2" / "HTTP/3" connectivity?

@vukitoso
Copy link

vukitoso commented Sep 2, 2024

@khteh

the last-mile traffic suffers from the depreviation of those benefits and become the bottleneck

Here's a picture of how my proposed option works, where all servers are located on the same local network and in the same data center. Because Since all servers are located in the same data center, the delay between them will be minimal 1ms or less. You won't notice the difference at all. But users already communicate with the server via HTTP3/QUIC with all its advantages.
I don't see a bottleneck. Unless you show performance tests where this bottleneck is clearly visible. Without measurements it is difficult to talk about a narrow neck.
2024-09-02_15-59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue library-io P2 A bug or feature request we're likely to work on triaged Issue has been triaged by sub team type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests