Re: [Ice] Proposal for ICE "network cost"

Peter Thatcher <pthatcher@google.com> Tue, 12 April 2016 18:43 UTC

Return-Path: <pthatcher@google.com>
X-Original-To: ice@ietfa.amsl.com
Delivered-To: ice@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1B09612D1E9 for <ice@ietfa.amsl.com>; Tue, 12 Apr 2016 11:43:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.696
X-Spam-Level:
X-Spam-Status: No, score=-3.696 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.996, SPF_PASS=-0.001] 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 UwlWUzj7Fm76 for <ice@ietfa.amsl.com>; Tue, 12 Apr 2016 11:43:37 -0700 (PDT)
Received: from mail-vk0-x22e.google.com (mail-vk0-x22e.google.com [IPv6:2607:f8b0:400c:c05::22e]) (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 C476512D64C for <ice@ietf.org>; Tue, 12 Apr 2016 11:43:36 -0700 (PDT)
Received: by mail-vk0-x22e.google.com with SMTP id k1so37471874vkb.0 for <ice@ietf.org>; Tue, 12 Apr 2016 11:43:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6Qz+HWh2Hq0jRDZNrJkUXP7qcjgMp4153K46p2T4KVo=; b=H0hguurI3Smf95UCErdmDtgyArEPAuOgaOVvuUz5/bGPCqJi6hziFkMa1nQ5MUNtOQ 45JW63oZWyKigu/XmtiBg0i2r9jFEvBb5TWMj9W+VE7jB95vfQSBtbERiGtDvy1ATxnx Z1mBzeJRCAxk1pAcCmv3NZ4NK80KHRSrMDbUpeXEyulrAe6ma6CQ0XU9fH8Ci8hCpNve znXYvfFYpRsmR9GnOh4CUovE8gxYWzAw3Loa/zZxiBdrQENKMjUi95W2yFl5AZwFuDzs 9/VrnHLomjm6N/p9bqVfqceiVaZ4oK6kBdk/BU/8erAoNSGHGjfmbleYwqFEqJzhc7rU oR6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6Qz+HWh2Hq0jRDZNrJkUXP7qcjgMp4153K46p2T4KVo=; b=IdO+F/D+kM52+K/w/Z7r8ghOGMzoSfV1it40w96Pu7C/HMGkubiDyj/AV+BpHPmWIM PddMOnDURkjsvylGDmL0bJt87CdUPpDKeqFRfPsouHbQVHPHq7SyHhFGzcNk7E0kugSP NCLOK4ym74N1GI+uI++PG/bBN3wcv51H5EyAV+miSLH/3sznG/xMF05FJ/O9/tqiIJi+ cH9vkZ+Bf1F1OP/bK992wNJzweWJo5DQp8QAeLhGVbV+DRkyPMLJfN5GrrpJwF7GaMtK h0ZJ/L0mMmUlO8m5hI0UU9F7DHkl5bo48AFNIujL5owzjyVxVHju0ybAXwhrvk++qhsH 0LMg==
X-Gm-Message-State: AOPr4FXkPgaxkcxJy3DyUnMxuiPN5ulcCWz5LKIJWZddAWPuqKtc7hY5luo6hs/0p84JStUz77tmoONaikpFz1dT
X-Received: by 10.31.44.77 with SMTP id s74mr2494802vks.4.1460486615609; Tue, 12 Apr 2016 11:43:35 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.176.67.164 with HTTP; Tue, 12 Apr 2016 11:42:56 -0700 (PDT)
In-Reply-To: <5706DBAB.7030703@jitsi.org>
References: <CAJrXDUHNJm8=fzrmvJWTz9TE47GEzkiJQOKakPzdYZ_GM67FBw@mail.gmail.com> <57069DE4.1070805@jitsi.org> <CAJrXDUGE8DOVyDEi3hSxtQ-_WKZ01LEhiVaw3mCvu=xtA7qNbA@mail.gmail.com> <5706DBAB.7030703@jitsi.org>
From: Peter Thatcher <pthatcher@google.com>
Date: Tue, 12 Apr 2016 11:42:56 -0700
Message-ID: <CAJrXDUGom9dcqkdt87yVeyvNzeF89pyca2UOiAvrh6tU78iT+A@mail.gmail.com>
To: Emil Ivov <emcho@jitsi.org>
Content-Type: multipart/alternative; boundary="001a11c075a2ec6b6105304e0900"
Archived-At: <http://mailarchive.ietf.org/arch/msg/ice/oC5pFWNgUuTwWx_mRxdncjsxsH4>
Cc: ice@ietf.org
Subject: Re: [Ice] Proposal for ICE "network cost"
X-BeenThere: ice@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Interactive Connectivity Establishment \(ICE\)" <ice.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ice>, <mailto:ice-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ice/>
List-Post: <mailto:ice@ietf.org>
List-Help: <mailto:ice-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ice>, <mailto:ice-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Apr 2016 18:43:39 -0000

On Thu, Apr 7, 2016 at 3:14 PM, Emil Ivov <emcho@jitsi.org> wrote:

>
>
> On 7.04.16 г. 16:27, Peter Thatcher wrote:
>
>>
>>
>> On Thu, Apr 7, 2016 at 10:50 AM, Emil Ivov <emcho@jitsi.org
>> <mailto:emcho@jitsi.org>> wrote:
>>
>>     On 21.03.16 г. 19:07, Peter Thatcher wrote:
>>
>>         As an author (not a chair), I just submitted a draft for an idea
>> I'd
>>         like to propose for ICE: network cost.
>>
>>         Here's the draft:
>>
>>         https://datatracker.ietf.org/doc/draft-thatcher-ice-network-cost/
>>
>>
>>         The idea is basically to allow the controlled side to tell the
>>         controlling side which candidates "cost" more than others (such as
>>         cellular costing more than Wi-Fi).  This is different than
>> candidate
>>         priority for reasons explained in the draft.
>>
>>
>>     I see the value here but I have a few problems with the current state.
>>
>>     To begin with, I find the "cost" name overly confusing. I realize
>>     the draft already says this is not necessarily real cost but it
>>     still leaves people with the wrong impression (and I've confirmed
>>     this in conversations these days). So let's just go for bias or
>>     something (I also like fondness).
>>
>>
>> ​There are two question here:  the name and the direction.  The choice
>> of direction is more important than the name.  I prefer the direction
>> where 0 means "free/use-freely" and a big number means
>> "expensive/restrained/last-resort".  This is because if we ever expand
>> the range, I think it would be better in the direction of "I really
>> don't want to use this" rather than "this is even more free to use".
>> You'll note that this direction is the opposite of
>> fondness/preference/priority.
>>
>> In other words, I think modeling this as "badness' is better than as
>> "goodness".
>>
>
> OK, this makes sense.
>
> So if we're going to debate names, let's debate synonyms of "badness".
>> The best I could come up with is cost.  But I'd love to hear good
>> synonyms.​
>>
>
> Let's go with "handicap" then? (If not we always have aversion and
> reluctance).


