question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It would be nice to start planning support for HTTP/3. aioquic provides a sans-I/O API for HTTP/3 similar to h2 which would make such an integration possible.

The main hurdle is that the connection model is very different to HTTP/1.1 and HTTP/2 : we cannot simply establish a (reader, writer) pair over a TCP connection and pass this to the protocol layer. Between the HTTP/3 layer and the UDP transport, we have a QUIC layer which returns (datagram, addr) tuples indicating where datagrams need to be sent:

https://aioquic.readthedocs.io/en/latest/quic.html#aioquic.quic.connection.QuicConnection.datagrams_to_send

Note that the destination address may change during the connection’s lifetime, for example in response to receiving a PreferredAddress from the server during the TLS handshake.

In order to provide a first demonstration, @tomchristie suggested I write a dispatcher which makes use of aioquic’s HTTP/3 support. The code is still a bit rough, but it works:

https://github.com/aiortc/aioquic/blob/master/examples/httpx_client.py

This can be run as:

python examples/httpx_client.py https://cloudflare-quic.com/

See also https://github.com/encode/httpcore/issues/173

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:46
  • Comments:37 (16 by maintainers)

github_iconTop GitHub Comments

4reactions
unixfoxcommented, Mar 25, 2022

Bump, still relevant.

2reactions
jlainecommented, Jun 17, 2022

were your servers local or on the cloud handling hundreds, possibly thousands of requests per second sir? the post requests made is to a solana rpc.

perhaps I am doing something wrong.

The servers were distant, the results I mention are runs of aioquic’s interop suite against a variety of servers, and the acceptance criterion is that the time to download 5MB and 10MB files over HTTP/3 must no more than 10% over HTTP/1.1 or HTTP/2 (using httpx). I’m not sure the server’s load is relevant here as we are talking about client performance.

I don’t think you’re doing anything wrong, there are definitely some reports of initial connection time outliers using aioquic, which can kill the measured performance. I haven’t managed to debug these cases yet but I do believe they are fixable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP/3 protocol | Can I use... Support tables for HTML5, CSS3 ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >
HTTP/3 - Wikipedia
HTTP/3 is supported by 75% of web browsers (and 83% of "tracked desktop" web browsers), and 26% of the top 10 million websites....
Read more >
Cross Browser Compatibility Score of HTTP/3 protocol
HTTP/3 protocol shows a browser compatibility score of 50. This is a collective score out of 100 to represent browser support of a...
Read more >
HTTP/3: the past, the present, and the future
We are excited to support HTTP/3 and allow our customers to experiment with it while efforts to standardize QUIC and HTTP/3 are still...
Read more >
What Is HTTP/3 - Lowdown on the Fast New UDP-Based ...
Web Browser Support for HTTP/3 ... On the web browser front, Chrome v87, Firefox v88, and Edge v87 all have HTTP/3 enabled by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found