Re: [DNSOP] draft-ietf-dnsop-edns-chain-query and draft-ietf-dnsop-edns-tcp-keepalive

Tony Finch <dot@dotat.at> Wed, 08 October 2014 14:19 UTC

Return-Path: <fanf2@hermes.cam.ac.uk>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7EBCD1A1AF0 for <dnsop@ietfa.amsl.com>; Wed, 8 Oct 2014 07:19:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.986
X-Spam-Level:
X-Spam-Status: No, score=-4.986 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.786] autolearn=ham
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 Tmj9pRBUJH0o for <dnsop@ietfa.amsl.com>; Wed, 8 Oct 2014 07:19:43 -0700 (PDT)
Received: from ppsw-41.csi.cam.ac.uk (ppsw-41.csi.cam.ac.uk [131.111.8.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4D5271A1A93 for <dnsop@ietf.org>; Wed, 8 Oct 2014 07:19:43 -0700 (PDT)
X-Cam-AntiVirus: no malware found
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-1.csi.cam.ac.uk ([131.111.8.51]:46076) by ppsw-41.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:25) with esmtpa (EXTERNAL:fanf2) id 1Xbs5c-0002QY-Ql (Exim 4.82_3-c0e5623) (return-path <fanf2@hermes.cam.ac.uk>); Wed, 08 Oct 2014 15:19:40 +0100
Received: from fanf2 by hermes-1.csi.cam.ac.uk (hermes.cam.ac.uk) with local id 1Xbs5c-0006mu-6u (Exim 4.72) (return-path <fanf2@hermes.cam.ac.uk>); Wed, 08 Oct 2014 15:19:40 +0100
Date: Wed, 08 Oct 2014 15:19:40 +0100
From: Tony Finch <dot@dotat.at>
X-X-Sender: fanf2@hermes-1.csi.cam.ac.uk
To: Paul Wouters <paul@nohats.ca>
In-Reply-To: <alpine.LFD.2.10.1410080929320.15690@bofh.nohats.ca>
Message-ID: <alpine.LSU.2.00.1410081445020.4144@hermes-1.csi.cam.ac.uk>
References: <5434228C.9010401@gmail.com> <alpine.LSU.2.00.1410081030160.4144@hermes-1.csi.cam.ac.uk> <alpine.LFD.2.10.1410080929320.15690@bofh.nohats.ca>
User-Agent: Alpine 2.00 (LSU 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"
Sender: Tony Finch <fanf2@hermes.cam.ac.uk>
Archived-At: http://mailarchive.ietf.org/arch/msg/dnsop/Q3fc2P8hrf8ez1oQAVelJb86Tfs
Cc: Tim Wicinski <tjw.ietf@gmail.com>, dnsop <dnsop@ietf.org>
Subject: Re: [DNSOP] draft-ietf-dnsop-edns-chain-query and draft-ietf-dnsop-edns-tcp-keepalive
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Oct 2014 14:19:50 -0000

Paul Wouters <paul@nohats.ca> wrote:
> On Wed, 8 Oct 2014, Tony Finch wrote:
> > Tim Wicinski <tjw.ietf@gmail.com> wrote:
> > >
> > > https://datatracker.ietf.org/doc/draft-ietf-dnsop-edns-chain-query/
> >
> > I do not think this protocol extension is necessary.
> >
> > I have previously described how you can get the same round-trip
> > performance by sending queries for all the chain records at once:
> > http://www.ietf.org/mail-archive/web/dnsext/current/msg13540.html
>
> That doesn't help a stub resolver much. Do you really want the resolver
> logic of gathering all this data in asynchronous queries to be in libc?

You don't need any asynchronous code to send concurrent queries. If you
are using a TCP socket you don't even need to select(). Just write out the
queries then read the replies.

(You only need to go async if you want to be concurrent with other
activity in the program, in which case it isn't relevant to compare with
the non-async libc resolver.)

> > The performance problem that EDNS chain queries are trying to fix is an
> > problem with existing server implementations, NOT a protocol limitation.
> > Both BIND and Unbound fail to handle queries concurrently when they arrive
> > over one TCP connection.
>
> this extension allows a significant resource saving when used on mobile
> phones.

Yes, I pointed that out in the article linked above. But EDNS chain
queries only reduce the data sent and received, not the number of round
trips. The maximum number of round trips required is two, with or without
EDNS chain queries.

Note that the numbers I was working with did not include NS RRsets. If you
add those in as required for EDNS chain queries, then I guess you will not
actually be winning.

Perhaps a more useful option would be to request minimal responses.

> > It would be much better to spend time working on fixing these bugs instead
> > of adding complexity to the protocol.
>
> What is the complexity? It's not introducing any new formats, no new
> record types, and just an edns option you can ignore if you don't want
> it? The complexity is in the upstream resolver picking up all the right
> entries. The client is clean and simple. Send one packet, get a nicely
> validatable answer back.

The client needs to negotiate support and keep track of which servers
provide it or not.

The EDNS chain query option doesn't include enough information for the
server to optimize its response correctly if the answer is a CNAME or MX
etc. to a different zone (e.g. under a different TLD).

It isn't clear to me if including NS records in the response makes sense
as the default behaviour. Maybe it does for roaming clients (like Unbound
/ DNSSEC-trigger) that switch back and forth between forwarding and
iterative resolution, but if you have a forwarding-only resolver it is
just waste. You could make it optional - or you could just remove the
feature and if the client wants NS records it can ask for them using a
separate query.

But all of these questions disappear, and you get negligible loss of
performance, if the client sends concurrent queries for just the records
it needs.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Trafalgar: Cyclonic in northwest, otherwise mainly northerly or northwesterly
5 or 6. Slight or moderate. Showers in northwest. Good.