​I'm not a fan of any of those words.  I'd prefer "badness" over those.
​


>
>
>     The draft is not currently very explicit about exactly how this
>>     works in the selection of candidates but I assume it basically
>>     means: "if it's all the same to you, I'd much rather you get in
>>     touch with me here than there."
>>
>>
>> Close.  0 means "use this freely".  A small number means "I'd rather not
>> use this".  A large number means "Only use this if nothing else works".​
>> ​
>>
>>     The trickiest part here is how to assign importance to this new bias
>>     as opposed to existing metrics such as RTT for example. We could say
>>     it's up to implementations or try to come up with some
>>     recommendation for a formula.
>>
>>
>> ​That's exactly what I think we should do: standardized how information
>> is conveyed from controlled to controlling, but then let the controlling
>> side decided how to select and nominate.​
>>
>
> The problem here is that unless we give directions about how it should be
> used in practice, then we greatly limit the usefulness and interoperability.


> I actually think we can be very helpful without going into the details
> that much. Like for example:
>
> 0: use freely as you say.

​h​
> >0: you MAY use if no valid pairs exist where the remote candidate has a
> lower handicap but you SHOULD/MUST switch if such a pair becomes valid.
>

I think such a rule is too restrictive of cost/badness > 0.  Perhaps such a
rules for cost/badness == MAX would make sense.  Basically, MAX would mean
"last resort".

