<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-alto-cost-mode-04" ipr="trust200902"
     updates="7285">
  <front>
    <title abbrev="ALTO Cost Mode">A Cost Mode Registry for the
    Application-Layer Traffic Optimization (ALTO) Protocol</title>

    <author fullname="Mohamed Boucadair" initials="M." surname="Boucadair">
      <organization>Orange</organization>

      <address>
        <postal>
          <street></street>

          <city>Rennes</city>

          <region></region>

          <code>35000</code>

          <country>France</country>
        </postal>

        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>

    <author fullname="Qin Wu" initials="Q." surname="Wu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>

          <city>Nanjing</city>

          <region>Jiangsu</region>

          <code>210012</code>

          <country>China</country>
        </postal>

        <email>bill.wu@huawei.com</email>
      </address>
    </author>

    <date />

    <workgroup>alto</workgroup>

    <keyword>Optimization</keyword>

    <keyword>service performance</keyword>

    <keyword>cost metric</keyword>

    <keyword>routing</keyword>

    <keyword>computation</keyword>

    <keyword>networks</keyword>

    <keyword>service-network interaction</keyword>

    <keyword>network programming</keyword>

    <abstract>
      <t>This document creates a new IANA registry for tracking cost modes
      supported by the Application-Layer Traffic Optimization (ALTO) Protocol.
      Also, this document relaxes a constraint that was imposed by the ALTO
      specification on allowed cost mode values.</t>

      <t>This document updates RFC 7285.</t>
    </abstract>

    <note title="Editorial Note (To be removed by RFC Editor)">
      <t>Please update RFC XXXX statements within the document with the RFC
      number to be assigned to this document.</t>
    </note>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>The cost mode attribute indicates how costs should be interpreted
      when communicated in the Application-Layer Traffic Optimization (ALTO)
      Protocol <xref target="RFC7285"></xref>. The base ALTO specification
      includes a provision for only two modes: <list style="hanging">
          <t hangText="&quot;numerical&quot;:">Indicates that numerical
          operations can be performed (e.g., normalization) on the returned
          costs (Section 6.1.2.1 of <xref target="RFC7285"></xref>).</t>

          <t hangText="&quot;ordinal&quot;:">Indicates that the cost values in
          a cost map represent ranking (relative to all other values in a cost
          map), not actual costs (Section 6.1.2.2 of <xref
          target="RFC7285"></xref>).</t>
        </list></t>

      <t>Additional cost modes are required for specific ALTO deployment cases
      (e.g., <xref target="I-D.ietf-alto-path-vector"></xref>). In order to
      allow for such use cases, this document relaxes the constraint imposed
      by the base ALTO specification on allowed cost modes (<xref
      target="anupdate"></xref>) and creates a new ALTO registry to track new
      cost modes (<xref target="IANA"></xref>).</t>

      <t>The mechanisms defined in <xref target="RFC7285"></xref> are used to
      advertise the support of new cost modes for specific cost metrics. Refer
      to <xref target="bc"></xref> for more details.</t>
    </section>

    <section anchor="notation" title="Terminology">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP 14
      <xref target="RFC2119"></xref><xref target="RFC8174"></xref> when, and
      only when, they appear in all capitals, as shown here.</t>

      <t>This document makes use of the terms defined in <xref
      target="RFC7285"></xref>.</t>
    </section>

    <section anchor="anupdate" title="Updates to RFC7285">
      <t></t>

      <section title="Updates to Section 6.1.2 of RFC7285">
        <t>This document updates Section 6.1.2 of <xref
        target="RFC7285"></xref> as follows:</t>

        <t>OLD:<list style="empty">
            <t>The cost mode attribute indicates how costs should be
            interpreted. Specifically, the cost mode attribute indicates
            whether returned costs should be interpreted as numerical values
            or ordinal rankings.</t>

            <t>It is important to communicate such information to ALTO
            clients, as certain operations may not be valid on certain costs
            returned by an ALTO server. For example, it is possible for an
            ALTO server to return a set of IP addresses with costs indicating
            a ranking of the IP addresses. Arithmetic operations that would
            make sense for numerical values, do not make sense for ordinal
            rankings. ALTO clients may handle such costs differently.</t>

            <t>Cost modes are indicated in protocol messages as strings.</t>
          </list></t>

        <t>NEW:<list style="empty">
            <t>The cost mode attribute indicates how costs should be
            interpreted. Two cost modes (numerical values and ordinal
            rankings) are defined, but additional cost modes can be defined in
            the future.</t>

            <t>It is important to communicate such information to ALTO
            clients, as certain operations may not be valid on certain costs
            returned by an ALTO server. For example, it is possible for an
            ALTO server to return a set of IP addresses with costs indicating
            a ranking of the IP addresses. Arithmetic operations that would
            make sense for numerical values, do not make sense for ordinal
            rankings. ALTO clients may handle such costs differently.</t>

            <t>Cost modes are indicated in protocol messages as strings.</t>

            <t>Future documents that define a new cost mode SHOULD indicate
            whether that new cost mode applies to all or a subset of cost
            metrics. If not explicitly indicated, the new cost mode applies to
            all cost metrics.</t>
          </list></t>

        <t></t>
      </section>

      <section anchor="up2" title="Updates to Section 10.5 of RFC7285">
        <t>This document updates Section 10.5 of <xref
        target="RFC7285"></xref> as follows:</t>

        <t>OLD:<list style="empty">
            <t>A cost mode is encoded as a string. The string MUST have a
            value of either "numerical" or "ordinal".</t>
          </list></t>

        <t>NEW:<list style="empty">
            <t>A cost mode is encoded as a string. The string MUST be no more
            than 32 characters, and it MUST NOT contain characters other than
            US-ASCII alphanumeric characters (U+0030-U+0039, U+0041-U+005A,
            and U+0061-U+007A), the hyphen-minus ('-', U+002D), the colon
            (':', U+003A), or the low line ('_', U+005F). Cost modes reserved
            for Private Use are prefixed with "priv:" (<xref
            target="IANA"></xref>). Otherwise, the cost mode MUST have a value
            that is listed in the registry created in <xref
            target="IANA"></xref> of RFCXXXX.</t>
          </list></t>

        <t></t>
      </section>
    </section>

    <section anchor="bc" title="Backward Compatibility Considerations">
      <t>ALTO servers that support new cost modes for specific cost metrics
      will use the mechanism specified in Section 9.2 of <xref
      target="RFC7285"></xref> to advertise their capabilities. ALTO clients
      (including legacy) will use that information to specify cost constraints
      in their requests (e.g., indicate a cost metric and a cost mode). An
      example of such a behavior is depicted in Section 9.2.3 of <xref
      target="RFC7285"></xref>.</t>

      <t>If an ALTO client includes a cost mode that is not supported by an
      ALTO server, the server indicates such an error with the error code
      E_INVALID_FIELD_VALUE as per Section 8.5.2 of <xref
      target="RFC7285"></xref>. In practice, legacy ALTO servers will reply
      with the error code E_INVALID_FIELD_VALUE to requests that include a
      cost type other than "numerical" or "ordinal" for the "routingcost" cost
      metric.</t>

      <t>The encoding constraints in <xref target="up2"></xref> do not
      introduce any interoperability issue given that currently implemented
      cost modes adhere to these constrains (mainly, those in <xref
      target="RFC7285"></xref> and <xref
      target="I-D.ietf-alto-path-vector"></xref>). </t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requests IANA to create a new subregistry entitled
      "ALTO Cost Modes" under the "Application-Layer Traffic Optimization
      (ALTO) Protocol" registry available at <xref target="ALTO"></xref>.</t>

      <t>The registry is initially populated with the following values:<figure>
          <artwork><![CDATA[   +============+=============================+============+===========+
   | Identifier | Description                 | Intended   | Reference |
   |            |                             | Semantics  |           |
   +============+=============================+============+===========+
   | numerical  | Indicates that numerical    | Section    | RFCXXXX   |
   |            | operations can be performed | 6.1.2.1 of |           |
   |            | on the returned costs       | RFC7285    |           |
   +------------+-----------------------------+------------+-----------+
   | ordinal    | Indicates that the cost     | Section    | RFCXXXX   |
   |            | values in a cost map        | 6.1.2.2 of |           |
   |            | represent ranking           | RFC7285    |           |
   +------------+-----------------------------+------------+-----------+
]]></artwork>
        </figure></t>

      <t>The assignment policy for this registry is "IETF Review" (Section 4.8
      of <xref target="RFC8126"></xref>).</t>

      <t>Requests to register a new ALTO cost mode must include the following
      information:<list style="hanging">
          <t hangText="Identifier:">The name of the ALTO cost mode. Refer to
          <xref target="up2"></xref> for more details on allowed encoding.</t>

          <t hangText="Description:">A short description of the requested ALTO
          cost mode.</t>

          <t hangText="Intended Semantics:">A reference to where the semantic
          of the requested cost mode is defined.</t>

          <t hangText="Reference:">A reference to the document that registers
          the requested cost mode.</t>
        </list></t>

      <t>Cost modes prefixed with "priv:" are reserved for Private Use
      (Section 4.1 of <xref target="RFC8126"></xref>). This document requests
      IANA to add the following note to the new subregistry:</t>

      <t><list style="hanging">
          <t hangText="Note:">Identifiers prefixed with 'priv:' are reserved
          for Private Use (see [RFCXXXX], <xref target="IANA"></xref>).</t>
        </list></t>
    </section>

    <section anchor="security" title="Security Considerations">
      <t>This document does not introduce new concerns other than those
      already discussed in Section 15 of <xref target="RFC7285"></xref>.</t>
    </section>

    <section anchor="ack" title="Acknowledgements">
      <t>Many thanks to Benjamin Kaduk for spotting the issue during the
      review of <xref target="I-D.ietf-alto-path-vector"></xref>.</t>

      <t>Thanks to Adrian Farrel, Dhruv Dhody, Luis Miguel Contreras Murillo,
      Sabine Randriamasy, and Qiao Xiang for the review and comments.</t>

      <t>Special thanks to Kai Gao for Shepherding the document.</t>

      <t>Thanks to Martin Duke for the AD review.</t>

      <t>Thanks to Roni Even for the gen-art review, Jaime Jimenez for the
      artart review, and Stephen Farrell for the secdir review.</t>

      <t>Thanks to Robert Wilton, Lars Eggert, Francesca Palombini, Roman
      Danyliw, and Paul Wouters for the IESG review.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.2119'?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.7285'?>

      <?rfc include='reference.RFC.8126'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.ietf-alto-path-vector'?>

      <reference anchor="ALTO"
                 target="https://www.iana.org/assignments/alto-protocol/alto-protocol.xhtml">
        <front>
          <title>Application-Layer Traffic Optimization (ALTO)
          Protocol</title>

          <author>
            <organization></organization>
          </author>

          <date day="02" month="March" year="2022" />
        </front>
      </reference>
    </references>
  </back>
</rfc>
