[Webtransport] QuicTransport vs Http3Transport

Luke Curley <kixelated@gmail.com> Mon, 03 August 2020 07:07 UTC

Return-Path: <kixelated@gmail.com>
X-Original-To: webtransport@ietfa.amsl.com
Delivered-To: webtransport@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 94D043A096C for <webtransport@ietfa.amsl.com>; Mon, 3 Aug 2020 00:07:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.198
X-Spam-Level:
X-Spam-Status: No, score=-0.198 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zP8Esr9lK_98 for <webtransport@ietfa.amsl.com>; Mon, 3 Aug 2020 00:07:33 -0700 (PDT)
Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 08A7A3A0BF0 for <webtransport@ietf.org>; Mon, 3 Aug 2020 00:07:33 -0700 (PDT)
Received: by mail-oi1-x235.google.com with SMTP id o21so11719760oie.12 for <webtransport@ietf.org>; Mon, 03 Aug 2020 00:07:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=of7JkJ9LbACkmo9F85Cm3YkQe5GR68TpzG80mk9Utn8=; b=A2cMaBHlNMrI2u9MA/9Q04YwhWtro+8nl6p0MShRdXlOmYJ1jIM1lxxy9/LdJavErH Wx2kZ5K7kJl9Oz2KB8FkePgPaySiVKz/8wg+zEeTP/APzbs8pUXS3voX+xIWfEFR046J NejhMTo8j/LYcVbUKAacZSgjRLHNG3tnC2xu8BrlCKh1gkI+cXlmYN5JqLmQdW0QLgCD X0q1zndJFy2Hpnw7npycQr1LoN01fvlp1cXPn80Z1fS9wGJkp+mJ3QRFUkU/2bpdq9sF n6FQ0d8rpaUjugoKbOzPR/UWF4HY+iXZbtro0BMdsLqWzaECkewhVrfJdoRyoC+r2+oK YoZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=of7JkJ9LbACkmo9F85Cm3YkQe5GR68TpzG80mk9Utn8=; b=OKJ4JIrgZmGqz/JOk20JMJN5sD273rg+RS/uTgbOVdf4JTM7ND3CebW6SdnkCCmwa5 a4ElSPeI8IyFOQd/ZeK0aGTty3lUieYgZrzCMxIi26oMtU/IQI5f5mg6vGoXzHEjbq5R YtJmv6ICPrWacLrRQ/x12yY1q8LAvTwfK53AN+O/35Wmf6k5ZgcOQRPnwp6qEGQIBxO3 OCxcHqBIGxTXvOtID9qKH84C8WGAHNUKFgflbTjp7XDwoODWjqcHq2GolHYS1ZBs4hIm ZKI8g0BCOWYUr+Z88u1CX6Q/iZ1DHvR0StADcEcFhrKyfT3u5T5L0mirpQXyHGNPP87C 1HCg==
X-Gm-Message-State: AOAM531s9f2XAHRI3ihtChNMP+n4kuLMFbDqqmhNOxYKu3r7MFWnDTF8 qXZ+q4e0WFD3PJQEv8KNJYZ8H3fqc38/+EFsKUD1hxHGKyU=
X-Google-Smtp-Source: ABdhPJzW9NNUiSHY81qBCbH404ZVb+tbd4bn7fB1dRM/SYkxLV7Fag7xmwNVFVFMsPGKkLVf9xsupR5o7hdxWji6cLI=
X-Received: by 2002:aca:806:: with SMTP id 6mr10984712oii.168.1596438451934; Mon, 03 Aug 2020 00:07:31 -0700 (PDT)
MIME-Version: 1.0
From: Luke Curley <kixelated@gmail.com>
Date: Mon, 03 Aug 2020 00:07:24 -0700
Message-ID: <CAHVo=ZmQ2DquU==kxAD2Rp5iBbLMBJwXzskKOwL3eS3B2tzREA@mail.gmail.com>
To: webtransport@ietf.org
Content-Type: multipart/alternative; boundary="000000000000d5581305abf3ca86"
Archived-At: <https://mailarchive.ietf.org/arch/msg/webtransport/O8P5nmmw0ywra1VWtJmS4lBglhI>
Subject: [Webtransport] QuicTransport vs Http3Transport
X-BeenThere: webtransport@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <webtransport.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webtransport>, <mailto:webtransport-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/webtransport/>
List-Post: <mailto:webtransport@ietf.org>
List-Help: <mailto:webtransport-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webtransport>, <mailto:webtransport-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 03 Aug 2020 07:26:47 -0000