However, we do need to be careful about the case where there are only two
candidate pairs available, one of which is (0, MAX) and the other (MAX,
0).  In other words, either the controlling side or the controlled side has
to end up using a "last resort".  Do we standardize which is picked, or
leave that up to the controlling side to decide (let it decide to be
gracious or not).
 ​


>
> Also, unless your nominated pair has pair.remoteCandidate.handicap==0,
> then you MUST continue running checks until either you run through all of
> them or at least one pair with zero handicap becomes valid. When that
> happens you must switch.
>
>
​So, basically, don't prune less-bad networks just because a more-bad
network worked first?  That seems reasonable.  I'm not sure if it's
MUST-worthy, though.

And, again, be careful with the "must switch"​, since you need to remember
the case where only two candidate pairs exist: (N, 0) and (0, N) and the
controlling side needs to pick who pays more (and whether to be gracious or
not).



> Also if your selected pair has a remoteCandidate with non-zero handicap H
> and another pair becomes valid where the remoteCandidate has a lower
> handicap h (i.e., h<H) then you SHOULD switch to that new pair.


​Well, as mentioned, the badness of both sides needs to be balanced.  A
given candidate pair might be slight better for you but a lot worse for me.​
​


>
>     The other thing is that I cannot at all see the value of the network
>>     ID. Why is this necessary?
>>
>>
>> ​Technically, I could make it a separate draft, but the kind of go well
>> together (they both fit in one nice STUN attribute, for example).
>>
>> The value of network ID is the following:  if the remote side's network
>> interface changes, it's wise to notify your bandwidth estimator, because
>> the change may have been drastic (wifi to 2g).  ​ It could change either
>> by TURN mobility, or by continual gathering, or by the use of backup
>> candidate pairs (I realized the last two are not yet standardized).
>>
>
> I am not a huge fan of this. I think it requires the remote side to know
> more than it needs to. If you want to reinit your bwe engine then we should
> have a message that says that


​It's not as simple as just "reinit the BWE".  The BWE wants to know *why*,
and knowing its because the remote network changed is important
information.​
​
And the other problem with message sent from the remote side is that the
local/controlling side may switch candidate pairs, and it needs to know if
doing so changes the remote network or not, so it can know if it should
reset or not.  If it had to wait for a message from the remote side, it
would have to wait for the remote side to receive a message from the local
side, and then for the remote side to send back a message saying "by the
way, that candidate pair changed my local network", which just adds an
extra round trip for no good reason.

(and it should probably be in RTCP).


​That's not going to work for data channels, which also use ICE.​

There could be other reasons for this that cannot be directly mapped to
> changing interfaces.


​In which case, the BWE would like to know which case it is, because it
might behave differently between them. ​


> An interface ID mainly bothers me as it delivers more knowledge than one
> needs

for that sort of stuff and it encourages implementers to make assumptions
> ... and ICE is all about avoiding them.


​It's basically the minimal information to know that the remote network
path is changing between two candidate pairs.  And the assumption that can
be made is that if the ID is different, the network is different, which is
exactly the information it is meant to convey.
​

>
> Emil
>
> --
> https://jitsi.org
>




​I mostly disagree here.  The controlled side is always at the mercy of the
controlling side, and t
he status-quo is that the controlled side has no way to say anything about
the networks it finds costly/bad.  Being able to communicate
0/max/something-in-between is very useful for the controlled side with any
reasonably implemented controlling side.

But for the values of things in between 0 and max, I agree.  ​The
difference between 100 and 200 are hard to nail down.  We tried to nail it
down according to how we think it would be useful, and we realized two
things:
1.  Everyone might not agree with how we were thinking to nail it down.
2.  We might change our minds 6-12 months from now anyway.

Being able to signal these things is valuable even if we haven't nailed
down what the difference between 100 and 200 means (if we ever nail it
down).  So I'd prefer standardizing the signaling of these things
(signaling here includes the STUN attribute) and the range of values, and
then leave the interpretation of the difference of particular values to
implementations or future specs once we have more implementation experience.