[Webtransport] Choosing the Transport

Victor Vasiliev <vasilvv@google.com> Wed, 22 July 2020 21:23 UTC

Return-Path: <vasilvv@google.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 C9D9F3A09D7 for <webtransport@ietfa.amsl.com>; Wed, 22 Jul 2020 14:23:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.599
X-Spam-Level:
X-Spam-Status: No, score=-17.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 E7ZirKpq2s4M for <webtransport@ietfa.amsl.com>; Wed, 22 Jul 2020 14:23:31 -0700 (PDT)
Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (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 3F3813A09D1 for <webtransport@ietf.org>; Wed, 22 Jul 2020 14:23:31 -0700 (PDT)
Received: by mail-lj1-x22a.google.com with SMTP id s9so4050794ljm.11 for <webtransport@ietf.org>; Wed, 22 Jul 2020 14:23:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=6Rrj7rLCqDH8kfJOQSZYV2gCxySKXIv1e4nKQmqZXqk=; b=d6YJdplyJ1wOvjDemz+9qPC97wOlPOqaDGPhAe/eRFdaNgnbziK4RmFbhJMs1p7+21 8z6JhlEChvZCUJIu4Fg/tNMOCH2vCf8nUXv8D53bPe6eC3TLh8LVK+Dw4YP0xfm9ym2M qLUUnGkHLWmD/J6qulI4RbYDP651em3C+eX1qklpAa6BJVv5t2VXYi+OrD0ZVRQA9lFF wmTBLXyconthG2bbDXETqVm3gyUc1K26wa7Ej5Ax+edVvaBolhg39/nKX1n/qPaA6Rw4 GoBi7OslNY8MqNFZJPUEXMrv/F1KnB74R2r6IlAQDr7p/9/HLuh9oDZ3QG/NzN5lDWw+ TPmA==
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=6Rrj7rLCqDH8kfJOQSZYV2gCxySKXIv1e4nKQmqZXqk=; b=uXCCOENhgG3svODBxS07w5DYi2UnstUAsu4bOBxqemGIwmmW5fxO2nzQCRytPRgwxg wSwdA9khD40muzSe1h8hpIsxCe/GjGa/TbUgxf5gtK+PlvhadekXJEUFAhNkU0UFKbVy Jjpp/darFpRffvDLuzc1DjpIbwHT9AEEX8V2YAoith+R72E7raF7HVtB8zLH3hFpM1GE y2pXLIZMGZWflNldOYagDMxW7SipXaRMZ7nhUzHhLthnng3HfVUVj9qZKSGLGxX/HNvG U47obBf8nwSUkoXyxsVNQao7yeOE84Y9uxFsVFZ0CPy4keIqqEfTZiQFp0MqYN/i5ywz +hbw==
X-Gm-Message-State: AOAM532L929bJIp1aSMFhEN0cdXW3LsPAqQ7GAxBtyLdSIQ8gDULF8h7 VDjxq+xGwz7plgvFB71IUkh5EtMMPwfNTFkyG9RyiZX/0ww=
X-Google-Smtp-Source: ABdhPJwHdg5sFkEOXkitmmw26AHAe/IeRcFzb40Tz69F4GBctU1ilE3MIEA/Lv7E6kYbHhOaOMSu27Pac+jmqDuDoq8=
X-Received: by 2002:a2e:81c4:: with SMTP id s4mr533600ljg.284.1595453008680; Wed, 22 Jul 2020 14:23:28 -0700 (PDT)
MIME-Version: 1.0
From: Victor Vasiliev <vasilvv@google.com>
Date: Wed, 22 Jul 2020 17:23:17 -0400
Message-ID: <CAAZdMafWeaZhCVbObPgvYm5gxZu6ksV5VkSoF=8Mx9OJBDA5rA@mail.gmail.com>
To: WebTransport <webtransport@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d6ecbc05ab0e597b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/webtransport/CEGNLkMqrvug3uPyPmQIXnWVIAY>
Subject: [Webtransport] Choosing the Transport
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: Wed, 22 Jul 2020 21:23:34 -0000

Hello everyone,

We recently adopted the overview draft
<https://tools.ietf.org/html/draft-ietf-webtrans-overview-00> that
describes the general requirements for and the model of WebTransport.
However, we haven't yet adopted any specific wire protocol proposals.
There are currently three of those presented to the working group:

   - QuicTransport
   <https://tools.ietf.org/html/draft-vvv-webtransport-quic-02>
   - Http2Transport
   <https://tools.ietf.org/html/draft-kinnear-webtransport-http2-01>
   - Http3Transport
   <https://tools.ietf.org/html/draft-vvv-webtransport-http3-02>
   - [hypothetical WebTransport over WebSocket]

Back when the original idea of WebTransport was forming, the hope was to
implement and ship all four of those, since they all fit different use
cases better.  After talking more to the people at IETF, it sounds like
four transports is a bit too much, and we should settle on two (one over
QUIC, and one over TCP).  The natural picks would be either Http3Transport
with Http2Transport as fallback (HttpTransport for short), or QuicTransport
with… *something* as a fallback.  Let’s look at the differences between
those two options.

*Differences*

The most substantial wire format difference between those two proposals is
the handshake.  QuicTransport originally did not have any handshake; we had
to add a bespoke handshake later in order to implement the Origin header,
and we also added a Path header later on.  We currently don’t have any form
of response headers, so if the server is unhappy with the origin or path
received, it has to close the connection with CONNECTION_CLOSE.  In
HttpTransport, we have regular HTTP header fields for both request and
response, meaning that the server can do things like return a 4xx/5xx for
an error.

During the connection itself, the difference is minimal: QuicTransport uses
streams and datagrams as-is, while Http3Transport prefixes everything with
an ID, since it is multiplexed with other HTTP traffic.  There might be a
question of whether prefixing can impose undesirable framing overhead; I
think if that ever becomes a serious problem, we can come up with some
extension to work this around.

If we decide that QuicTransport is a way to go, we’d have to add more
features into its handshake, since I suspect most people won’t be happy
with what’s in there right now (HTTP headers like Location or Forwarded
would be a good example of what people would end up needing in practice,
together with an ability to tag along arbitrary key-value metadata for
debugging purposes).  If we decide that HttpTransport is a way to go, we
would have to ensure that the result is easy for Web developers to use, and
that we understand the differences between it and regular HTTP.

>From the server complexity standpoint, I am not particularly worried about
either.  We’ve implemented QuicTransport in Chrome, and I wrote two servers
for it, in C++ and in Python; the Python one took about 100 lines of code.
Http2Transport has been implemented, in somewhat different forms, by both
Apple and Facebook, so we have practical experience with it too.  I was
previously concerned that having to implement HPACK/QPACK would be a burden
to the Web developers since those are more complex than what you’d
typically find in a WebSocket implementation, but now that we have a draft
to turn compression off
<https://tools.ietf.org/html/draft-vvv-httpbis-alps-00>, I’m less worried
about this.

There is a question of how much of the HTTP ecosystem we would be actually
getting by adopting HTTP.  It is true that basing WebTransport on HTTP does
not mean HTTP middleware would automatically implement it.  That said, we
do get a lot of useful features from HTTP, notably message routing and a
well-understood metadata format.  Everyone knows what a code 200 or 404 is,
and a lot of people have built their internal debugging/tracing tools based
on adding HTTP headers to things, and being able to easily port those to
WebTransport would be an asset.  I’ve seen some arguments that content
negotiation and caching might be applicable to certain classes of
WebTransport resources too (e.g. a live stream can be cached in the sense
that requesting a live stream is joining it), though those kinds of cases
would have to be content-specific and they do not generalize as nicely as
caching for regular HTTP resources.  An interesting point to note is that
WebTransport is always included programmatically (as opposed to being
navigated to or sourced via URL from HTML), thus alleviating the need for a
lot of otherwise useful HTTP headers.

*Questions*

While on the surface the question here is “which drafts should we adopt?”,
I would like to break this question down into two layers:

   1. Do we want to use the wire format in which we try to build minimally
   on top of QUIC (QuicTransport), or do we base it on HTTP?
   2. To what extent WebTransport connections act like HTTP connections?
   Do they have https URLs or a dedicated schema?  Which HTTP headers do and
   don’t work?


Regarding the first issue, I am increasingly leaning towards keeping only
the HTTP-based option. QuicTransport’s most appealing feature is its
simplicity; however, ever since we’ve had to add a header to communicate
the Web origin, there has been increasingly more and more reasons to add
new features to it, so even if we go that way, we’re probably going to end
up with something that’s a lot like HTTP.  Also, we know exactly how to do
TCP fallback in this case, so this removes a lot of design problems from
consideration.  Fixing complexity and other problems with HTTP is probably
more viable.

Regarding the second issue, I am not sure how much of it is in scope for
this working group.  While we do need to define a URL schema, and the
choice of schema will give us a lot of answer (by making WebTransport same
or different origin as HTTP), a lot of those questions have been
traditionally answered somewhere in Fetch spec, or simply not addressed in
the standards at all.  I am not quite sure what to do with those.

What do people think?