Hey folks, I'm Luke and I'm a tech lead at Twitch/Amazon. Apologies for
creating a new thread... I have no idea how to reply to an existing thread
after recently subscribing.

I'm not able to delve into specifics until it's announced/released in a few
months, but I've been working on a new technology that leverages
QuicTransport in a big way. I'm now in a position to be proactive about
standards and we may even release and attempt to standardize what I've been
working on!


I do agree that standardizing and implementing all of the transports is
excessive. It's good to accommodate future transports, but we don't want a
fragmented standard either.


*Http2Transport*
Let's start with the easy one. Http2Transport is not an option for
Twitch as we're using QUIC to avoid head-of-line blocking (just like
HTTP/3). There's very few reasons to use Http2Transport when compared to
WebSockets, so it's difficult to justify it as a new standard.


*QuicTransport *
My favorite part of the HTTP/3 specification is that QUIC is a stand-alone
network protocol. QUIC is astonishingly better than TCP+TLS when an
application or protocol is designed around the relatively simple API. I
absolutely believe that QUIC will gain widespread usage outside of HTTP/3
and I'm already doing my part. If that's the case, then exposing the QUIC
API via QuicTransport will enable developers to leverage QUIC-based
protocols in a web environment.

I agree that the path/origin handshake is primarily designed for HTTP, but
alone it's not a compelling reason to pull in the entire HTTP/3 stack.
Also, an origin mismatch should return a custom "wrong origin" error code
when closing the connection. I would possibly even put the path/origin into
the TLS transport parameters, so the connection can be rejected early and
the application no longer has to buffer waiting to process the handshake
stream.

The other issue mentioned is not being able to support multiple
QuicTransport sessions on a single connection. Connection reuse was
definitely a problem with TCP, as you needed multiple connections to avoid
head-of-line blocking and it took 3/4 RTTs for each connection (depending
on the TLS version). However with QUIC, there's really no excuse to make a
new HTTP/3 or QuicTransport connection (requests/streams are multiplexed)
and even then, it only takes 0/1 RTTs to establish a new connection.


*Http3Transport*
I think it's cool that Http3Transport follows in the successful footsteps
of WebSockets. The ability to downgrade a HTTP/1.1 connection to TCP is
very clever and relatively simple to implement. However, WebSockets became
more convoluted with HTTP/2's multiplexing and have still not yet been
implemented. WebTransport is even more complicated due to the additional
support of unidirectional streams and datagrams. It's no longer a
"downgrade" like HTTP/1.1 to WebSocket but a complex mapping from HTTP/3 to
QUIC.

And ironically, the issues I see with Http3Transport are primarily due to
supporting multiple protocols and sessions on a single connection. Here's a
few quick concerns I have after reading the RFC:

   1. The HTTP/3 layer needs to be modified in subtle and non-backwards
   compatible ways. This will primarily break load balancers unless they are
   WebTransport aware.
   2. STREAM frames cannot be associated with a protocol or session until
   the first bytes have arrived for all prior stream IDs. This makes
   per-application and per-session flow control difficult, and would prevent
   Http3Transport from creating or accepting streams in order.
   3. RESET_STREAM frames cannot be mapped to a protocol or session for a
   stream ID unless the first bytes have been received. This prevents empty
   streams from being closed until the first HTTP/3 frame has been
   acknowledged.

Finally, there's an argument that people are going to run HTTP/3 servers,
so we should just use Http3Transport. it's actually significantly easier
for a HTTP/3 to accept a QuicTransport connection (switch based on ALPN)
than it is to support Http3Transport (custom frames and session mapping).


*Conclusion*
So yeah, I think that we absolutely support the simple-yet-powerful
QuicTransport. If there's a compelling reason to support multiple
transports on a single connection, then Http3Transport (or a
QUIC extension) is an option. And finally, I don't see any reason for
Http2Transport to exist.