<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<rfc category='std' ipr='trust200902'
     docName='draft-thatcher-ice-remove-candidate-00'>

<?rfc toc='yes' ?>
<?rfc symrefs='yes' ?>
<?rfc sortrefs='yes'?>
<?rfc iprnotified='no' ?>
<?rfc strict='yes' ?>
<?rfc compact='yes' ?>
  <front>

    <title abbrev='ICE Candidate Removal'>
      ICE Candidate Removal: Remove ICE candidates when they are no
      longer useful.
    </title>
    <author initials='P.' surname='Thatcher'
            fullname='Peter Thatcher'>
      <organization>Google</organization>
      <address>
        <postal>
          <street>747 6th St S</street>
          <city>Kirkland</city>
          <region>WA</region>
          <code>98033</code>
          <country>USA</country>
        </postal>
        <email>pthatcher@google.com</email>
      </address>
    </author>
    <author initials='H.' surname='Zhang'
            fullname='Honghai Zhang'>
      <organization>Google</organization>
      <address>
        <postal>
          <street>747 6th St S</street>
          <city>Kirkland</city>
          <region>WA</region>
          <code>98033</code>
          <country>USA</country>
        </postal>
        <email>honghaiz@google.com</email>
      </address>
    </author>
    <author initials='T.' surname='Brandstetter'
            fullname='Taylor Brandstetter'>
      <organization>Google</organization>
      <address>
        <postal>
          <street>747 6th St S</street>
          <city>Kirkland</city>
          <region>WA</region>
          <code>98033</code>
          <country>USA</country>
        </postal>
        <email>deadbeef@google.com</email>
      </address>
    </author>
    <date />
    <abstract>
      <t>
        This document describes an extension to the Interactive
        Connectivity Establishment (ICE) that enables ICE agents to
        signal the removal of ICE candidates to the remote ICE agent
        to prevent the remote ICE agent from wasting resources
        by attempting to use the ICE candidate.
      </t>
    </abstract>
  </front>
  <middle>
    <section title='Introduction'>
      <t>
        In certain network conditions, ICE agents may find that a
        local ICE candidate is no longer useful and that the remote
        ICE agent should not attempt to use that ICE candidate.
      </t>
      <t>
        For example, if an ICE agent is gathering TURN candidates and
        finds a set of better candidates (such as using UDP to the
        TURN server) than candidates already signaled (such as using
        TCP to the TURN server), it may choose to deallocate the worse
        candidates.  But if it does so, the remote ICE agent may waste
        time and resources attempting to use the deallocated TURN
        candidates.
      </t>
      <t>
        Just as trickle-ice optimizes ICE by signaling the addition of
        an ICE candidate, this extension optimizes further by
        signaling the removal of an ICE candidate.
      </t>
    </section>
    <section title="Terminology">
      <t>
        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
        NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
        "OPTIONAL" in this document are to be interpreted as described
        in <xref target="RFC2119"/>.
      </t>
      <t>
        This specification makes use of all terminology defined by the
        protocol for Interactive Connectivity Establishment in
        <xref target="RFC5245"/>.
      </t>
      <t>
        <list style="hanging">
          <t hangText="Removal Signal">
            The messsage signaled between ICE agents that a candidate is removed.
          </t>
          <t hangText="Removed Candidate">
            An ICE candiate for which a removal signal is sent.
          </t>
          <t hangText="Removing Agent">
            The ICE agent that sends the removal signal.
          </t>
          <t hangText="Receiving Agent">
            The ICE agent that receives the removal signal.
          </t>
        </list>
      </t>
    </section>
    <section title='Signaling candidate removal'
             anchor='signaling'>
      <t>
        This specification does not define the usage of candidate
        removal with any specific signaling protocol.  
      </t>
      <t>
        However, it will be noted that any signaling protocol must be
        able to unique identify the Removed Candidates.  For example,
        a combination of the component, ip address, protocol (UDP or
        TCP), and port would unique identify a Removed Candidate.
      </t>
    </section>
    <section title='Removing candidates when a removal is signaled'
             anchor='removing'>
      <t>
        When a removal signal, the Receiving Agent MUST NOT pair the
        Removed Candiates with any future candidates gathered by the
        Receiving Agent.  The Receiving Agent MAY keep the existing
        candidate pairs that use the Removed Candidates and behave as
        though the Removed Candidates had not been removed
        for those candidate pairs.
      </t>
      <t>
        Why would an Receiving Agent choose not to immediately remove
        existing candidate pairs?  Because the Removing Agent MAY
        choose to keep the Removed Candidate capable of receiving ICE
        checks and sending responses so that any ICE checks already
        sent by the Receiving Agent may continue to work briefly so
        that media can flow as quickly as possible, even if over a
        candidate pair that will soon be discarded.
      </t>
      <t>
        Both the Removing Agent and the Receiving Agent SHOULD
        prioritize candidate pairs with a Removed Candidate lower than
        those without a Removed Candidate.
      </t>
    </section>
    <section title='IANA Considerations'>
      <t>
        This specification requests no actions from IANA.
      </t>
    </section>
    <section title='Security Considerations'>
      <t>
        TODO
      </t>
    </section>
    <section title='Acknowledgements'>
      <t>
        TODO
      </t>
    </section>
  </middle>
  <back>
    <references title='Normative References'>
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.5245"?>
    </references>
  </back>
</rfc>
