Discussion:
HTTP/3
Daniel Stenberg via curl-library
2018-11-20 22:13:31 UTC
Permalink
Hi friends,

I hope most of you have noticed that the other day it was decided the next
version of HTTP will be named HTTP/3 [1] (and it will be performed over QUIC
instead of TCP, but that was known since before).

I've started on a "HTTP/3 explained" document [2] with the aim of explaining
these new protocols (HTTP/3 and QUIC). The fundamentals are there and you can
read it already and it should give you a decent first grasp, but it certainly
isn't complete yet. I will gracefully appreciate comments, bug reports and
improvements!

HTTP/3 (h3 for short) is done over QUIC instead of TCP and it opens up
interesting new challenges for clients, and one of them is how to learn that a
site supports it and then when to use h3 instead of h2 or h1. Servers will
inform clients about their "h3 abilities" using the Alt-Svc response header
[3] and the client can then connect with QUIC and do h3 requests instead.

For curl to speak h3 in the same manner as the browsers will, curl then needs
to understand Alt-Svc headers as well and will need a few new ways to control
this behavior in the API. I've started to collect some thoughts around how
this should or could work for applications [4].

I have not yet started to actually write any code for h3 or quic support in
curl. I plan to base that work on the ngtcp2 library [5], which only does quic
so far. Possibly the h3 layer will then be done using the nghq library [6] (hq
being the old name for h3) but this library is currently a bit behind the
latest h3 drafts...

QUIC and HTTP/3 are scheduled to be "done" by July 2019.

It's a great time to be alive!

[1] = https://daniel.haxx.se/blog/2018/11/11/http-3/
[2] = https://daniel.haxx.se/http3-explained/
[3] = https://tools.ietf.org/html/rfc7838
[4] = https://github.com/curl/curl/wiki/QUIC-implementation
[5] = https://github.com/ngtcp2/ngtcp2
[6] = https://github.com/bbc/nghq
--
/ daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mai
Vipin P R via curl-library
2018-12-10 05:52:37 UTC
Permalink
Thanks for the detailed info
I am going to proceed with the next steps for development.
I'll parallely go thru the details of tcp2 and http3 to understand what the
ngtcp2 library does.
going to start actual coding by end of week once i am clear on the
theoretical side.
Sincerely,
Vipin P.R.
I want to start contributing to HTTP/3 development. This is my first
open
source project I am undertaking. Can u guide me on this, where to start.
Absolutely.
First: welcome and thanks for wanting to help out! This is still early
days
with only the first stumbling attempts in place.
https://github.com/curl/curl/tree/ngtcp2
The 'docs/HTTP3.md' file in there should document the status of the branch
and
how to build it and test it. PR #3314 is also a good place if you want to
comment/discuss some h3 related details.
I've made the code build with both ngtcp2's master branch as well as the
draft-15 branch. It seems the draft-15 one is the more bleeding edge code.
I've worked the last week or so to get code added to make a first QUIC
connection when --http3-direct is used. See lib/quic.c and
lib/quic-crypto.c.
I've based my code heavily on the ngtcp2 example code client.cc since
there
aren't any actual documentation for ngtcp2 yet.
The branch builds and tests fine without ngtcp2, which is what I'm trying
hard
to make sure. This way, we can merge this work early and only have it
affect
the experimental builds that actually enable QUIC.
Start checking that we're using ngtcp2 correctly and add logic to libcurl
to
make sure that QUIC connection is made to work (primarily against ngtcp2's
own
test server).
This is pretty tricky work since ngtcp2's API is very QUIC/TLS-centric and
will probably require some insights in the protocols to fully grasp, and
of
course comparing with what the client.cc code does in the comparable
scenario.
I might also ask Tatsuhiro (lead dev of ngtcp2) to give it a look and
perhaps
help us out a bit once that's deemed suitable.
Since nghq still isn't doing HTTP/3 (and neither is ngtcp2), there's also
the
question how we should proceed and work on HTTP/3 support once we get the
QUIC
connection worked out. There's clearly a few missing pieces here that we
need
to join in and help make happen, but I'm not currently sure what the best
steps are to do this.
If you have any questions or feedback, take them here or in the PR!
--
/ daniel.haxx.se
Loading...