Re: [hybi] Alternative for SRV proposal

Iñaki Baz Castillo <ibc@aliax.net> Sun, 24 July 2011 20:21 UTC

Return-Path: <ibc@aliax.net>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3604621F8512 for <hybi@ietfa.amsl.com>; Sun, 24 Jul 2011 13:21:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.647
X-Spam-Level:
X-Spam-Status: No, score=-2.647 tagged_above=-999 required=5 tests=[AWL=0.030, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NTDgMIbjyWvD for <hybi@ietfa.amsl.com>; Sun, 24 Jul 2011 13:21:21 -0700 (PDT)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by ietfa.amsl.com (Postfix) with ESMTP id 943BF21F8511 for <hybi@ietf.org>; Sun, 24 Jul 2011 13:21:21 -0700 (PDT)
Received: by qwc23 with SMTP id 23so2808437qwc.31 for <hybi@ietf.org>; Sun, 24 Jul 2011 13:21:20 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.224.173.70 with SMTP id o6mr2938426qaz.322.1311538880838; Sun, 24 Jul 2011 13:21:20 -0700 (PDT)
Received: by 10.229.185.195 with HTTP; Sun, 24 Jul 2011 13:21:20 -0700 (PDT)
In-Reply-To: <20110724195600.GF22405@1wt.eu>
References: <CALiegfni83KAFTeo1vo_XLmLhVSAR_BxYwLoSkOizJ1ToHfqhw@mail.gmail.com> <20110724195600.GF22405@1wt.eu>
Date: Sun, 24 Jul 2011 22:21:20 +0200
Message-ID: <CALiegfn8B4YzbAz9zp8s6t=47nSqCaqc3SjH3LE5m6ffC3Ht+w@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Alternative for SRV proposal
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Jul 2011 20:21:22 -0000

2011/7/24 Willy Tarreau <w@1wt.eu>eu>:
> We could even refine the process : you could make it mandatory that for an
> SRV record to be presented, the main host would necessarily have a CNAME
> record. The idea is that most of the time, CNAME records will point to the
> same entries as SRV records. Thus you can avoid the slowdown for most
> situations that way :
>
>   1) resolve www.mydomain.org
>   2) if it has at least a CNAME and if SRV is enabled, then retry with SRV
>   3) if not, or if SRV fails, use AAAA/A as returned
>
> That way you can make use of SRV by default without impacting too
> many sites (only those with a CNAME).

But that would require two DNS queries (in case of CNAME), am I wrong?
and that seems to be a problem (due to explanations given in the other
thread).

Why not just making SRV optional but ensuring that the domain in the
URI also has a A/AAAA resolution? This is:

ws://mydomain.org

1) ~# host -t A mydomain.org
    1.2.3.4

2) ~# host -t srv _ws._tcp.mydomain.org
    1 50 server01.mydomain.org
    1 50 server02.mydomain.org
    2  0 server-backup.mydomain.org

2a) ~# host -t A server01.mydomain.org
       1.2.3.4

2b) ~# host -t A server02.mydomain.org
       1.2.3.5

2b) ~# host -t A server-backup.mydomain.org
       9.9.9.9


Clients with no SRV support (or disabled as mobile browsers) should
just perform step 1 while other WS clients would/could try step 2 (and
2a, 2b, 2c...).


-- 
Iñaki Baz Castillo
<ibc@aliax.net>