Re: [Http-srv] Alternative to SRV?

Shumon Huque <shuque@gmail.com> Fri, 24 August 2018 04:07 UTC

Return-Path: <shuque@gmail.com>
X-Original-To: http-srv@ietfa.amsl.com
Delivered-To: http-srv@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 191A9130E6B for <http-srv@ietfa.amsl.com>; Thu, 23 Aug 2018 21:07:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 mM5-4vg3_O_6 for <http-srv@ietfa.amsl.com>; Thu, 23 Aug 2018 21:07:10 -0700 (PDT)
Received: from mail-yw1-xc2e.google.com (mail-yw1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) (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 24298129C6B for <Http-srv@ietf.org>; Thu, 23 Aug 2018 21:07:10 -0700 (PDT)
Received: by mail-yw1-xc2e.google.com with SMTP id w202-v6so2645800yww.3 for <Http-srv@ietf.org>; Thu, 23 Aug 2018 21:07:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1U9Ckqco6BXKjR5FS+Jn3zcjWmx9G3VxBsEuF+y80/o=; b=VfmfR4liBDXWuUoRnPxgtfAVeP35gkQ8bXzZW62z373omwjpkRhvptCxDdJzKRicrc BsYtPBhHu4CuqIp1nwnfs6y5Q3qeAM9Fz1O2RuXOc+m66V6j+fSzmSHae2Dk/Ygq7grl dh9zUD1x5b+41fzRXjUv2g22VeN3OGfN2mq1Ysvs4TYHus17T9EMkyDtdxdp1WXs4pYm scBtOc3ez8n1r6VuvgzgImjYdhC0SMJjW3Cif5dWwIzF9ueCAh9/fVMwky9laanZG6bT ZeLSeCIgC6T+aqFDBtRmjBZIc7NLbDoRGx5CzjSieutjIDz7XB/QTOgVIHygL7G80pSl pP8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1U9Ckqco6BXKjR5FS+Jn3zcjWmx9G3VxBsEuF+y80/o=; b=kIDtB4mQvFuseQlryCjBEZ6uQOHccjp6sg4BTDNibF0PGOFxHFnDiIA8ineTHogfC3 Ik8mqJQFRsXjDzCp1H2J9gSuRKNsaQMETDMGoeRGDukybGkxHFf6gXl0eBLIb08LarcG OREFHPcZ6QY//vD8RLeOMTu9DPzN7RNii7+rFFivzuYCxlA/GzWvttnW2rjD+9wQ6e24 if/8Sx9F4dtkqO47neN6asAklY7ObY95JH/Vl77INaKXJQceyDrmmdZfWSBCRjNrUiWP B3H/sBZp+sfhnMSpNhW4E7fQ03CsT3rGAQdi8r3FH0Zct5/J4T4aETVkQGCAUTPyMgdE Bkpw==
X-Gm-Message-State: APzg51D5bNUCVxHL6hVfOfARL50IrcvM0WjD/yRkFQ8QSMO6KfgUAwfE nShq6V0Tm3aXft3kucYrV28Yn8OVo2N357Fx8dU=
X-Google-Smtp-Source: ANB0VdarCItkwrI8LYJF27Hit5lIKvwILx0zzx11lNLf8OOc9DHH6uBtJPC6anY2j18CRtI1o4jRw6pKNMe/bAu6XBA=
X-Received: by 2002:a81:254:: with SMTP id 81-v6mr3078076ywc.82.1535083629188; Thu, 23 Aug 2018 21:07:09 -0700 (PDT)
MIME-Version: 1.0
References: <6aceab29-cf81-8644-20cd-e02281e6394c@bellis.me.uk> <DDFF92A9-9F1D-4883-AF5C-1372EBDAB156@isc.org> <CAKC-DJj3uGYwgd5v+VUEWCDS08NMcFne+1iZ2EC3FVr2qKmcwg@mail.gmail.com>
In-Reply-To: <CAKC-DJj3uGYwgd5v+VUEWCDS08NMcFne+1iZ2EC3FVr2qKmcwg@mail.gmail.com>
From: Shumon Huque <shuque@gmail.com>
Date: Fri, 24 Aug 2018 00:06:57 -0400
Message-ID: <CAHPuVdWFbB_u7ppkGsF6A-8qXDqdmAyP0v5E_OAO2vzUsD9Ayg@mail.gmail.com>
To: Erik Nygren <erik+ietf@nygren.org>
Cc: Mark Andrews <marka@isc.org>, Http-srv@ietf.org, Ray Bellis <ray@bellis.me.uk>
Content-Type: multipart/alternative; boundary="0000000000006b1bfa05742682ac"
Archived-At: <https://mailarchive.ietf.org/arch/msg/http-srv/EXNru5vZCICy28IYrYiTr5JApm8>
Subject: Re: [Http-srv] Alternative to SRV?
X-BeenThere: http-srv@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Using DNS SRV Records with HTTP <http-srv.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/http-srv>, <mailto:http-srv-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/http-srv/>
List-Post: <mailto:http-srv@ietf.org>
List-Help: <mailto:http-srv-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/http-srv>, <mailto:http-srv-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Aug 2018 04:07:13 -0000

On Thu, Aug 23, 2018 at 5:57 PM Erik Nygren <erik+ietf@nygren.org> wrote:

> I will point folks again to draft-schwartz-httpbis-dns-alt-svc (
> https://tools.ietf.org/html/draft-schwartz-httpbis-dns-alt-svc-02).
> Another older variation on this is draft-nygren-service-bindings-00 (
> https://tools.ietf.org/html/draft-nygren-service-bindings-00) from a few
> years  back takes a similar approach.
>

I reviewed the dns-alt-svc draft on the dnsop@ietf.org list several months
ago and encouraged (unsuccessfully) other DNS folks to look at it. I also
made some specific suggestions to Ben Schwartz which I believe he is
planning to incorporate.

Before designing yet another record to solve this problem, I think we need
to first determine if that path would have support from HTTP folks. Or, if
there is already momentum behind the dns-alt-svc draft, and if it is more
likely to gain traction, then perhaps working on refining it is the best
option. Otherwise we risk defining an SRV version 2 record which will again
be ignored.

Why I like this over something more minimal:
>
> * Allows indicating the transport to the client, enabling clients that
> support HTTP/2 or QUIC to start using it immediately without additional
> RTTs to get an Alt-Svc from the server (giving browsers a performance
> incentive to support it).
> * Provides extensibility so that additional hooks can be added in later
> without requiring clients to look up more records.  For example:
>          * With "ESNI" (encrypted SNI) we could include the ESNI key or
> its name in the ALTSVC DNS record.
>          * Being able to indicate that the first label can be replaced by
> "_wildcard" in the SNI (eg, to send "_wildcard.example.com" as an SNI) is
> another sort of extension discussed.
>          * Being able to indicate that some service entries are IPv6-only
> (no IPv4 A record is present) might be another useful signal to include as
> an optimization some day.
> * Provides a better data model and much better operational sanity for
> things like ESNI in the context of multi-CDN (but also just for cases such
> as moving between hosting providers or CDNs).  By tying attributes like the
> ESNI key, supported transport protocols, etc within the same RR as the the
> servername, different servernames on different hosting environments can
> sanely have different properties.
> * Fits into the Alt-Svc model already implemented in some clients.
>
> I'm not tied as much to the particular encoding specifics (the existing
> Alt-Svc string format, some CBOR encoding, something that moves a few of
> the attributes such as server to a more structured RRTYPE but still has
> extensible fields per RR, etc).
>
> What this ends up looking like is something like is an rrset along the
> lines of:
>
>   _443._https.example.com. IN TYPE???  {priority1} {transportprotocol1} {servername1} {port1} {extension_fieldset_1}
>
>   _443._https..example.com <http://https.example.com>. IN TYPE???  {priority2} {transportprotocol2} {servername2} {port2} {extension_fieldset_2}
>
>   _443._https.example.com. IN TYPE???  {priority3} {transportprotocol3} {servername3} {port3} {extension_fieldset_3}
>
>
> For example:
>
>   _443._https.example.com. IN ALTSVC  10 quic2 example.com.examplecdn.net 443 ( esni=key124._esni.examplecdn.net )
>
>   _443._https.example.com. IN ALTSVC  20 h2 example.com.examplecdn.net 443 ( esni=key124._esni.examplecdn.net; ipv6-only=true )
>
>   _443._https.example.com. IN ALTSVC  40 http/1.1 legacy.example.com.examplecdn.net 443 ( esni=key124._esni.examplecdn.net )
>
>
> I suspect that some CDNs would then have customers CNAME over "_443._
> https.example.com."
> to some name on the CDN.  For example in the example above it might be
> that it actually CNAMEs to _443._https.example.com.examplecdn.net which
> then means that the A and AAAA records for "example.com.examplecdn.net"
> can be returned as additionals from the same examplecdn.net authority
> along with the ALTSVC record.
>
>     Erik
>

I think this all sounds reasonable.

One of the critiques I had of the dns-alt-svc draft was that the server
names were embedded inside a potentially complex text string, which would
make it more challenging for DNS servers (not only authoritative, but
recursive servers also) to pre-populate the additional section of the
response with the server address records to help minimize latency.
Splitting the server name (and perhaps other components) into a structured
field in the rdata, as you show, could address that. Addition of a priority
field is also a good idea. Without that, the only way to specify priority
(since records within an RRset are unordered) would be to serially specify
the server names and associated parameters inside the same ALTSVC record
string, and it would also make it impossible to specify equal priority
servers for load balancing.

I've also proposed that client behavior when processing ALTSVC responses
should be to shuffle or randomize the ALTSVC RRs (of equal priority), and
also shuffle address records for each server if there are multiple of them
(if they are returned by the server in additional data). This would ensure
better load balancing behavior regardless of whether the DNS server
shuffles or randomizes the records.

-- 
Shumon Huque