<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY RFC2234 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2234.xml'>
<!ENTITY RFC3588 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3588.xml'>
<!ENTITY RFC4005 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4005.xml'>
<!ENTITY RFC4072 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4072.xml'>
<!ENTITY RFC3748 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3748.xml'>
<!ENTITY RFC4282 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4282.xml'>
<!ENTITY RFC4284 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4284.xml'>
<!ENTITY RFC4283 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4283.xml'>
<!ENTITY RFC2486 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2486.xml'>
<!ENTITY RFC2865 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2865.xml'>
<!ENTITY RFC5113 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5113.xml'>
<!ENTITY RFC1034 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1034.xml'>
<!ENTITY RFC1035 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1035.xml'>
<!ENTITY RFC3490 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3490.xml'>
<!ENTITY RFC6408 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6408.xml'>
<!ENTITY RFC6733 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6733.xml'>
<!ENTITY RFC5226 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml'>
<!ENTITY RFC4006 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4006.xml'>
<!ENTITY RFC7068 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7068.xml'>
<!ENTITY RFC5729 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5729.xml'>
<!ENTITY RFC5905 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5905.xml'>
<!ENTITY I-D.ietf-dime-e2e-sec-req PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-dime-e2e-sec-req-01.xml'>



]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="no" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc ipr="trust200902"

    category="std"
     docName="draft-ietf-dime-ovli-08.txt">
  <front>
    <title abbrev="DOIC">Diameter Overload Indication Conveyance</title>
    <author role="editor" initials="J" surname="Korhonen" fullname="Jouni Korhonen">
      <organization>Broadcom</organization>
      <address>
        <postal>
          <street>Porkkalankatu 24</street>
          <city>Helsinki</city>
          <code>FIN-00180</code>
          <country>Finland</country>
        </postal>
        <email>jouni.nospam@gmail.com</email>
      </address>
    </author>
    <author role="editor" initials="S" surname="Donovan" fullname="Steve Donovan">
      <organization>Oracle</organization>
      <address>
        <postal>
          <street>7460 Warren Parkway</street>
          <city>Frisco</city>
          <region>Texas</region>
          <code>75034</code>
          <country>United States</country>
        </postal>
        <email>srdonovan@usdonovans.com</email>
      </address>
    </author>
    <author initials="B" surname="Campbell" fullname="Ben Campbell">
      <organization>Oracle</organization>
      <address>
        <postal>
          <street>7460 Warren Parkway</street>
          <city>Frisco</city>
          <region>Texas</region>
          <code>75034</code>
          <country>United States</country>
        </postal>
        <email>ben@nostrum.com</email>
      </address>
    </author>
    <author fullname="Lionel Morand" initials="L." surname="Morand">
      <organization>Orange Labs</organization>
      <address>
        <postal>
          <street>38/40 rue du General Leclerc</street>
          <city>Issy-Les-Moulineaux Cedex 9</city>
          <code>92794</code>
          <country>France</country>
        </postal>
        <phone>+33145296257</phone>
        <email>lionel.morand@orange.com</email>
      </address>
    </author>

    <date month="February" year="2015"/>
    <area>Operations and Management</area>
    <workgroup>Diameter Maintenance and Extensions (DIME)</workgroup>
    <keyword>Internet-Draft</keyword>
    <keyword>Diameter</keyword>
    <keyword>Overload</keyword>
    <abstract>
      <t>
        This specification defines a base solution for Diameter overload
        control, referred to as Diameter Overload Indication Conveyance (DOIC).
      </t>
    </abstract>
  </front>

  <middle>

    <section title="Introduction" anchor="intro">
      <t>
        This specification defines a base solution for Diameter overload

        control, referred to as Diameter Overload Indication Conveyance

        (DOIC), based on the requirements identified in
       <xref target="RFC7068"/>.
      </t>
      <t>
        This specification addresses Diameter
        overload control between Diameter
        nodes that support the DOIC solution.
        The solution, which is designed to apply to existing and future
        Diameter applications, requires no changes to the Diameter base
        protocol <xref target="RFC6733"/> and is deployable in environments
        where some Diameter nodes do not implement the Diameter overload
        control solution defined in this specification.
      </t>
      <t>
        A new application specification can incorporate the overload control
        mechanism specified in this document by making it mandatory to
        implement for the application and referencing this specification
        normatively.  It is the responsibility of the Diameter application
        designers to define how overload control mechanisms works on that
        application.
      </t>
      <t>
        Note that the overload
        control solution defined in this specification does not address all the
        requirements listed in <xref target="RFC7068"/>. A
        number of overload control related features are left for future
        specifications.  See <xref target="ffs"/> for a list of extensions that are
        currently being considered.  See <xref target="reqanal"/> for an analysis of
        conformance to the requirements specified in <xref target="RFC7068"/>.
      </t>
    </section>
    <section title="Terminology and Abbreviations" anchor="abbrev">
      <t>
       <list style="hanging">
         <t hangText="Abatement">
         <vspace blankLines="1"/>
         Reaction to receipt of an overload report resulting in a reduction
         in traffic sent to the reporting node. Abatement actions include
         diversion and throttling.
         </t>
         <t hangText="Abatement Algorithm">
         <vspace blankLines="1"/>
         An extensible method requested by reporting nodes and used by reacting nodes
         to reduce the amount of traffic sent during an
         occurrence of overload control.
         </t>
         <t hangText="Diversion">
         <vspace blankLines="1"/>
         An overload abatement treatment where the reacting node selects
         alternate destinations or paths for requests.
         </t>
         <t hangText="Host-Routed Requests">
         <vspace blankLines="1"/>
         Requests that a reacting node knows will be served by a
         particular host, either due to the presence of a Destination-Host AVP,
         or by some other local knowledge on the part of the reacting node.
         </t>
         <t hangText="Overload Control State (OCS)">
         <vspace blankLines="1"/>
         Internal state maintained by a reporting or reacting node describing
         occurrences of overload
         control.
         </t>
         <t hangText="Overload Report (OLR)">
         <vspace blankLines="1"/>
         Overload control information for a particular overload
         occurrence sent by a reporting node.
         </t>
         <t hangText="Reacting Node">
         <vspace blankLines="1"/>
         A Diameter node that acts upon an overload report.
         </t>
         <t hangText="Realm-Routed Requests">
         <vspace blankLines="1"/>
         Requests that a reacting node does not know which host will service the request.
         </t>
         <t hangText="Reporting Node">
         <vspace blankLines="1"/>
         A Diameter node that generates an overload report. (This may or may
         not be the overloaded node.)
         </t>
         <t hangText="Throttling">
          <vspace blankLines="1"/>
          An abatement treatment that limits the number of requests
          sent by the DIOC reacting node.  Throttling can include a Diameter Client
          choosing to not send requests, or a Diameter Agent or Server rejecting requests
          with appropriate error responses.  In both cases the result of the
          throttling is a permanent rejection of the transaction.
          <vspace blankLines="1"/>
         </t>
       </list>
      </t>

    </section>
    <section title="Conventions Used in This Document">
      <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">RFC 2119</xref>.
        </t>
        <t>
          <xref
          target="RFC2119">RFC 2119</xref> interpretation does not apply for
          the above listed words when they are not used in all-caps format.
        </t>
      </section>

    <section title="Solution Overview" anchor="overview">
      <t>
        The Diameter Overload Information Conveyance (DOIC) solution allows
         Diameter nodes to request other Diameter nodes to perform overload abatement
         actions, that is, actions to reduce the load offered to the
         overloaded node or realm.
      </t>
      <t>
       A Diameter node that supports DOIC is known as a "DOIC node".
       Any Diameter node can act as a DOIC node, including Diameter Clients,
       Diameter Servers, and Diameter Agents.  DOIC nodes are further divided into
       "Reporting Nodes" and "Reacting Nodes."  A reporting node requests
       overload abatement by sending Overload Reports (OLR).
      </t>
      <t>
       A reacting node acts upon OLRs, and performs whatever actions are
       needed to fulfill the abatement requests included in the OLRs.
       A Reporting node may report overload
       on its own behalf, or on behalf of other nodes.
       Likewise, a reacting node may perform overload abatement on its own
       behalf, or on behalf of other nodes.
      </t>
      <t>
       A Diameter node's role as a DOIC node is independent of its Diameter role.
       For example, Diameter Agents may act as DOIC
       nodes, even though they are not endpoints in the Diameter sense.
       Since Diameter enables bi-directional applications, where Diameter
       Servers can send requests towards Diameter Clients, a given Diameter
       node can simultaneously act as both a reporting node and a reacting node.
      </t>
      <t>
       Likewise, a Diameter Agent may act as a reacting node from the
       perspective of upstream nodes, and a reporting node from the
       perspective of downstream nodes.
      </t>
      <t>
       DOIC nodes do not generate new messages to carry DOIC related
       information.  Rather, they "piggyback" DOIC information over existing
       Diameter messages by inserting new AVPs into existing Diameter
       requests and responses.  Nodes indicate support for DOIC, and any
       needed DOIC parameters, by inserting an OC-Supported-Features AVP
       (<xref target="features"/>) into existing requests and responses.  Reporting nodes
       send OLRs by inserting OC-OLR AVPs (<xref target="olr"/>).
      </t>
      <t>
       A given OLR applies to the Diameter realm and application of the
       Diameter message that carries it.  If a reporting node supports more
       than one realm and/or application, it reports independently for each
       combination of realm and application.  Similarly, the OC-Supported-Features
       AVP applies to the realm and application of the enclosing message.
       This implies that a node may support DOIC for one application and/or
       realm, but not another, and may indicate different DOIC parameters
       for each application and realm for which it supports DOIC.
      </t>
      <t>
       Reacting nodes perform overload abatement according to an agreed-upon
       abatement algorithm.  An abatement algorithm defines the meaning of
       some of the parameters of an OLR and the procedures required for overload
       abatement.  An overload abatement algorithm separates Diameter requests into
       two sets.  The first set contains the requests that are to undergo overload abatement
       treatment of either throttling or diversion.  The second
       set contains the requests that are to be given normal
       routing treatment.  This document specifies a single must-support algorithm,
       namely the "loss" algorithm (<xref target="loss"/>).  Future specifications may
       introduce new algorithms.
      </t>
      <t>
       Overload conditions may vary in scope.  For example, a single
       Diameter node may be overloaded, in which case reacting nodes may
       attempt to send requests to other destinations.
       On the other hand, an entire Diameter realm may
       be overloaded, in which case such attempts would do harm.  DOIC OLRs
       have a concept of "report type" (<xref target="rtype"/>), where the type defines
       such behaviors.  Report types are extensible.  This document defines
       report types for overload of a specific host, and for overload of
       an entire realm.
      </t>
<!--
      <t>
        A report of type "HOST_REPORT" is sent to indicate the overload of a specific
        host, identified by the Origin-Host AVP of the message containing the OLR,
        for the application-id indicated in the transaction. When receiving an OLR of
        type "HOST_REPORT", a reacting node applies overload abatement treatment to
        the host-routed
        requests identified by the overload abatement algorithm
        (see definition in <xref target="abbrev"/>)
        sent for this application to the overloaded host.
      </t>
      <t>
        A report of type "REALM_REPORT" is sent to indicate the overload of
        a realm for the application-id indicated in the transaction.
        The overloaded realm is identified by the
        Destination-Realm AVP of the message containing the OLR.
        When receiving an OLR of type "REALM_REPORT", a reacting node applies
        overload abatement treatment to realm-routed requests identified by the
        overload abatement algorithm
        (see definition in <xref target="abbrev"/>) sent for this application to
        the overloaded realm.
      </t>
      <t>
        A report of type host is sent to indicate the overload of a specific
        server for the application-id indicated in the transaction.  When
        receiving an OLR of type host, a reacting node applies overload
        abatement to what is referred to in this document as host-routed
        requests.  This is the set of requests that the reacting node knows
        will be served by a particular host, either due to the presence of
        a Destination-Host AVP, or by some other local knowledge on the part
        of the reacting node.  The reacting node applies overload abatement
        on those host-routed requests which the reacting node knows will be
        served by the server that matches the Origin-Host AVP of the received
        message that contained the received OLR of type host.
      </t>
      <t>
        A report type of realm is sent to indicate the overload of all servers
        in a realm for the application-id.  When receiving an OLR of type realm,
        a reacting node applies overload abatement to what is referred to in
        this document as realm-routed requests.  This is the set of requests
        that are not host-routed as defined in the previous paragraph.
      </t>
      <t>
       While a reporting node sends OLRs to "adjacent" reacting nodes, nodes
       that are "adjacent" for DOIC purposes may not be adjacent from a
       Diameter, or transport, perspective.  For example, one or more
       Diameter agents that do not support DOIC may exist between a given
       pair of reporting and reacting nodes, as long as those agents pass
       unknown AVPs through unchanged.  The report types described in this
       document can safely pass through non-supporting agents.  This may not
       be true for report types defined in future specifications.
      </t>
-->
      <t>
        DOIC works through non
        supporting Diameter Agents that properly pass unknown AVPs unchanged.
      </t>
      <section title="Piggybacking">
        <t>
          There is no new Diameter application defined to carry overload related
          AVPs. The overload control AVPs defined in this specification have been
         designed to be piggybacked on top of existing application messages.
         This is made possible by adding the optional overload control AVPs OC-OLR
         and OC-Supported-Features into existing commands.
        </t>
        <t>
          Reacting nodes indicate support for DOIC by including the
          OC-Supported-Features AVP in all request messages originated or relayed
          by the reacting node.
        </t>
        <t>
          Reporting nodes indicate support for DOIC by including the
          OC-Supported-Features AVP in all answer messages originated or relayed
          by the reporting node that are in response to a request that contained
          the OC-Supported-Features AVP.  Reporting nodes may include overload reports
          using the OC-OLR AVP in answer messages.
        </t>
        <t>
         Note that the overload control solution does not have fixed server and
         client roles. The DOIC node role is determined based on the message
         type: whether the message is a request (i.e. sent by a "reacting node")
         or an answer (i.e. sent by a "reporting node"). Therefore, in a typical
         "client-server" deployment, the Diameter Client may report its overload
         condition to the Diameter Server for any Diameter Server initiated message exchange. An
         example of such is the Diameter Server requesting a re-authentication from a
         Diameter Client.
        </t>
      </section>
      <section title="DOIC Capability Announcement">
        <t>
          The DOIC solution supports the ability for Diameter nodes to determine
          if other nodes in the path of a request support the solution.  This capability
          is referred to as DOIC Capability Announcement (DCA) and is separate from Diameter
          Capability Exchange.
        </t>
<!--
        <t>
          The DCA mechanism is built around the piggybacking principle used
          for transporting Diameter overload AVPs.  This includes both DCA AVPs
          and AVPs associated with Diameter overload reports.  This allows for the
          DCA AVPs to be carried across Diameter nodes that do not support the DOIC
          solution.
        </t>
-->
        <t>
          The DCA mechanism uses the OC-Supported-Features AVPs to indicate the
          Diameter overload features supported.
        </t>
        <t>
          The first node in the path of a Diameter request that supports the DOIC
          solution inserts the OC-Supported-Features AVP in the request message.
        </t>
        <t>
          The individual features supported by the DOIC nodes are indicated in
          the OC-Feature-Vector AVP.  Any semantics associated with the features
          will be defined in extension specifications that introduce the features.
        </t>
        <t><list><t>
          Note: As discussed elsewhere in the document, agents in the path of the
          request can modify the OC-Supported-Features AVP.
        </t></list></t>
        <t><list><t>
          Note: The DOIC solution must support deployments where Diameter Clients
          and/or Diameter Servers
          do not support the DOIC solution.  In this scenario,
          Diameter Agents that support the DOIC solution may handle overload abatement
          for the non supporting Diameter nodes.  In this case the DOIC agent will insert
          the OC-Supported-Features AVP in requests that do not already contain one,
          telling the reporting node that there is a DOIC node that will handle
          overload abatement.  For transactions where there was an OC-Supporting-Features
          AVP in the request, the agent will insert the OC-Supported-Features
          AVP in answers, telling the reacting node that there is a reporting node.
        </t></list></t>
        <t>
          The OC-Feature-Vector AVP will always contain
          an indication of support for the loss overload abatement algorithm
          defined in this specification (see <xref target="loss"/>).  This ensures
          that a reporting node always supports at least one of the advertized
          abatement algorithms received in a request messages.
        </t>
        <t>
          The reporting node inserts the OC-Supported-Features AVP in all answer messages
          to requests that contained the OC-Supported-Features AVP.  The contents of
          the reporting node's OC-Supported-Features AVP indicate the set of Diameter
          overload features supported by the reporting node.  This specification defines
          one exception -
          the reporting node only includes an indication of support for one overload
          abatement algorithm, independent of the number of overload abatement algorithms
          actually supported by the reacting node.
          The overload abatement algorithm indicated is the algorithm
          that the reporting node intends
          to use should it enter an overload condition. Reacting nodes can use the indicated
          overload abatement algorithm to prepare for possible overload reports and
          must use the indicated overload abatement algorithm if traffic reduction
          is actually requested.
        </t>
        <t><list><t>
          Note that the loss algorithm defined in this document is a stateless
          abatement algorithm.  As a result it does not require any actions by
          reacting nodes prior to the receipt of an overload report.  Stateful
          abatement algorithms that base the abatement logic on a history of
          request messages sent might require reacting nodes to maintain state
          in advance of receiving an overload report
          to ensure that the overload reports can be properly handled.
        </t></list></t>
<!--
        <t>
          Reporting nodes can change the overload abatement algorithm
          indicated in the OC-Feature-Vector AVP if the reporting node is not
          currently in an overload condition and sending overload reports.  The
          reporting node is not allowed to change the overload abatement
          algorithm while the reporting node is in an overload condition.
        </t>
-->
        <t>
          The DCA mechanism must also allow the scenario where the set of
          features supported by the sender of a request and by agents in the
          path of a request differ.  In this case, the agent can update the OC-
          Supported-Features AVP to reflect the mixture of the two sets of
          supported features.
        </t>
        <t><list><t>
          Note: The logic to determine if the content of the OC-Supported-Features
          AVP should be changed is out-of-scope for this document, as is the logic to
          determine the content of a modified OC-Supported-Features AVP.  These are
          left to implementation decisions.
          Care must be taken not to introduce interoperability
          issues for downstream or upstream DOIC nodes.
        </t></list></t>
      </section>
      <section title="DOIC Overload Condition Reporting">
        <t>
          As with DOIC capability announcement, overload condition reporting
          uses new AVPs (<xref target="olr"/>) to indicate an overload condition.
        </t>
        <t>
          The OC-OLR AVP is referred to as an overload report.
          The OC-OLR AVP includes the type of report, a sequence number,
          the length of time that the report is valid and abatement
          algorithm specific AVPs.
        </t>
        <t>
          Two types of overload reports are defined in this document: host
          reports and realm reports.
        </t>
<!--
        <t>
          A report of type "HOST_REPORT" is sent to indicate the overload of a specific
          Diameter node for the application-id indicated in the transaction.
          When receiving an OLR of type "HOST_REPORT", a reacting node applies overload
          abatement to what is referred to in this document as host-routed requests.
          The reacting node applies overload abatement on those host-routed requests
          which the reacting node knows will be served by the server that matches
          the Origin-Host AVP of the received message that contained the received
          OLR of type host.
        </t>
-->
        <t>
          A report of type "HOST_REPORT" is sent to indicate the overload of a specific
          host, identified by the Origin-Host AVP of the message containing the OLR,
          for the application-id indicated in the transaction. When receiving an OLR of
          type "HOST_REPORT", a reacting node applies overload abatement treatment to
          the host-routed
          requests identified by the overload abatement algorithm
          (see definition in <xref target="abbrev"/>)
          sent for this application to the overloaded host.
        </t>
        <t>
          A report of type "REALM_REPORT" is sent to indicate the overload of
          a realm for the application-id indicated in the transaction.
          The overloaded realm is identified by the
          Destination-Realm AVP of the message containing the OLR.
          When receiving an OLR of type "REALM_REPORT", a reacting node applies
          overload abatement treatment to realm-routed requests identified by the
          overload abatement algorithm
          (see definition in <xref target="abbrev"/>) sent for this application to
          the overloaded realm.
        </t>
<!--
        <t>
          A report of type "REALM_REPORT" is sent to indicate the overload of all
          Diameter nodes within a realm for the application-id indicated in the
          transaction.  When receiving an OLR of type realm, a reacting node
          applies overload abatement to what is referred to in this document as
          realm-routed requests.  The reacting node applies overload abatement
          on those realm-routed requests which contain  a Destination-Realm AVP
          that matches the Origin-Realm AVP of the received message that
          contained the received OLR of type realm.
        </t>
-->
        <t>
          This document assumes that there is a single source for realm-reports for
          a given realm, or that if multiple nodes can send realm reports, that each
          such node has full knowledge of the overload state of the entire realm.
          A reacting node cannot distinguish between receiving realm-reports from a
          single node, or from multiple nodes.
        </t>
        <t><list><t>
          Note: Known issues exist if multiple sources for overload reports which apply to the
          same Diameter entity exist.
          Reacting nodes have no way of determining the source and, as such, will
          treat them as coming from a single source.  Variance in sequence numbers between
          the two sources can then cause incorrect overload abatement treatment to be
          applied for indeterminate periods of time.
        </t></list></t>
        <t>
          Reporting nodes are responsible for determining the need for a
          reduction of traffic.  The method for making this determination is
          implementation specific and depends on the type of overload report
          being generated.  A host-report might be generated by tracking use of resources
          required by the host
          to handle transactions for the Diameter application. A realm-report
          generally impacts the traffic sent to multiple hosts and, as such,
          requires tracking the capacity of all servers able to handle realm-routed
          requests for the application and realm.
        </t>
        <t>
          Once a reporting node determines the need for a reduction in traffic,
          it uses the DOIC defined AVPs to report on the condition.  These AVPs
          are included in answer messages sent or relayed by the reporting node.  The
          reporting node indicates the overload abatement algorithm that is
          to be used to handle the traffic reduction in the OC-Supported-Features
          AVP.  The OC-OLR AVP is used to communicate information about the
          requested reduction.
        </t>
        <t>
          Reacting nodes, upon receipt of an overload report,
          apply the overload abatement algorithm to traffic impacted by the overload
          report.  The method used to determine the requests that are to receive
          overload abatement treatment is dependent on the abatement
          algorithm.  The loss abatement algorithm is defined in this document
          (<xref target="loss"/>).  Other abatement algorithms can be defined in
          extensions to the DOIC solution.
        </t>
        <t>
          Two types of overload abatement treatment are defined, diversion and
          throttling. Reacting nodes are responsible for determining which treatment
          is appropriate for individual requests.
        </t>
        <t>
          As the conditions that lead to the generation of the overload report
          change the reporting node can send new overload reports requesting
          greater reduction if the condition gets worse or less reduction if the
          condition improves.  The reporting node sends an overload report
          with a duration of zero to indicate that the overload condition has
          ended and abatement is no longer needed.
        </t>
        <t>
          The reacting node also determines when the overload report expires
          based on the OC-Validity-Duration AVP in the overload report and stops
          applying the abatement algorithm when the report expires.
        </t>
      </section>
      <section title="DOIC Extensibility">
        <t>
          The DOIC solution is designed to be extensible.  This extensibility is
          based on existing Diameter based extensibility mechanisms, along with the
          DOIC capability announcement mechanism.
        </t>
        <t>
          There are multiple categories of extensions that are expected.  This
          includes the definition of new overload abatement algorithms, the
          definition of new report types and the definition of new scopes
          of messages impacted by an overload report.
        </t>
        <t>
          A DOIC node communicates supported features by including them in the
          OC-Feature-Vector AVP, as a sub-AVP of OC-Supported-Features.
          Any non-backwards compatible DOIC extensions
          define new values for the OC-Feature-Vector AVP.  DOIC extensions also
          have the ability to add new AVPs to the OC-Supported-Features AVP, if
          additional information about the new feature is required.
        </t>
        <t>
          Overload reports can also be extended by adding new sub-AVPs to the
          OC-OLR AVP, allowing
          reporting nodes to communicate additional information about handling
          an overload condition.
        </t>
        <t>
          If necessary, new extensions can also define new AVPs that are not
          part of the OC-Supported-Features and OC-OLR group AVPs.  It is,
          however, recommended that DOIC extensions use the OC-Supported-Features AVP
          and OC-OLR AVP to carry all DOIC related AVPs.
        </t>
      </section>
      <section title="Simplified Example Architecture">
        <t><xref target="fig:arch"/> illustrates the simplified architecture
        for Diameter overload information conveyance.
        </t>
          <figure title="Simplified architecture choices for overload indication delivery"
anchor="fig:arch">
            <artwork><![CDATA[

 Realm X                                  Same or other Realms
<--------------------------------------> <---------------------->


   +--------+                 : (optional) :
   |Diameter|                 :            :
   |Server A|--+     .--.     : +--------+ :     .--.
   +--------+  |   _(    `.   : |Diameter| :   _(    `.   +--------+
               +--(        )--:-|  Agent |-:--(        )--|Diameter|
   +--------+  | ( `  .  )  ) : +--------+ : ( `  .  )  ) | Client |
   |Diameter|--+  `--(___.-'  :            :  `--(___.-'  +--------+
   |Server B|                 :            :
   +--------+                 :            :

                       End-to-end Overload Indication
          1)  <----------------------------------------------->
                          Diameter Application Y

               Overload Indication A    Overload Indication A'
          2)  <----------------------> <---------------------->
              Diameter Application Y   Diameter Application Y

]]>
            </artwork>
          </figure>
          <t>
           In <xref target="fig:arch"/>, the Diameter overload indication can be conveyed (1)
           end-to-end between servers and clients or (2) between servers and Diameter agent inside
           the realm and then between the Diameter agent and the clients.
          </t>

      </section>
    </section>
    <section title="Solution Procedures">
      <t>
        This section outlines the normative behavior for the DOIC
        solution.
      </t>
    <section title="Capability Announcement" anchor="capa">
      <t>
        This section defines DOIC Capability Announcement (DCA) behavior.
      </t>
      <t><list><t>
        Note: This specification assumes that changes in DOIC node capabilities
        are relatively rare events that occur as a result of administrative action.
        Reacting nodes ought to minimize changes that force the reporting node to
        change the features being used, especially during active overload conditions.
        But even if reacting nodes avoid such changes, reporting nodes still have to
        be prepared for them to occur. For example, differing capabilities between
        multiple reacting nodes may still force a reporting node to select different
        features on a per-transaction basis.
      </t></list></t>
<!-- removed because it is redundant
      <t>
        The DCA procedures are used to indicate support for DOIC and support
        for DOIC features.  The DOIC features include
        overload abatement algorithms supported.  It might
        also include new report types or other extensions documented in
        the future.
      </t>
      <t>
        Diameter nodes indicate support for DOIC by including the OC-Supported-Features
        AVP in messages sent or handled by the node.
      </t>
-->
      <section title="Reacting Node Behavior" anchor="nego">
        <t>
          A reacting node MUST include the OC-Supported-Features AVP in
          all requests. It MAY include the OC-Feature-Vector AVP, as a sub-avp of
          OC-Supported-Features. If it does
          so, it MUST indicate support for the "loss" algorithm. If the reacting
          node is configured to support features (including other algorithms)
          in addition to the loss algorithm, it MUST indicate such support in an
          OC-Feature-Vector AVP.
        </t>
        <t>
          An OC-Supported-Features AVP in answer messages indicates there is a
          reporting node for the transaction.  The reacting node MAY take
          action, for example creating state for some stateful abatement algorithm,
          based on the features indicated in the OC-Feature-Vector AVP.
        </t>
        <t><list><t>
          Note: The loss abatement algorithm does not require stateful behavior
          when there is no active overload report.
        </t></list></t>
        <t>
          Reacting nodes need to be prepared for the reporting node to change
          selected algorithms.  This can happen at any time, including when
          the reporting node has sent an active overload report.  The reacting
          node can minimize the potential for changes by modifying the advertised
          abatement algorithms sent to an overloaded reporting node to the
          currently selected algorithm and loss (or just loss if it is the
          currently selected algorithm).  This has the effect of limiting
          the potential change in abatement algorithm from the currently
          selected algorithm to loss, avoiding changes to more complex abatement
          algorithms that require state to operate properly.
        </t>
      </section>
      <section title="Reporting Node Behavior">
        <t>
          Upon receipt of a request message, a reporting node determines if
          there is a reacting node for the transaction based on the presence
          of the OC-Supported-Features AVP in the request message.
        </t>
        <t>
          If the request message contains an OC-Supported-Features AVP then a
          reporting node MUST include the OC-Supported-Features AVP in the answer
          message for that transaction.
        </t>
        <t><list><t>
          Note:  Capability announcement is done on a per transaction basis.  The reporting
          node cannot assume that the capabilities announced by a reacting node
          will be the same between transactions.
        </t></list></t>
        <t>
          A reporting node MUST NOT include the OC-Supported-Features AVP, OC-OLR
          AVP or any other overload control AVPs defined in extension drafts in response
          messages for transactions where the request message does not include the
          OC-Supported-Features AVP.  Lack of the OC-Supported-Features AVP in the request
          message indicates that there is no reacting node for the transaction.
        </t>
        <t>
          A reporting node knows what overload control functionality is
          supported by the reacting node based on the content or absence of
          the OC-Feature-Vector AVP within the OC-Supported-Features AVP in the
          request message.
        </t>
        <t>
          A reporting node MUST indicate support for one and only one
          abatement algorithm in the OC-Feature-Vector AVP.  The abatement algorithm
          selected MUST indicate the abatement algorithm the reporting
          node wants the reacting node to use when the reporting node enters an
          overload condition.
        </t>
        <t>
          The abatement
          algorithm selected MUST be from the set of abatement algorithms
          contained in the request message's OC-Feature-Vector AVP.
        </t>
        <t>
          A reporting node that selects the loss algorithm may do so by including
          the OC-Feature-Vector AVP with an explicit indication of the loss algorithm,
          or it MAY omit OC-Feature-Vector. If it selects a different algorithm,
          it MUST include the OC-Feature-Vector AVP with an explicit indication of the
          selected algorithm.
        </t>
<!--        <t>
          A reporting node MUST NOT change the selected algorithm during the period
          of time that starts when entering an overload condition and ends when the associated
          OCS becomes invalid in all reacting nodes.
        </t>
        <t>
          The reporting node MAY change the overload abatement algorithm indicated in
          the OC-Supported-Features AVP at any time as long as no previously sent
          OLRs may be active.
        </t>
-->
        <t>
          The reporting node SHOULD indicate support for other DOIC features defined
          in extension drafts that
          it supports and that apply to the transaction.  It does so using the OC-Feature-Vector AVP.
        </t>
        <t><list><t>
          Note: Not all DOIC features will apply to all Diameter applications
          or deployment scenarios.  The features included in the OC-Feature-Vector
          AVP are based on local reporting node policy.
        </t></list></t>
      </section>
      <section title="Agent Behavior">
        <t>
          Diameter Agents that support DOIC can
          ensure that all messages relayed by the agent contain the OC-Supported-Features
          AVP.
        </t>
        <t>
          A Diameter Agent MAY take on reacting node behavior for Diameter
          endpoints that do not support the DOIC solution.
          A Diameter Agent detects that a Diameter endpoint does not support DOIC
          reacting node behavior when there is no OC-Supported-Features AVP in a request message.
        </t>
<!--
        <t><list><t>
          Note: When mulitple agents are serving as the reacting node for a non supporting
          Diameter endpoint, each of those agents will be advertising capabilities for
          what looks to the reporting node like a single entity.  Care should be taken
          to ensure that reporting node behavior is not adversely impacted in this scenario.
          For instance, if frequent changes in advertised features is a concern then
          care needs to be taken to ensure that all agents advertising capabilities for
          a single entity advertise the same DOIC features.
        </t></list></t>
-->
        <t>
          For a Diameter Agent to be a reacting node for a non supporting Diameter endpoint,
          the Diameter Agent MUST include the OC-Supported-Features AVP in
          request messages it relays that do not contain the OC-Supported-Features AVP.
        </t>
        <t>
          A Diameter Agent MAY take on reporting node behavior for Diameter
          endpoints that do not support the DOIC solution.  The Diameter Agent MUST
          have visibility to all traffic destined for the non supporting host in
          order to become the reporting node for the Diameter endpoint.
          A Diameter Agent detects that a Diameter endpoint does not support DOIC
          reporting node behavior when there is no OC-Supported-Features AVP in an answer
          message for a transaction that contained the OC-Supported-Features AVP in
          the request message.
        </t>
        <t>
          If a request already has the OC-Supported-Features AVP, a Diameter agent MAY modify it
          to reflect the features appropriate for the transaction.  Otherwise, the agent relays the
          OC-Supported-Features AVP without change.
        </t>
        <t><list><t>
          For instance, if the agent supports a superset of the features reported by the
          reacting node then the agent might choose, based on local policy, to advertise
          that superset of features to the reporting node.
        </t></list></t>
        <t>
          If the Diameter Agent changes the
          OC-Supported-Features AVP in a request message then it is likely it will also need
          to modify the OC-Supported-Features AVP in the answer message for the transaction.
          A Diameter Agent MAY modify the OC-Supported-Features AVP
          carried in answer messages.
        </t>
        <t>
          When making changes to the OC-Supported-Features or OC-OLR AVPs, the Diameter
          Agent needs to ensure consistency in its behavior with both upstream and downstream
          DOIC nodes.
        </t>
      </section>
    </section>
    <section title="Overload Report Processing" anchor="olr-proc">

      <section title="Overload Control State" anchor="state">
         <t>
          Both reacting and reporting nodes maintain Overload Control State (OCS) for
          active overload conditions.  The following sections define behavior associated
          with that OCS.
         </t>
         <t>
           The contents of the OCS in the reporting node and in the reacting node represent
           logical constructs.  The actual internal physical structure of the state
           included in the OCS is an implementation decision.
         </t>
           <section title="Overload Control State for Reacting Nodes">
            <t>
              A reacting node maintains the following OCS per supported
              Diameter application:
            </t>
            <t><list style="symbols">
              <t>
                A host-type OCS entry for each Destination-Host to which it sends
                host-type requests and
              </t>
              <t>
                A realm-type OCS entry for each Destination-Realm to which it sends
                realm-type requests.
              </t>
            </list></t>
            <t>
              A host-type OCS entry is identified by the pair of application-id
              and the node's DiameterIdentity.
            </t>
            <t>
              A realm-type OCS entry is identified by the
              pair of application-id and realm.
            </t>
            <t>
              The host-type and realm-type OCS entries
              include the following information (the actual information stored is
              an implementation decision):
            </t>
            <t><list style="symbols">
              <t>Sequence number (as received in OC-OLR)</t>
              <t>Time of expiry (derived from OC-Validity-Duration AVP
                received in the OC-OLR AVP and
                time of reception of the message carrying OC-OLR AVP)</t>
              <t>Selected Abatement Algorithm (as received in the OC-Supported-Features AVP)</t>
              <t>Abatement Algorithm specific input data (as received in the OC-OLR AVP,
                for example, OC-Reduction-Percentage
                for the Loss abatement algorithm)</t>
            </list></t>
           </section>

           <section title="Overload Control State for Reporting Nodes">
             <t>
               A reporting node maintains OCS entries per supported
               Diameter application, per
               supported (and eventually selected) Abatement Algorithm and
               per report-type.
             </t>
             <t>
               An OCS entry is identified by the tuple of Application-Id, Report-Type and
               Abatement Algorithm and
               includes the following
               information (the actual information stored is an implementation
               decision):
             </t>
             <t><list style="symbols">
               <t>Sequence number</t>
               <t>Validity Duration</t>
               <t>Expiration Time</t>
               <t>Algorithm specific input data (for example, the Reduction Percentage for
                 the Loss Abatement Algorithm)</t>
             </list></t>
           </section>

           <section title="Reacting Node Maintenance of Overload Control State">
<!--
             <t>
               Reacting nodes create a host-type OCS identified by OCS-Id = (app-id,host-id) when
               receiving an answer message of application app-id containing an Orig-Host of host-id
               and a host-type OC-OLR AVP unless such host-type OCS already exists.
             </t>
             <t>
               Reacting nodes create a realm-type OCS identified by OCS-Id = (app-id,realm-id)
               when receiving an answer message of application app-id containing an Orig-Realm
               of realm-id and a realm-type OC-OLR AVP unless such realm type OCS already exists.
             </t>
-->
             <t>
               When a reacting node receives an OC-OLR AVP, it MUST determine if it is
               for an existing or new overload condition.
             </t>
             <t><list><t>
               Note: For the remainder of this section the term OLR refers to the combination
               of the contents of the received OC-OLR AVP and the abatement algorithm indicated in
               the received OC-Supported-Features AVP.
             </t></list></t>
             <t>
               When receiving an answer message with multiple OLRs of different
               supported report types, a
               reacting node MUST process each received OLR.
             </t>
<!--
             <t>
               When receiving an answer message with multiple OLRs and multiple of
               the OLRs are of the same supported report types, a
               reacting node SHOULD ignore the duplicated OLRs.
             </t>
             <t>
               A reacting node SHOULD ignore an OC-OLR with a OC-Report-Type AVP that
               contains an unrecognized value.
             </t>
             <t>
               When receiving an OC-OLR AVPs with unknown values, a reacting node
               SHOULD be silently discarded by reacting nodes
               and the event SHOULD be logged.
             </t>
-->
             <t>
               The OLR is for an existing overload condition if a reacting node has an
               OCS that matches the received OLR.
             </t>
             <t>
               For a host-report this means it matches the application-id and the
               host's DiameterIdentity in
               an existing host OCS entry.
             </t>
             <t>
               For a realm-report this means it matches the application-id and the realm
               in an existing realm OCS entry.
             </t>
             <t>
               If the OLR is for an existing overload condition then a reacting node MUST determine
               if the OLR is a retransmission or an update to the existing OLR.
             </t>
             <t>
               If the sequence number for the received OLR is greater than the sequence
               number stored in the matching OCS entry then a reacting node MUST update the
               matching OCS entry.
             </t>
             <t>
               If the sequence number for the received OLR is less than or equal to the
               sequence number in the matching OCS entry then a reacting node MUST
               silently ignore the received OLR.  The matching OCS MUST NOT be updated
               in this case.
             </t>
             <t>
               If the received OLR is for a new overload condition then a reacting node
               MUST generate a new OCS entry for the overload condition.
             </t>
             <t>
               For a host-report this means a reacting node
               creates on OCS entry with the application-id
               in the received message and DiameterIdentity of the Origin-Host
               in the received message.
             </t>
             <t><list><t>
               Note: This solution assumes that the Origin-Host AVP in the answer message
               included by the reporting
               node is not changed along the path to the reacting node.
             </t></list></t>
             <t>
                For a realm-report this means a reacting node creates on OCS entry with the
                application-id in the received message and realm of the Origin-Realm
                in the received message.
             </t>
             <t>
               If the received OLR contains a validity duration of zero (“0”) then a
               reacting node MUST update the OCS entry as being expired.
             </t>
             <t><list><t>
               Note: It is not necessarily appropriate to delete the OCS entry, as there
               is recommended behavior that the reacting node slowly returns to full traffic
               when ending an overload abatement period.
             </t></list></t>
             <t>
              The reacting node does not delete an OCS when receiving an answer message that does not
              contain an OC-OLR AVP (i.e. absence of OLR means “no change”).
             </t>
<!--
             </t>
               When receiving an answer message with an OC-OLR AVP with a report-type of host,
               a reacting node determines if it has a matching OCS entry for the OLR.
               If not then the reacting node MUST create a host type OCS entry identified
               by the OCS-Id – (app-id, host-id).  The app-id contains the application-id
               received in the answer message.  The host-id contains the value of the
               Origin-Host AVP received in the message.
             </t>
             <t>
               When receiving an answer message with an OC-OLR AVP with a report-type of realm,
               a reacting node determines if it has a matching OCS entry for the OLR.
               If not then the reacting node MUST create a realm type OCS entry identified
               by the OCS-Id – (app-id, realm-id).  The app-id contains the application-id
               received in the answer message.  The realm-id contains the value of the
               Origin-Realm AVP received in the message.
             </t>
             <t>
               The reacting node MUST update an OCS entry
               it receives an answer message that matches the
               OC-OLR AVP with a sequence number higher than the
               stored sequence number.
             </t>
             <t>
               The reacting node deletes an OCS when it expires (i.e. when current time minus
               reception time is greater than validity duration).
             </t>
             <t>
               The reacting node also deletes on OCS with an updated OLR
               is received with a validity duration of zero.
             </t>
-->
           </section>
           <section title="Reporting Node Maintenance of Overload Control State">
             <t>
               A reporting node SHOULD create a new OCS entry when entering an overload condition.
             </t>
              <t><list><t>
                Note: If a reporting node knows through absence of the OC-Supported-Features
                AVP in received messages that there are no reacting nodes supporting
                DOIC then the reporting node can choose to not create OCS entries.
              </t></list></t>
              <t>
                When generating a new OCS entry the sequence number SHOULD be set to
                zero ("0").
              </t>
              <t>
                When generating sequence numbers for new overload conditions,
                the new sequence number MUST be
                greater than any sequence number in an active (unexpired) overload report
                for the same application and report-type
                previously sent by the reporting node.  This property MUST hold over
                a reboot of the reporting node.
              </t>
              <t><list><t>
                Note: One way of addressing this over a reboot of a reporting node
                is to use a time stamp for the first overload condition that occurs
                after the report and to start using sequences beginning with zero for
                subsequent overload conditions.
              </t></list></t>
             <t>
               A reporting node MUST update an OCS entry when it needs
               to adjust the validity duration
               of the overload condition at reacting nodes.
             </t>
             <t><list><t>
               For instance, if a reporting node wishes to instruct reacting nodes to continue
               overload abatement for a longer period of time than originally communicated.  This
               also applies if the reporting node wishes to shorten the period of time that
               overload abatement is to continue.
             </t></list></t>
<!--
             <t>
               A reporting node MUST NOT update the abatement algorithm in an active OCS entry.
             </t>
-->
             <t>
               A reporting node MUST update an OCS entry when it wishes to adjust any
               abatement algorithm specific parameters, including, for example,
               the reduction percentage
               used for the Loss abatement algorithm.
             </t>
             <t><list><t>
               For instance, if a reporting node wishes to change the reduction percentage either
               higher, if the overload condition has worsened, or lower, if the overload condition
               has improved, then the reporting node would update the appropriate OCS entry.
             </t></list></t>
             <t>
               A reporting node MUST increment the sequence number associated with the OCS entry
               anytime the contents of the OCS entry are changed.  This will result in a new
               sequence number being sent to reacting nodes, instructing reacting nodes
               to process the OC-OLR AVP.
             </t>
             <t>
               A reporting node SHOULD update an OCS entry with a validity duration of zero ("0")
               when the overload condition ends.
             </t>
             <t><list><t>
               Note: If a reporting node knows that the OCS entries in the reacting nodes are
               near expiration then the reporting node might decide not to send an OLR with
               a validity duration of zero.
             </t></list></t>
             <t>
               A reporting node MUST keep an OCS entry with a validity duration of zero ("0")
               for a period of time long enough to ensure that any non-expired reacting node's
               OCS entry
               created as a result of the overload condition in the reporting node is deleted.
             </t>
<!--
             <t><list><t>
               This period of time can be determined by calculating the time the last overload
               report for the overload condition was sent plus the validity duration included
               in that overload report.
             </t></list></t>
-->
           </section>
      </section>

      <section title="Reacting Node Behavior">
        <t>
          When a reacting node sends a request it MUST determine if that request
          matches an active OCS.
        </t>
        <t>
          If the request matches an active OCS then the reacting node MUST use the
          overload abatement algorithm indicated in the OCS to determine if the
          request is to receive overload abatement treatment.
        </t>
        <t>
          For the Loss abatement algorithm defined in this specification, see
          <xref target="loss"/> for the overload abatement algorithm logic applied.
        </t>
        <t>
          If the overload abatement algorithm selects the request for overload
          abatement treatment then the reacting node MUST apply overload
          abatement treatment on the request.  The abatement treatment applied
          depends on the context of the request.
        </t>
        <t>
          If diversion abatement treatment is possible (i.e. a different path
          for the request can be selected where the overloaded node is not part
          of the different path), then the reacting node SHOULD apply diversion
          abatement treatment to the request. The reacting node MUST apply
          throttling abatement treatment to requests
          identified for abatement treatment  when diversion treatment
          is not possible or was not applied.
        </t>
        <t><list><t>
          Note: This only addresses the case where there are two defined abatement
          treatments, diversion and throttling.  Any extension that defines a new
          abatement treatment must also defined the interaction of the new
          abatement treatment with existing treatments.
        </t></list></t>
<!--
        <t>
          If the request is a host-routed request then the reacting node SHOULD
          apply throttling abatement treatment to the request.
        </t>
        <t>
          If the request is a realm-routed request then the reacting node SHOULD
          apply diversion abatement treatment to the request.
        </t>
-->
        <t>
          If the overload abatement treatment results in throttling of the request and if
          the reacting node is an agent then the agent MUST send an appropriate error as
          defined in <xref target="errors"/>.

        </t>
        <t>
          Diameter endpoints that throttle requests need to do so according to the
          rules of the client application. Those rules will vary by application,
          and are beyond the scope of this document.
        </t>
<!--
         <t>
          Once a reacting node receives an OC-OLR AVP from a reporting node, it
          applies traffic abatement based on the selected
          algorithm with the reporting node and the current overload condition.
          The reacting node learns the reporting node supported abatement
          algorithms directly from the received answer message containing the
          OC-Supported-Features AVP.
         </t>
         <t>
          The received OC-Supported-Features AVP does not change the existing
          overload condition and/or traffic abatement algorithm settings if the
          OC-Sequence-Number AVP contains a value that is equal to the
          previously received/recorded value. If the OC-Supported-Features AVP is
          received for the first time for the reporting node or the
          OC-Sequence-Number AVP value is less than the previously
          received/recorded value (and is outside the valid overflow window), then
          the sequence number is stale (e.g. an intentional or
          unintentional replay) and SHOULD be silently discarded.
         </t>
         <t>
          As described in <xref target="olr"/>, the OC-OLR AVP contains the
          necessary information for the overload condition on the reporting node.
         </t>
         <t>
          From the OC-Report-Type AVP contained in the OC-OLR AVP, the reacting
          node learns whether the overload condition report concerns a specific
          host (as identified by the Origin-Host AVP of the answer message
          containing the OC-OLR AVP) or the entire realm (as identified by the
          Origin-Realm AVP of the answer message containing the OC-OLR AVP).
          The reacting node learns the Diameter application to which the
          overload report applies from the Application-ID of the answer message
          containing the OC-OLR AVP. The reacting node MUST use this
          information as an input for its traffic abatement algorithm. The idea
          is that the reacting node applies different handling of the traffic
          abatement, whether sent request messages are targeted to a specific
          host (identified by the Diameter-Host AVP in the request) or to any
          host in a realm (when only the Destination-Realm AVP is present in the
          request). Note that future specifications MAY define new
          OC-Report-Type AVP values that imply different handling of the OC-OLR
          AVP. For example, in a form of new additional AVPs inside the Grouped
          OC-OLR AVP that would define report target in a finer granularity than
          just a host.
         </t>
         <t>
          If the OC-OLR AVP is received for the first time, the reacting node
          MUST create overload control state associated with the related
          realm or a specific host in the realm identified in the message
          carrying the OC-OLR AVP, as described in <xref target="state"/>.
         </t>
         <t>
          If the value of the OC-Sequence-Number AVP contained in the received
          OC-OLR AVP is equal to or less than the value stored in an existing
          overload control state, the received OC-OLR AVP SHOULD be silently
          discarded. If the value of the OC-Sequence-Number AVP contained in
          the received OC-OLR AVP is greater than the value stored in an
          existing overload control state or there is no previously recorded
          sequence number, the reacting node MUST update the overload control
          state associated with the realm or the specific node in the realm.
         </t>
         <t>
          When an overload control state is created or updated, the reacting
          node MUST apply the traffic abatement requested in the OC-OLR AVP
          using the algorithm announced in the OC-Supported-Features AVP
          contained in the received answer message along with the OC-OLR AVP.
         </t>
         <t>
          The validity duration of the overload information contained in the
          OC-OLR AVP is either explicitly indicated in the OC-Validity-Duration
          AVP or is implicitly equals to the default value if the
          OC-Validity-Duration AVP is absent. The reacting
          node MUST maintain the validity duration in the overload control
          state. Once the validity duration times out, the reacting node MUST
          assume the overload condition reported in a previous OC-OLR AVP has
          ended.
         </t>
         <t>
          A value of zero ("0") received in the OC-Validity-Duration in an updated
          overload report indicates that the overload condition has ended and that
          the overload state is no longer valid.
         </t>
-->
         <t>
          In the case that the OCS entry indicated no traffic was to be sent to
          the overloaded entity and the validity duration expires then overload
          abatement associated with the overload report MUST be ended in a
          controlled fashion.
        </t>
      </section>
      <section anchor="olr-reporting" title="Reporting Node Behavior">
<!--
         <t>
          A reporting node is a Diameter node inserting an OC-OLR AVP in a
          Diameter message in order to inform a reacting node about an overload
          condition and request Diameter traffic abatement.
         </t>
-->
        <t>
          If there is an active OCS entry then a reporting node SHOULD
          include the OC-OLR AVP in all answers to requests that contain the
          OC-Supported-Features AVP and that match the active OCS entry.
        </t>
        <t><list><t>
          Note: A request matches if the application-id in the request matches the
          application-id in any active OCS entry and if the report-type in the OCS
          entry matches a report-type supported by the reporting node as indicated
          in the OC-Supported-Features AVP.
        </t></list></t>
        <t>
          The contents of the OC-OLR AVP depend on the selected algorithm.
        </t>
<!--
        <t>
          The
          reporting node learns the capabilities of the reacting node when it
          receives the OC-Supported-Features AVP as part of any Diameter request
          message. Since the loss abatement algorithm <xref target="loss"/>
          is mandatory to implement
          DOIC can always be enabled between these DOIC nodes
          See <xref target="capa"/> for further discussion on the
          capability and feature announcement.
         </t>
         <t>
          When
          a traffic reduction is required due to an overload condition and
          the overload control solution is supported by the sender of the
          Diameter request,
          the reporting node SHOULD include an
          OC-Supported-Features AVP and an OC-OLR AVP in the corresponding
          Diameter answer.
        </t>
-->
        <t>
          A reporting node MAY choose to not resend an overload report to a reacting
          node if it can guarantee that this overload report is already active in the
          reacting node.
        </t>
        <t><list><t>
          Note: In some cases (e.g. when there are one or more agents in the
          path between reporting and reacting nodes, or when overload reports are
          discarded by reacting nodes) a reporting node may not be able to guarantee
          that the reacting node has received the report.
        </t></list></t>
<!--
        <t>
         The OC-OLR AVP contains the required traffic
         reduction and the OC-Supported-Features AVP indicates the traffic
         abatement algorithm to apply. This algorithm MUST be one of the
         algorithms advertised by the request sender.
        </t>

        <t>
          A reporting node MUST only send overload reports of a type advertised as
          supported by the reacting node.
        </t>
-->
        <t>
          A reporting node MUST NOT send overload reports of a type that has not been
          advertised as supported by the reacting node.
        </t>
        <t><list><t>
          Note: A reacting node implicitly advertises support for the host and realm
          report types by including the OC-Supported-Features AVP in the request.
          Support for other report types will be explicitly indicated by new
          feature bits in the OC-Feature-Vector AVP.
        </t></list></t>
<!--
        <t>
          The reporting node MAY update the overload report with new reduction
          percentages.
        </t>
        <t>
          The reporting node MAY extend the validatity duration for an existing
          overload report by sending a OLR with either the same or a new
          validity duration value.
        </t>
        <t>
          When sending an overload report with new values in any of the sub AVPs
          for an existing overload condition, the reporting node MUST increase the
          sequence number in the new OLR sent.
        </t>
-->
         <t>
          A reporting node SHOULD explicitly indicate the end of an overload occurrence by
          sending a new OLR with OC-Validity-Duration set to a value of zero ("0").
          The reporting node SHOULD ensure that all reacting nodes receive the updated
          overload report.
         </t>
         <t>
           A reporting node MAY rely on the OC-Validity-Duration AVP values for the
           implicit overload control state cleanup on the reacting node.
         </t>
         <t><list><t>
           Note: All OLRs sent have an expiration time calculated by adding the validity-duration
           contained in the OLR to the time the message was sent. Transit time for the
           OLR can be safely ignored.  The reporting node can ensure that all reacting nodes
           have received the OLR by continuing to send it in answer messages
           until the expiration time for all
           OLRs sent for that overload condition have expired.
         </t></list></t>
         <t>
           When a reporting node sends an OLR, it effectively delegates any necessary
           throttling to downstream nodes.  If the reporting node also locally throttles
           the same set of messages, the overall number of throttled requests may be higher
           than intended.  Therefore, before applying local message throttling, a reporting node
           needs to check if these messages match existing OCS entries, indicating
           that these messages have survived throttling applied by
           downstream nodes that have received the related OLR.
         </t>
         <t>
           However, even if the set of messages match existing OCS entries, the
           reporting node can still apply other abatement methods such as diversion.   The
           reporting node might also need to throttle requests for reasons other than
           overload. For example, an agent or server might
           have a configured rate limit for each client, and throttle requests that exceed
           that limit, even if such requests had already been candidates for throttling by
           downstream nodes.  The reporting node also
           has the option to send new OLRs requesting greater reductions in traffic, reducing
           the need for local throttling.
         </t>
         <t>
           A reporting node SHOULD decrease requested overload abatement treatment
           in a controlled
           fashion to avoid oscillations in traffic.
         </t>
         <t><list><t>
           For example, it might wait some period of time after overload ends before
           terminating the OLR, or it might send a series of OLRs indicating
           progressively less overload severity.
         </t></list></t>
<!--
         <t>
           If multiple such nodes exist, they MUST ensure that realm-reports are kept
           in sync. This includes synchronizing the sequence numbers as well as the
           reported overload state. The method of doing so is up to the implementation.
           One way to keep the sequence numbers in sync is to generate the sequence
           numbers based on system time.
         </t>
-->
      </section>
    </section>
    <section title="Protocol Extensibility" anchor="ext">
      <t>
        The DOIC solution can be extended.  Types of potential
        extensions include new traffic
        abatement algorithms, new report types or other new functionality.
      </t>
      <t>
        When defining a new extension that requires new normative behavior,
        the specification MUST define a new feature for
        the OC-Feature-Vector.  This feature bit is used to communicate support
        for the new feature.
      </t>
      <t>
        The extension MAY define new AVPs for use in DOIC Capability
        Announcement and for use in DOIC Overload reporting.  These new AVPs
        SHOULD be defined to be extensions to the OC-Supported-Features or
        OC-OLR AVPs defined in this document.
      </t>
      <t>
        <xref target="RFC6733"/> defined Grouped AVP
        extension mechanisms apply. This allows, for example, defining a
        new feature that is mandatory to be understood even when piggybacked on
        an existing application.
      </t>
<!--
      <t>
        The handling of feature bits in the OC-Feature-Vector AVP that are not
        associated with overload abatement algorithms MUST be specified by the
        extensions that define the features.
      </t>
-->
      <t>
        When defining new report type values, the corresponding specification
        MUST define the semantics of the new report types and how they affect
        the OC-OLR AVP handling.
      </t>
      <t>
        The OC-Supported-Feature and OC-OLR AVPs can be expanded with optional sub-AVPs only if a
        legacy DOIC implementation can safely ignore them without breaking
        backward compatibility for the given OC-Report-Type AVP value.
        Any new sub-AVPs MUST NOT require that the M-bit be set.
      </t>
      <t>
        Documents
        that introduce new report types MUST describe any limitations on
        their use across non-supporting agents.
      </t>
      <t>
         As with any
        Diameter specification, RFC6733 requires all new AVPs to be registered with IANA.
        See <xref target="iana"/> for the required procedures.
        New features (feature bits in the OC-Feature-Vector AVP) and report types
        (in the OC-Report-Type AVP) MUST be registered with IANA.
      </t>
    </section>
    </section>
    <section title="Loss Algorithm" anchor="loss">
      <t>
        This section documents the Diameter overload loss abatement algorithm.
      </t>
      <section title="Overview">
        <t>
          The DOIC specification supports the ability for multiple overload abatement
          algorithms to be specified.  The abatement algorithm used for any
          instance of overload is determined by the Diameter Overload Capability
          Announcement process documented in <xref target="capa"/>.
        </t>
        <t>
          The loss algorithm described in this section is the default algorithm that
          must be supported by all Diameter nodes that support DOIC.
        </t>
        <t>
          The loss algorithm is designed to be a straightforward and stateless overload
          abatement algorithm.  It is used by reporting nodes to request a percentage
          reduction in the amount of traffic sent.  The traffic
          impacted by the requested reduction depends on the type of overload report.
        </t>
        <t>
          Reporting nodes request the stateless reduction of the number of requests
          by an indicated percentage.  This percentage reduction is in comparison
          to the number of messages the node otherwise would send, regardless
          of how many requests the node might have sent in the past.
        </t>
        <t>
          From a conceptual level, the logic at the reacting node could be outlined
          as follows.
        </t>
        <t>
          <list style="numbers">
            <t>
              An overload report is received and the associated OCS is
              either saved or updated (if required) by the reacting node.
            </t>
            <t>
              A new Diameter request is generated by the application running on
              the reacting node.
            </t>
            <t>
              The reacting node determines that an active overload report applies
              to the request, as indicated by the corresponding OCS entry.
            </t>
            <t>
              The reacting node determines if overload abatement treatment
              should be applied to the request.
              One approach that could be taken for each request is to select a random
              number between
              1 and 100.  If the random number is less than or equal to the indicated reduction
              percentage then the request is given abatement treatment, otherwise
              the request is given normal routing treatment.
            </t>
          </list>
        </t>
      </section>
      <section title="Reporting Node Behavior">
        <t>
          The method a reporting node uses to determine the amount of traffic
          reduction required to address an overload condition is an implementation
          decision.
        </t>
        <t>
          When a reporting node that has selected the loss abatement algorithm
          determines the need to request a reduction in traffic, it includes
          an OC-OLR AVP in answer messages as described in
          <xref target="olr-reporting"/>.
        </t>
        <t>
          When sending the OC-OLR AVP, the reporting node MUST
          indicate a percentage reduction in the OC-Reduction-Percentage AVP.
        </t>
        <t>
          The reporting node MAY change the reduction percentage in subsequent
          overload reports.  When doing so the reporting node must conform to
          overload report handing specified in <xref target="olr-reporting"/>.
        </t>
<!--
        <t>
          When the reporting node determines it no longer needs a reduction
          in traffic the reporting node SHOULD send an overload report indicating
          the overload report is no longer valid, as specified in
          <xref target="olr-reporting"/>.
        </t>
-->
      </section>
      <section title="Reacting Node Behavior">
          <!-- New text pulling from information spread through the document-->
        <t>
          The method a reacting node uses to determine which request messages
          are given abatement treatment is an implementation decision.
        </t>
        <t>
          When receiving an OC-OLR in an answer message where the algorithm
          indicated in the OC-Supported-Features AVP is the loss algorithm, the
          reacting node MUST apply abatement treatment to the requested
          percentage of request messages sent.
        </t>
        <t><list><t>
          Note: The loss algorithm is a stateless algorithm.  As a result, the
          reacting node does not guarantee that there will be an absolute reduction
          in traffic sent.  Rather, it guarantees that the requested percentage of
          new requests will be given abatement treatment.
        </t></list></t>
<!--
        <t>
          When applying overload abatement treatment for the loss abatement
          algorithm, the reacting node MUST abate
          the requested percentage of requests that would have otherwise
          been sent to the reporting host or realm.
        </t>
-->
        <t>
          If reacting node comes out of the 100 percent traffic
          reduction as a result of the overload report timing out,
          the reacting node sending the
          traffic SHOULD be conservative and, for example, first send "probe"
          messages to learn the overload condition of the overloaded node before
          converging to any traffic amount/rate decided by the sender. Similar
          concerns apply in all cases when the overload report times out unless
          the previous overload report stated 0 percent reduction.
        </t>
        <t><list><t>
          The goal of this behavior is to reduce the probability of overload
          condition thrashing where an immediate transition from 100% reduction
          to 0% reduction results in the reporting node moving quickly back into
          an overload condition.
        </t></list></t>
<!--
        <t>
          If the reacting node does not receive an OLR in answers received from
          the formerly overloaded node then the reacting node SHOULD
          slowly increase the rate of traffic sent to the overloaded node.
        </t>
-->
      </section>
    </section>
    <section title="Attribute Value Pairs" anchor="avps">
      <t>
       This section describes the encoding and semantics of the Diameter Overload
       Indication Attribute Value Pairs (AVPs) defined in this document.
      </t>
<!--
      <t>
        When added to existing commands, both OC-Feature-Vector and OC-OLR AVPs
        SHOULD have the M-bit flag cleared to avoid backward compatibility
        issues.
      </t>
-->

      <section title="OC-Supported-Features AVP" anchor="fvec">
        <t>
         The OC-Supported-Features AVP (AVP code TBD1) is of type Grouped and serves two
         purposes. First, it announces a node's support for the DOIC solution in general. Second, it
         contains the description of the supported DOIC features of the sending node. The
         OC-Supported-Features AVP MUST be included in every Diameter request
         message a DOIC supporting
         node sends.
        </t>
        <figure>
<artwork><![CDATA[
   OC-Supported-Features ::= < AVP Header: TBD1 >
                             [ OC-Feature-Vector ]
                           * [ AVP ]
]]>
          </artwork>
        </figure>
<!--
<t>
The OC-Feature-Vector sub-AVP is used to announce the DOIC features
         supported by the DOIC node, in the form of a flag-bits field in which
         each bit announces one feature or capability supported by the node (see
         <xref target="features"/>). The absence of the OC-Feature-Vector AVP
         indicates that only the default traffic abatement algorithm described
         in this specification is supported.
        </t>
        <t>
         A reacting node includes this AVP to indicate its capabilities to a
         reporting node. For example, the reacting node may indicate
         which (future defined) traffic abatement algorithms it supports in
         addition to the default.
        </t>
        <t>
         During the message exchange the DOIC nodes express
         their common set of supported capabilities. The reacting node includes
         the OC-Supported-Features AVP that announces what it supports. The
         reporting node that sends the answer also includes the
         OC-Supported-Features AVP that describes the capabilities it supports.
         The set of capabilities advertised by the reporting node depends on
         local policies. Since the loss abatement algorithm <xref target="loss"/>
         is mandatory to implement
         DOIC can always be enabled between these DOIC nodes.
        </t>
-->
      </section>

      <section title="OC-Feature-Vector AVP" anchor="features">
       <t>
         The OC-Feature-Vector AVP (AVP code TBD2) is of type Unsigned64 and
         contains a 64 bit flags field of announced capabilities of a
         DOIC node. The value of zero (0) is reserved.
       </t>
       <t>
         The OC-Feature-Vector sub-AVP is used to announce the DOIC features
         supported by the DOIC node, in the form of a flag-bits field in which
         each bit announces one feature or capability supported by the node.
         The absence of the OC-Feature-Vector AVP in request
         messages indicates that only the default traffic abatement algorithm
         described in this specification is supported. The absence of the OC-
         Feature-Vector AVP in answer messages indicates that the default
         traffic abatement algorithm described in this specification is selected
         (while other traffic abatement algorithms may be supported), and no
         features other than abatement algorithms are supported.
       </t>
       <t>
         The following capabilities are defined in this document:
       </t>
       <t> <list style="hanging">
        <t hangText="OLR_DEFAULT_ALGO (0x0000000000000001)"> <vspace blankLines="1"/>
         When this flag is set by the a DOIC reacting node it means
         that the default traffic abatement (loss) algorithm is supported.
         When this flag is set by a DOIC reporting node it means that the loss
         algorithm will be used for requested overload abatement.
        </t></list>
       </t>
      </section>

      <section title="OC-OLR AVP" anchor="olr">
        <t>
         The OC-OLR AVP (AVP code TBD3) is of type Grouped and contains the
         information necessary to convey an overload report on an overload
         condition at the reporting node.
<!--           The OC-OLR AVP does not explicitly
         contain all information needed by the reacting node to decide whether
         a subsequent request must undergo abatement using the selected
         abatement algorithm.  The value of the OC-Report-Type AVP within the
         OC-OLR AVP indicates which implicit information is relevant for this
         decision (see <xref target="rtype"/>).
-->
         The application the OC-OLR AVP applies
         to is the same as the Application-Id found in the Diameter message
         header.  The host or realm the OC-OLR AVP concerns is determined from
         the Origin-Host AVP and/or Origin-Realm AVP found in the
         encapsulating Diameter command.  The OC-OLR AVP is intended to be
         sent only by a reporting node.
        </t>
        <figure>
<artwork><![CDATA[
   OC-OLR ::= < AVP Header: TBD2 >
              < OC-Sequence-Number >
              < OC-Report-Type >
              [ OC-Reduction-Percentage ]
              [ OC-Validity-Duration ]
            * [ AVP ]
]]>
          </artwork>
        </figure>
<!--
        <t>
         Note that if a Diameter command were to contain multiple OC-OLR AVPs
         they all MUST have different OC-Report-Type AVP value. OC-OLR AVPs with
         unknown values SHOULD be silently discarded by reacting nodes
         and the event SHOULD be logged.
        </t>
-->
      </section>
      <section title="OC-Sequence-Number AVP" anchor="tstamp">
        <t>
         The OC-Sequence-Number AVP (AVP code TBD4) is of type Unsigned64. Its usage
         in the context of overload control is described in Section
         <xref target="olr-proc" format="counter"/>.
        </t>
        <t>
         From the functionality point of view, the OC-Sequence-Number AVP is
         used as a non-volatile increasing counter for a sequence of overload reports
         between two DOIC nodes for the same overload occurrence.
         Sequence numbers are treated in a uni-directional manner, i.e. two
         sequence numbers on each direction between two DOIC nodes are not
         related or correlated.
        </t>
<!--
        <t>
         When generating sequence numbers, the new sequence number MUST be
         greater than any sequence number in an active, unexpired, overload report
         previously sent by the reporting node. This property MUST hold
         over a reboot of the reporting node.
        </t>
-->
      </section>
      <section title="OC-Validity-Duration AVP" anchor="valid">
        <t>
         The OC-Validity-Duration AVP (AVP code TBD5) is of type Unsigned32
         and indicates in seconds the validity time of the overload report.
         The number of seconds is measured after reception of the first
         OC-OLR AVP with a given value of OC-Sequence-Number AVP.
         The default value for the OC-Validity-Duration AVP is 30 seconds.
         When the OC-Validity-Duration AVP is not present in the
         OC-OLR AVP, the default value applies.  The maximum value for the
         OC-Validity-Duration AVP is 86,400 seconds (24 hours).
        </t>
<!--
        <t>
         A timeout of the overload report has specific concerns that need to be
         taken into account by the DOIC node acting on the earlier received
         overload report(s). <xref target="redur"/> discusses the impacts of
         timeout in the scope of the traffic abatement algorithms.
        </t>
        <t>
         When a reporting node has recovered from overload, it SHOULD invalidate
         any existing overload reports in a timely matter. This can be achieved
         by sending an updated overload report (meaning the OLR contains a new
         sequence number) with the OC-Validity-Duration AVP value set to zero
         ("0"). If the overload report is about to expire naturally, the reporting
         node MAY choose to simply let it do so.
        </t>
        <t>
          A reacting node MUST invalidate and remove an overload report that
          expires without an explicit overload report containing an OC-Validity-Duration
          value set to zero ("0").
        </t>
-->
      </section>
      <section title="OC-Report-Type AVP" anchor="rtype">
        <t>
         The OC-Report-Type AVP (AVP code TBD6) is of type Enumerated. The value
         of the AVP describes what the overload report concerns. The following
         values are initially defined:
        </t>
        <t>
          <list style="hanging">
            <t hangText="HOST_REPORT 0">
              The overload report is for a host.   Overload abatement treatment
              applies to host-routed requests.
            </t>
            <t hangText="REALM_REPORT 1">
              The overload report is for a realm.   Overload abatement treatment
              applies to realm-routed requests.
            </t>
          </list>
        </t>
      </section>
      <section title="OC-Reduction-Percentage AVP" anchor="redur">
        <t>
         The OC-Reduction-Percentage AVP (AVP code TBD7) is of type Unsigned32
         and describes the percentage of the traffic that the sender is
         requested to reduce, compared to what it otherwise would send.
         The OC-Reduction-Percentage AVP applies to the default (loss)
         algorithm specified in this specification. However, the AVP can be
         reused for future abatement algorithms, if its semantics fit into the
         new algorithm.
        </t>
        <t>
         The value of the Reduction-Percentage AVP is between zero (0) and one
         hundred (100). Values greater than 100 are ignored. The
         value of 100 means that all traffic is to be throttled, i.e. the reporting node
         is under a severe load and ceases to process any new messages. The
         value of 0 means that the reporting node is in a stable state and has
         no need for the reacting node to apply any traffic abatement.
        </t>
      </section>
      <section title="Attribute Value Pair flag rules">
        <figure>
          <artwork><![CDATA[
                                                      +---------+
                                                      |AVP flag |
                                                      |rules    |
                                                      +----+----+
                           AVP   Section              |    |MUST|
    Attribute Name         Code  Defined  Value Type  |MUST| NOT|
   +--------------------------------------------------+----+----+
   |OC-Supported-Features  TBD1  7.1      Grouped     |    | V  |
   +--------------------------------------------------+----+----+
   |OC-Feature-Vector      TBD2  7.2      Unsigned64  |    | V  |
   +--------------------------------------------------+----+----+
   |OC-OLR                 TBD3  7.3      Grouped     |    | V  |
   +--------------------------------------------------+----+----+
   |OC-Sequence-Number     TBD4  7.4      Unsigned64  |    | V  |
   +--------------------------------------------------+----+----+
   |OC-Validity-Duration   TBD5  7.5      Unsigned32  |    | V  |
   +--------------------------------------------------+----+----+
   |OC-Report-Type         TBD6  7.6      Enumerated  |    | V  |
   +--------------------------------------------------+----+----+
   |OC-Reduction                                      |    |    |
   |  -Percentage          TBD7  7.7      Unsigned32  |    | V  |
   +--------------------------------------------------+----+----+
]]>
          </artwork>
        </figure>
       <t>
        As described in the Diameter base protocol <xref target="RFC6733"/>,
        the M-bit usage for a given AVP in a given command may be defined
        by the application.
       </t>
<!--
       <t>
         The Diameter overload control AVPs SHOULD always be sent with the M-bit
         cleared when used within existing Diameter applications to avoid
         backward compatibility issues. Otherwise, when reused in newly defined
         Diameter applications, the DOC related AVPs SHOULD have the M-bit set.
       </t>
-->
      </section>

    </section>
    <section title="Error Response Codes" anchor="errors">
      <t>
        When a DOIC node rejects a Diameter request due to overload, the DOIC
        node MUST select an appropriate error response code.  This determination
        is made based on the probability of the request succeeding if retried on a different
        path.
      </t>
      <t><list><t>
        Note: This only applies for DOIC nodes that are not the originator of the request.
      </t></list></t>
      <t>
        A reporting node rejecting a Diameter request due to an overload condition
        SHOULD send a DIAMETER_TOO_BUSY error response, if it can assume that the same
        request may succeed on a different path.
      </t>
      <t>
        If a reporting node knows or assumes that the same request will not succeed on a
        different path, DIAMETER_UNABLE_TO_COMPLY error response SHOULD be used. Retrying
        would consume valuable resources during an occurrence of overload.
      </t>
      <t><list>
        <t>
          For instance, if the request arrived at the reporting node without
          a Destination-Host AVP then the reporting node might determine
          that there is an alternative Diameter node that could successfully
          process the request and that retrying the transaction would not
          negatively impact the reporting node. DIAMETER_TOO_BUSY would be sent
          in this case.
        </t>
        <t>
          If the request arrived at the reporting node with a
          Destination-Host AVP populated with its own Diameter identity then
          the reporting node can assume that retrying the request would
          result in it coming to the same reporting node. DIAMETER_UNABLE_TO_COMPLY
          would be sent in this case.
        </t>
        <t>
          A second example is when an agent that supports the DOIC solution
          is performing the role of a reacting node for a non supporting
          client.  Requests that are rejected as a result of DOIC throttling
          by the agent in this scenario would generally be rejected with a
          DIAMETER_UNABLE_TO_COMPLY response code.
        </t>
      </list></t>
<!--
      <t>
        The DIAMETER_TOO_BUSY response code SHOULD be used when the request is likely
        to succeed on a different path.
      </t>
      <t><list>
        <t>
          For instance, if the request arrived at the reporting node without a Destination-Host
          AVP then the reporting node might determine that there is an alternative Diameter node
          that could successfully process the request and that retrying the transaction would
          not negatively impact the reporting node.
        </t>
      </list></t>
      <t>
        The DIAMETER_UNABLE_TO_COMPLY response code SHOULD be used to indicate that
        the request should not be retried.  This is used when the request
        is not likely to succeed on a different path and retrying would consume valuable
        resources during an occurance of overload.
      </t>
      <t><list>
        <t>
          For instance, if the request arrived at the reporting node with a Destination-Host
          AVP populated with its own Diameter identity then the reporting node can assume
          that retrying the request would result in it coming to the same reporting node.
        </t>
        <t>
          A second example is when an agent that supports the DOIC solution
          is preforming the role of a reacting node for a non supporting client.  Requests that
          are rejected as a result of DOIC throttling in this scenario would generally
          be rejected with a DIAMETER_UNABLE_TO_COMPLY response code.
        </t>
      </list></t>
-->
    </section>

    <section title="IANA Considerations" anchor="iana">
      <section title="AVP codes">
        <t>
         New AVPs defined by this specification are listed in
         <xref target="avps"/>. All AVP codes are allocated from the
         'Authentication, Authorization, and Accounting (AAA) Parameters' AVP
         Codes registry.
        </t>
      </section>
      <section title="New registries">
        <t>
         Two new registries are needed under the 'Authentication,
         Authorization, and Accounting (AAA) Parameters' registry.
        </t>
        <t>
         A new "Overload Control Feature Vector"
         registry is required. The registry must contain the following:
       </t>
       <t><list>
         <t>
           Feature Vector Value
         </t>
         <t>
           Specification - the specification that defines
           the new value.
         </t>
       </list></t>
       <t>
         See <xref target="features"/> for the initial
         Feature Vector Value in the registry.  This specification is the specification
         defining the value.
         New values can be added
         into the registry using the Specification Required policy.
         <xref target="RFC5226"/>.
        </t>
        <t>
         A new "Overload Report Type" registry is required.
         The registry must contain the following:
       </t>
       <t><list>
         <t>
           Report Type Value
         </t>
         <t>
           Specification - the specification that defines
           the new value.
         </t>
       </list></t>
       <t>
         See <xref target="rtype"/> for the initial
         assignment in the registry.  New types can be added using the
         Specification Required policy <xref target="RFC5226"/>.
        </t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>
       DOIC gives Diameter nodes the ability to request that
       downstream nodes send fewer Diameter requests. Nodes do this by
       exchanging overload reports that directly effect this reduction. This
       exchange is potentially subject to multiple methods of attack, and has
       the potential to be used as a Denial-of-Service (DoS) attack vector.
      </t>
      <t>
       Overload reports may contain information about the topology and current
       status of a Diameter network. This information is potentially
       sensitive. Network operators may wish to control disclosure of overload
       reports to unauthorized parties to avoid its use for competitive
       intelligence or to target attacks.
      </t>
      <t>
       Diameter does not include features to provide end-to-end
       authentication, integrity protection, or confidentiality. This may
       cause complications when sending overload reports between non-adjacent
       nodes.
      </t>
      <section title="Potential Threat Modes">
        <t>
         The Diameter protocol involves transactions in the form of requests
         and answers exchanged between clients and servers. These clients and
         servers may be peers, that is, they may share a direct transport (e.g.
         TCP or SCTP) connection, or the messages may traverse one or more
         intermediaries, known as Diameter Agents. Diameter nodes use TLS,
         DTLS, or IPsec to authenticate peers, and to provide confidentiality
         and integrity protection of traffic between peers. Nodes can make
         authorization decisions based on the peer identities authenticated at
         the transport layer.
        </t>
        <t>
         When agents are involved, this presents an effectively transitive
         trust model. That is, a Diameter client or server can authorize an
         agent for certain actions, but it must trust that agent to make
         appropriate authorization decisions about its peers, and so on.
         Since confidentiality and integrity protection occurs at the
         transport layer, agents can read, and perhaps modify, any part of a
         Diameter message, including an overload report.
        </t>
        <t>
         There are several ways an attacker might attempt to exploit the
         overload control mechanism. An unauthorized third party might inject
         an overload report into the network. If this third party is upstream
         of an agent, and that agent fails to apply proper authorization
         policies, downstream nodes may mistakenly trust the report. This
         attack is at least partially mitigated by the assumption that nodes
         include overload reports in Diameter answers but not in requests.
         This requires an attacker to have knowledge of the original request
         in order to construct an answer. Such an answer would also need to
  		 arrive at a Diameter node via a protected transport connection.
         Therefore, implementations MUST
         validate that an answer containing an overload report is a properly
         constructed response to a pending request prior to acting on the
         overload report, and that the answer was received via an appropriate
		 transport connection.
        </t>
        <t>
         A similar attack involves a compromised but otherwise authorized node that
         sends an inappropriate overload report. For example, a server for the
         realm "example.com" might send an overload report indicating that a
         competitor's realm "example.net" is overloaded. If other nodes act on
         the report, they may falsely believe that "example.net" is
         overloaded, effectively reducing that realm's capacity. Therefore,
         it's critical that nodes validate that an overload report received
         from a peer actually falls within that peer's responsibility before
         acting on the report or forwarding the report to other peers. For
         example, an overload report from a peer that applies to a realm not
         handled by that peer is suspect.
        </t>
		<t>
			<list>
				<t>
					This attack is partially mitigated by the fact that the
					application, as well as host and realm, for a given OLR
					is determined implicitly by respective AVPs in the enclosing
					answer. If a reporting node modifies any of those AVPs,
					the enclosing transaction will also be affected.
				</t>
			</list>
		</t>
      </section>
      <section title="Denial of Service Attacks">
        <t>
         Diameter overload reports, especially realm-reports, can cause a node to cease sending
 		 some or all Diameter requests for an extended period. This makes them a tempting
		 vector for DoS attacks. Furthermore, since Diameter is almost always used in support
		 of other protocols, a DoS attack on Diameter is likely to impact those protocols
		 as well. Therefore, Diameter nodes MUST NOT honor or forward OLRs received from peers
		 that are not trusted to send them.
        </t>
        <t>
         An attacker might use the information in an OLR to assist
         in DoS attacks. For example, an attacker could use information
         about current overload conditions to time an attack for maximum
         effect, or use subsequent overload reports as a feedback mechanism to
         learn the results of a previous or ongoing attack. Operators need the ability
		 to ensure that OLRs are not leaked to untrusted parties.
        </t>
      </section>
      <section title="Non-Compliant Nodes">
        <t>
         In the absence of an overload control mechanism, Diameter nodes need to implement
         strategies to protect themselves from floods of requests, and to make sure that a
         disproportionate load from one source does not prevent other sources from receiving
         service. For example, a Diameter server might throttle a certain percentage of requests from
         sources that exceed certain limits. Overload control can be thought of as an optimization
         for such strategies, where downstream nodes never send the excess requests in the first
         place. However, the presence of an overload control mechanism does not remove the need
         for these other protection strategies.
        </t>
        <t>
         When a Diameter node sends an overload report, it cannot assume that all nodes will comply,
		 even if they indicate support for DOIC.
         A non-compliant node might continue to send requests with no reduction in load. Such
 		 non-compliance could be done accidentally, or maliciously to gain an
		 unfair advantage over
 		 compliant nodes. <xref target="RFC7068"> Requirement 28 </xref> indicates that the
		 overload control solution cannot assume that all Diameter nodes in a network are
		 trusted, and that malicious nodes not be allowed to take advantage of the overload
		 control mechanism to get more than their fair share of service.
        </t>
      </section>
      <section title="End-to End-Security Issues">
        <t>
         The lack of end-to-end integrity features makes it  difficult to establish trust in
         overload reports received from non-adjacent nodes. Any agents in the message path may
         insert or modify overload reports. Nodes must trust that their adjacent peers perform
         proper checks on overload reports from their peers, and so on, creating a transitive-trust
         requirement extending for potentially long chains of nodes. Network operators must
         determine if this transitive trust requirement is acceptable for their deployments. Nodes
         supporting Diameter overload control MUST give operators the ability to select which peers
         are trusted to deliver overload reports, and whether they are trusted to forward overload
         reports from non-adjacent nodes. DOIC nodes MUST strip DOIC AVPs from messages received
		 from peers that are not trusted for DOIC purposes.
        </t>
        <t>
         The lack of end-to-end confidentiality protection means that any Diameter agent in the path
         of an overload report can view the contents of that report. In addition to the requirement
         to select which peers are trusted to send overload reports, operators MUST be able to
         select which peers are authorized to receive reports. A node MUST NOT send an overload
         report to a peer not authorized to receive it. Furthermore, an agent MUST remove any
         overload reports that might have been inserted by other nodes before forwarding a Diameter
         message to a peer that is not authorized to receive overload reports.
        </t>
		<t>
			<list>
				<t>
					A DOIC node cannot always automatically detect that a peer also
					supports DOIC. For example,
					a node might have a peer that is a non-supporting agent. If nodes on the
					other side of that agent send OC-Supported-Features AVPs, the agent
					is likely to forward them as unknown AVPs. Messages received across the
					non-supporting agent may be indistinguishable from messages received
					across a DOIC supporting agent, giving the false impression
					that the non-supporting agent actually supports DOIC. This complicates
					the transitive-trust
					nature of DOIC. Operators need to be careful to avoid situations where
					a non-supporting agent is mistakenly trusted to enforce DOIC related
					authorization policies.
				</t>
			</list>
		</t>
        <t>
         At the time of this writing, the DIME working group is studying <xref
         target="I-D.ietf-dime-e2e-sec-req"> requirements for adding end-to-end security features </xref>
         to Diameter. These features, when they become available, might make it easier to
         establish trust in non-adjacent nodes for overload control purposes. Readers should be
         reminded, however, that the overload control mechanism encourages Diameter agents to modify
         AVPs in, or insert additional AVPs into, existing messages that are originated by other
         nodes. If end-to-end security is enabled, there is a risk that such modification could
         violate integrity protection. The details of using any future Diameter end-to-end security
         mechanism with overload control will require careful consideration, and are beyond the
         scope of this document.
        </t>
      </section>
    </section>
    <section title="Contributors">
      <t>
       The following people contributed substantial ideas, feedback, and
       discussion to this document:
      </t>
      <t>
       <list style="symbols">
         <t>
          Eric McMurry
         </t>
         <t>
          Hannes Tschofenig
         </t>
         <t>
          Ulrich Wiehe
         </t>
         <t>
          Jean-Jacques Trottin
         </t>
         <t>
          Maria Cruz Bartolome
         </t>
         <t>
          Martin Dolly
         </t>
         <t>
          Nirav Salot
         </t>
         <t>
          Susan Shishufeng
         </t>
       </list>
      </t>

    </section>

  </middle>
<!-- ====================================================================== -->
  <back>
    <references title="Normative References">
  &RFC2119;
  &RFC6733;
  &RFC5226;

 </references>
    <references title="Informative References">
  &RFC7068;
  &RFC4006;

  &I-D.ietf-dime-e2e-sec-req;
    <reference anchor='S13'>
        <front>
            <title>ETSI TS 129 272 V11.9.0  </title>
            <author surname='3GPP'>
                <organization abbrev='3GPP'>
                3GPP
                </organization>
            </author>

            <date month='December' year='2012' />
        </front>
  </reference>

      <reference anchor='Cx'>
        <front>
            <title>ETSI TS 129 229 V11.4.0  </title>
            <author surname='3GPP'>
                <organization abbrev='3GPP'>
                3GPP
                </organization>
            </author>

            <date month='August' year='2013' />
        </front>
  </reference>

      <reference anchor='PCC'>
        <front>
            <title>ETSI TS 123 203 V11.12.0  </title>
            <author surname='3GPP'>
                <organization abbrev='3GPP'>
                3GPP
                </organization>
            </author>

            <date month='December' year='2013' />
        </front>
      </reference>

  <!--
<reference anchor="3GPP23203">
<front>
<title>3GPP.23.202</title>
<author>
<organization>3GPP</organization>
</author>
<date month="February" year="2014"/>
</front>
</reference>
<reference anchor="3GPP29229">
<front>
<title>3GPP.23.202</title>
<author>
<organization>3GPP</organization>
</author>
<date month="February" year="2014"/>
</front>
</reference>
<reference anchor="3GPP29272">
<front>
<title>3GPP.23.202</title>
<author>
<organization>3GPP</organization>
</author>
<date month="February" year="2014"/>
</front>
</reference>
-->
 </references>
<!-- ====================================================================== -->
    <section title="Issues left for future specifications" anchor="ffs">
      <t>
       The base solution for the overload control does not cover all possible
       use cases. A number of solution aspects were intentionally left for
       future specification and protocol work.  The following sub-sections
       define some of the potential extensions to the DOIC solution.
      </t>
      <section title="Additional traffic abatement algorithms">
        <t>
         This specification describes only means for a simple loss based
         algorithm. Future algorithms can be added using the designed solution
         extension mechanism. The new algorithms need to be registered with
         IANA. See Sections <xref target="fvec" format="counter"/> and
         <xref target="iana" format="counter"/> for the required IANA steps.
        </t>
      </section>
      <section title="Agent Overload">
        <t>
         This specification focuses on Diameter endpoint (server or client)
         overload. A separate extension will be required to outline the
         handling of the case of agent overload.
        </t>
      </section>
      <section title="New Error Diagnostic AVP">
        <t>
          This specification indicates the use of existing error messages when
          nodes reject requests due to overload. The DIME working group is
          considering defining additional error codes or AVPs to indicate that
          overload was the reason
          for the rejection of the message.
        </t>
      </section>
<!--
      <section title="DIAMETER_TOO_BUSY clarifications">
        <t>The current <xref target="RFC6733"/> behavior in a case of DIAMETER_TOO_BUSY
        is somewhat under specified. For example, there is no information how long the
        specific Diameter node is willing to be unavailable. A specification updating
        <xref target="RFC6733"/> should clarify the handling of DIAMETER_TOO_BUSY from
        the error answer initiating Diameter node point of view and from the original
        request initiating Diameter node point of view. Further, the inclusion of
        possible additional information providing AVPs should be discussed and possible
        be recommended to be used.
        </t>
      </section>
-->
    </section>
    <section title="Deployment Considerations">
      <t>
        Non Supporting Agents
      </t>
      <t><list><t>
        Due to the way that realm-routed requests are handled in Diameter networks with
        the server selection for the request done by an agent, network operators should
        enable DOIC at agents that perform server selection first.
      </t></list></t>
      <t>
        Topology Hiding Interactions
      </t>
      <t><list><t>
        There exist proxies that implement what is referred to as Topology Hiding.  This
        can include cases where the agent modifies the Origin-Host in answer messages.
        The behavior of the DOIC solution is not well understood when this happens.
        As such, the DOIC solution does not address this scenario.
      </t></list></t>
    </section>
    <section title="Requirements Conformance Analysis" anchor="reqanal">
      <t>
        This section contains the result of an analysis of the DOIC solutions
        conformance to the requirements defined in <xref target="RFC7068"/>.
      </t>
	<section title="Deferred Requirements">
	 <t>
	 	The 3GPP has adopted an early version of this document as normative
		references in various Diameter related specifications to support the
		overload control mechanism in their release 12 framework. The DIME working
		group has therefore decided to defer certain requirements in order
		to complete the design of an extensible, generic solution before the deadline
		scheduled by the 3GPP for the completion of the release 12 protocol work by
		the end of 2014. The deferred work includes the following:
	 </t>
	<t>
		<list style="symbols">
			<t>Agent Overload - The ability for an agent to report an
				overload condition of the agent itself.</t>
			<t>Load Information - The ability for a node to report its load
				level when not overloaded.</t>
		</list>
	</t>
	<t>At the time of this writing, DIME has begun separate work efforts
		for these requirements.</t>
	</section>
	<section title="Detection of non-supporting Intermediaries">
	<t> The DOIC mechanism as currently defined does not allow supporting nodes
		to automatically determine whether OC-Supported-Features or OC-OLR AVPs
		are originated by a peer node, or by a non-peer node and sent across
		a non-supporting peer. This makes it impossible to
		detect the presence of non-supporting nodes between supporting nodes,
		except by configuration. The working group determined that such a
		configuration requirement is acceptable.
	 </t>
	 <t>
	 	This limits full compliance with certain requirements related
	  	to the limitation of new configuration, deployment in
		environments with mixed support, operating across non-supporting
		agents, and authorization.
	 </t>
 	 </section>
 	<section title="Implicit Application Indication">
		<t>
			The working group elected to determine the application for
			an overload report from that of the enclosing message.
			This prevents sending an OLR for an application when there are
			no transactions for that application.
		</t>
		<t>
		    As a consequence, DOIC does not comply with the
			requirement to be able to report overload information across
			quiescent connections. DOIC does not fully comply
			with requirements to operate on up-to-date information,
			since if an OLR causes all transactions to stop for an application,
			the only way traffic will resume is for the OLR to expire.

		</t>
	</section>
	<section title="Stateless Operation">
		<t>
			RFC7068 explicitly discourages the sending of OLRs in every answer message,
			as part of the requirement to avoid additional work for overloaded nodes.
			DOIC recommends exactly that behavior during active overload conditions.
			The working group determined that doing otherwise would reduce reliability
			and increase statefulness. (Note that DOIC does allow nodes to avoid
			sending OLRs in every answer if they have some other method of ensuring
			that OLRs get to all relevant reacting nodes.)
		</t>
	</section>
	<section title="No New Vulnerabilities">
			<t>
				The working group believes that DOIC is compliant with the requirement
				to avoid introducing new vulnerabilities. However, this requirement may
				warrant an early security expert review.
			</t>
	</section>
	<section title="Detailed Requirements" anchor="req-details">
		<t>
			[RFC Editor: Please remove this section and subsections prior to publication as an RFC.]
		</t>
	<!-- general requirements -->
	      <section title="General">
	        <t>
	         <list style='format REQ %d:' counter='Requirements'>
	           <t>
	            The solution MUST provide a communication method for Diameter
	            nodes to exchange load and overload information.
	            <vspace blankLines="1" />
	           *Partially Compliant*. The mechanism uses new AVPs piggybacked on existing
	           Diameter messages to exchange overload information. It does not currently
				support "load" information or the ability to report overload of an agent.
				These have been left for future extensions.
                <vspace blankLines="1" />
              </t>
               <t>
	            The solution MUST allow Diameter nodes to support overload control
	            regardless of which Diameter applications they support. Diameter
	            clients and agents must be able to use the received load and
	            overload information to support graceful behavior during an
	            overload condition. Graceful behavior under overload conditions is
	            best described by REQ 3.
	            <vspace blankLines="1" />
				*Partially Compliant*. The DOIC AVPs can be used in any application that allows
				the extension of AVPs. However, "load" information is not currently supported.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution MUST limit the impact of overload on the overall
	            useful throughput of a Diameter server, even when the incoming
	            load on the network is far in excess of its capacity. The overall
	            useful throughput under load is the ultimate measure of the value
	            of a solution.
	            <vspace blankLines="1" />
				*Compliant*. DOIC provides information that nodes can use to reduce
				the impact of overload.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            Diameter allows requests to be sent from either side of a
	            connection, and either side of a connection may have need to
	            provide its overload status. The solution MUST allow each side of
	            a connection to independently inform the other of its overload
	            status.
	            <vspace blankLines="1" />
				*Compliant*. DOIC AVPs can be included regardless of transaction
				"direction"
               <vspace blankLines="1" />
	           </t>
	           <t>
	            Diameter allows nodes to determine their peers via dynamic
	            discovery or manual configuration. The solution MUST work
	            consistently without regard to how peers are determined.
	            <vspace blankLines="1" />
				*Compliant*. DOIC contains no assumptions about how peers
				are discovered.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution designers SHOULD seek to minimize the amount of new
	            configuration required in order to work. For example, it is better
	            to allow peers to advertise or negotiate support for the solution,
	            rather than to require that this knowledge to be configured at each
	            node.
	            <vspace blankLines="1" />
				*Partially Compliant*. Most DOIC parameters are advertised using
				the DOIC capability announcement mechanism. However, there are some
				situations where configuration is required. For example, a DOIC node
				detect the fact that a peer may not support DOIC when  nodes
				on the other side of the non-supporting node do support DOIC without
				configuration.
               <vspace blankLines="1" />
	           </t>
	         </list>
	        </t>
	      </section>
	<!-- performance -->
	      <section title="Performance">
	        <t>
	         <list style='format REQ %d:' counter='Requirements'>
	           <t anchor="stability_req">
	            The solution and any associated default algorithm(s) MUST ensure
	            that the system remains stable. At some point after an overload
	            condition has ended, the solution MUST enable capacity to
	            stabilize and become equal to what it would be in the absence of
	            an overload condition. Note that this also requires that the
	            solution MUST allow nodes to shed load without introducing non-converging
	 			oscillations during or after an overload condition.
	            <vspace blankLines="1" />
				*Compliant*. The specification offers guidance that implementations should
				apply hysteresis when recovering from overload, and avoid sudden ramp ups
				in offered load when recovering.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            Supporting nodes MUST be able to distinguish current overload
	            information from stale information.
	            <vspace blankLines="1" />
				*Partially Compliant*. DOIC overload reports are "soft state", that is
				they expire after an indicated period. DOIC nodes may also send reports that
				end existing overload conditions. DOIC requires reporting nodes to ensure that
				all relevant reacting nodes receive overload reports.
	            <vspace blankLines="1" />
				However, since DOIC does not allow reporting nodes to send OLRs in watchdog messages,
				if an overload condition results in zero offered load, the reporting node
				cannot update the condition until the expiration of the original OLR.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution MUST function across fully loaded as well as
	            quiescent transport connections. This is partially derived from
	            the requirement for stability in REQ 7.
	            <vspace blankLines="1" />
				*Not Compliant*. DOIC does not allow OLRs to be sent over quiescent
				transport connections. This is due to the fact that OLRs cannot be sent
				outside of the application to which they apply.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            Consumers of overload information MUST be able to determine when
	            the overload condition improves or ends.
	            <vspace blankLines="1" />
				*Partially Compliant*. (See response to previous two requirements.)
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution MUST be able to operate in networks of different
	            sizes.
	            <vspace blankLines="1" />
				*Compliant*. DOIC makes no assumptions about the size of the network. DOIC
				can operate purely between clients and servers, or across agents.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            When a single network node fails, goes into overload, or suffers
	            from reduced processing capacity, the solution MUST make it
	            possible to limit the impact of the affected node on other nodes in the
	            network. This helps to prevent a small-scale failure from becoming
	            a widespread outage.
	            <vspace blankLines="1" />
				*Partially Compliant*. DOIC allows overload reports for an entire realm, where
				abated traffic will not be redirected towards another server. But in situations
				where nodes choose to divert traffic to other nodes, DOIC offers no way of knowing
				whether the new recipients can handle the traffic if they have not already
				indicated overload. This may be mitigated with the use of a future "load" extension,
				or with the use of proprietary dynamic load-balancing mechanisms.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution MUST NOT introduce substantial additional work for a
	            node in an overloaded state. For example, a requirement for an
	            overloaded node to send overload information every time it
	            received a new request would introduce substantial work.
	            <vspace blankLines="1" />
				*Not Compliant*. DOIC does in fact encourage an overloaded node to
				send an OLR in every response. The working group that other mechanisms
				to ensure that every relevant node receives an OLR would create even more
				work. [Note: This needs discussion.]
               <vspace blankLines="1" />
	           </t>
	           <t>
	            Some scenarios that result in overload involve a rapid increase of
	            traffic with little time between normal levels and levels that induce overload.
	            The solution SHOULD provide for rapid feedback
	            when traffic levels increase.
	            <vspace blankLines="1" />
				*Compliant*. The piggyback mechanism allows OLRs to be sent at the same
				rate as application traffic.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution MUST NOT interfere with the congestion control
	            mechanisms of underlying transport protocols. For example, a
	            solution that opened additional TCP connections when the network
	            is congested would reduce the effectiveness of the underlying
	            congestion control mechanisms.
	            <vspace blankLines="1" />
				*Compliant*. DOIC does not require or recommend changes
				in the handling of transport protocols or connections.
               <vspace blankLines="1" />
	           </t>
	         </list>
	        </t>
	      </section>
	<!-- mixed support -->
	      <section title="Heterogeneous Support for Solution">
	        <t>
	         <list style='format REQ %d:' counter='Requirements'>
	           <t>
	            The solution is likely to be deployed incrementally. The solution
	            MUST support a mixed environment where some, but not all, nodes
	            implement it.
	            <vspace blankLines="1" />
				*Partially Compliant*. DOIC works with most mixed-deployment scenarios.
				However, it cannot work across a non-supporting proxy that modifies Origin-Host
				AVPs in answer messages. DOIC will have limited impact in networks where
				the nodes that perform server selections do not support the mechanism.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            In a mixed environment with nodes that support the solution and
	            nodes that do not, the solution MUST NOT result in materially less
	            useful throughput during overload as would have resulted if the
	            solution were not present. It SHOULD result in less severe
	            overload in this environment.
	            <vspace blankLines="1" />
				*Compliant*. In most mixed-support deployment, DOIC will offer
				at least some value, and will not make things worse.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            In a mixed environment of nodes that support the solution and nodes that
	            do not, the solution MUST NOT preclude elements that support
	            overload control from treating elements that do not support
	            overload control in an equitable fashion relative to those that do.
	            Users and operators of nodes that do not support the solution MUST
	            NOT unfairly benefit from the solution. The solution specification
	            SHOULD provide guidance to implementers for dealing with elements
	            not supporting overload control.
	            <vspace blankLines="1" />
				*Compliant*. DOIC provides mechanisms to abate load from non-supporting sources.
				Furthermore, it recommends that reporting nodes will still need to be able
				to apply whatever protections they would ordinarily apply if DOIC were
				not in use.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            It MUST be possible to use the solution between nodes in different
	            realms and in different administrative domains.
	            <vspace blankLines="1" />
				*Partially Compliant*. DOIC allows sending OLRs across administrative domains,
				and potentially to nodes in other realms. However, an OLR cannot indicate overload
				for realms other than the one in the Origin-Realm AVP of the containing
				answer.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            Any explicit overload indication MUST be clearly distinguishable
	            from other errors reported via Diameter.
	            <vspace blankLines="1" />
				*Compliant*. DOIC sends explicit overload indication in overload
				reports. It does not depend on error result codes.
               <vspace blankLines="1" />
            	</t>
				<t>
	            In cases where a network node fails, is so overloaded that it
	            cannot process messages, or cannot communicate due to a network
	            failure, it may not be able to provide explicit indications of the
	            nature of the failure or its levels of overload. The solution MUST
	            result in at least as much useful throughput as would have
	            resulted if the solution were not in place.
	            <vspace blankLines="1" />
				*Compliant*. DOIC overload reports have the primary effect of suppressing
				 message retries in overload conditions. DOIC recommends that messages never
				be silently dropped if at all possible.
               <vspace blankLines="1" />
	           </t>
	         </list>
	        </t>
	      </section>
	<!-- granular control -->
	      <section title="Granular Control">
	        <t>
	         <list style='format REQ %d:' counter='Requirements'>
	           <t>
	            The solution MUST provide a way for a node to throttle the amount
	            of traffic it receives from a peer node. This throttling SHOULD be
	            graded so that it can be applied gradually as offered load
	            increases. Overload is not a binary state; there may be degrees of
	            overload.
	            <vspace blankLines="1" />
				*Compliant*. The "loss" algorithm expresses a percentage reduction.
                <vspace blankLines="1" />
              </t>
	           <t>
	            The solution MUST provide sufficient information to enable a
				load-balancing node to divert messages that are rejected or otherwise
	            throttled by an overloaded upstream node to other upstream nodes
	            that are the most likely to have sufficient capacity to process
	            them.
	            <vspace blankLines="1" />
				*Not Compliant*. DOIC provides no built in mechanism to determine the best
				place to divert messages that would otherwise be throttled. This
				can be accomplished with a future "load" extension, or with proprietary
				load balancing mechanisms.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution MUST provide a mechanism for indicating load levels,
	            even when not in an overload condition, to assist nodes in making
	            decisions to prevent overload conditions from occurring.
	            <vspace blankLines="1" />
				*Not Compliant*. "Load" information has been left for a future extension.
               <vspace blankLines="1" />
	           </t>
	         </list>
	        </t>
	      </section>
	<!-- priority and policy -->
	      <section title="Priority and Policy">
	        <t>
	         <list style='format REQ %d:' counter='Requirements'>
	           <t>
	            The base specification for the solution SHOULD offer general
	            guidance on which message types might be desirable to send or
	            process over others during times of overload, based on
	            application-specific considerations. For example, it may be more
	            beneficial to process messages for existing sessions ahead of new
	            sessions. Some networks may have a requirement to give priority to
	            requests associated with emergency sessions. Any normative or
	            otherwise detailed definition of the relative priorities of
	            message types during an overload condition will be the
	            responsibility of the application specification.
	            <vspace blankLines="1" />
				*Compliant*. The specification offers guidance on how requests
				might be prioritized for different types of applications.
                <vspace blankLines="1" />
              </t>
	           <t>
	            The solution MUST NOT prevent a node from prioritizing requests
	            based on any local policy, so that certain requests are given
	            preferential treatment, given additional retransmission, not
	            throttled, or processed ahead of others.
	            <vspace blankLines="1" />
				*Compliant*. Nothing in the specification prevents application-specific,
				implementation-specific, or local policies.
               <vspace blankLines="1" />
	           </t>
	         </list>
	        </t>
	      </section>
	<!-- security -->
	      <section title="Security">
	        <t>
	         <list style='format REQ %d:' counter='Requirements'>
	           <t>
	            The solution MUST NOT provide new vulnerabilities to malicious
	            attack or increase the severity of any existing vulnerabilities.
	            This includes vulnerabilities to DoS and DDoS attacks as well as
	            replay and man-in-the-middle attacks. Note that the
	            <xref target="RFC6733"> Diameter base specification </xref> lacks
	            end-to-end security and this must be considered (see
	            the Security Considerations in <xref target="RFC7068"/>).
	 			Note that this requirement was expressed at a high level
	            so as to not preclude any particular solution. It is expected that
	            the solution will address this in more detail.
	            <vspace blankLines="1" />
				*Compliant*. The working group is not aware of any such vulnerabilities.
				[This may need further analysis.]
               <vspace blankLines="1" />
              </t>
	           <t>
	            The solution MUST NOT depend on being deployed in environments
	            where all Diameter nodes are completely trusted. It SHOULD operate
	            as effectively as possible in environments where other nodes are
	            malicious; this includes preventing malicious nodes from obtaining
	            more than a fair share of service. Note that this does not imply
	            any responsibility on the solution to detect, or take
	            countermeasures against, malicious nodes.
	            <vspace blankLines="1" />
				*Partially Compliant*. Since all Diameter security is currently
				at the transport layer, nodes must trust immediate peers to
				enforce trust policies. However, there are situations where
				a DOIC node cannot determine if an immediate peer supports DOIC.
				The authors recommend an expert security review.
                <vspace blankLines="1" />
              </t>
	           <t>
	            It MUST be possible for a supporting node to make authorization
	            decisions about what information will be sent to peer nodes based
	            on the identity of those nodes. This allows a domain administrator
	            who considers the load of their nodes to be sensitive information
	            to restrict access to that information. Of course, in such cases,
	            there is no expectation that the solution itself will help prevent
	            overload from that peer node.
	            <vspace blankLines="1" />
				*Partially Compliant*. (See response to previous requirement.)
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution MUST NOT interfere with any Diameter-compliant method
	            that a node may use to protect itself from overload from
	            non-supporting nodes or from denial-of-service attacks.
	            <vspace blankLines="1" />
				*Compliant*. The specification recommends that any such protection
				mechanism needed without DOIC should continue to be employed with DOIC.
               <vspace blankLines="1" />
	           </t>
	         </list>
	        </t>
	      </section>
	<!-- flexibility and extensibility -->
	      <section title="Flexibility and Extensibility">
	        <t>
	         <list style='format REQ %d:' counter='Requirements'>
	           <t>
	            There are multiple situations where a Diameter node may be
	            overloaded for some purposes but not others. For example, this can
	            happen to an agent or server that supports multiple applications,
	            or when a server depends on multiple external resources, some of
	            which may become overloaded while others are fully available. The
	            solution MUST allow Diameter nodes to indicate overload with
	            sufficient granularity to allow clients to take action based on
	            the overloaded resources without unreasonably forcing available
	            capacity to go unused. The solution MUST support specification of
	            overload information with granularities of at least "Diameter
	            node", "realm", and "Diameter application" and MUST allow
	            extensibility for others to be added in the future.
	            <vspace blankLines="1" />
				*Partially Compliant*. All DOIC overload reports are scoped
				to the specific application and realm. Inside that scope, overload
				can be reported at the specific server or whole realm scope.
				As currently specified, DOIC cannot indicate local overload for
				an agent. At the time of this writing, the DIME working group
				has plans to work on an agent-overload extension.
	            <vspace blankLines="1" />
				DOIC allows new "scopes" through the use of extended report types.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution MUST provide a method for extending the information
	            communicated and the algorithms used for overload control.
	            <vspace blankLines="1" />
				*Compliant*. DOIC allows new report types and abatement algorithms
				to be created. These may be indicated using the OC-Supported-Features
				AVP.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution MUST provide a default algorithm that is mandatory to
	            implement.
	            <vspace blankLines="1" />
				*Compliant*. The "loss" algorithm is mandatory to implement.
               <vspace blankLines="1" />
	           </t>
	           <t>
	            The solution SHOULD provide a method for exchanging overload and
	            load information between elements that are connected by
	            intermediaries that do not support the solution.
	            <vspace blankLines="1" />
				*Partially Compliant*. DOIC information can traverse non-supporting agents,
				as long as those agents do not modify certain AVPs. (e.g., Origin-Host). DOIC
				does not provide a way for supporting nodes to detect such modification.
               <vspace blankLines="1" />
	           </t>
	         </list>
	        </t>
	      </section>
	</section>
    </section>

    <section title="Considerations for Applications Integrating the DOIC Solution">
       <t>
         This section outlines considerations to be taken into account when
         integrating the DOIC solution into Diameter applications.
       </t>

      <section title="Application Classification">
        <t>
         The following is a classification of Diameter applications and
         request types. This discussion is meant to document factors that play
         into decisions made by the Diameter identity responsible for
         handling overload reports.
        </t>
        <t>
         Section 8.1 of <xref target="RFC6733"/> defines two state machines
         that imply two types of applications, session-less and
         session-based applications. The primary difference between these types of
         applications is the lifetime of Session-Ids.
        </t>
        <t>
         For session-based applications, the Session-Id is used to tie
         multiple requests into a single session.
        </t>
        <t>
         The Credit-Control application defined in <xref target="RFC4006"/>
         is an example of a Diameter session-based application.
        </t>
        <t>
         In session-less applications, the lifetime of the Session-Id is a
         single Diameter transaction, i.e. the session is implicitly terminated
         after a single Diameter transaction and a new Session-Id is generated for
         each Diameter request.
        </t>
        <!--t>
The 3GPP-defined S6a application is an example of a session-less
application. The following, copied from section 7.1.4 of 29.272,
explicitly states that sessions are implicitly terminated and that
the server does not maintain session state:
</t>
<t>
<list>
<t>
"Between the MME and the HSS and between the SGSN and the HSS
and between the MME and the EIR, Diameter sessions shall be
implicitly terminated. An implicitly terminated session is one
for which the server does not maintain state information. The
client shall not send any re-authorization or session
termination requests to the server.
</t>
<t>
The Diameter base protocol includes the Auth-Session-State AVP
as the mechanism for the implementation of implicitly terminated
sessions.
</t>
<t>
The client (server) shall include in its requests (responses)
the Auth-Session-State AVP set to the value NO_STATE_MAINTAINED
(1), as described in <xref target="RFC6733"/>. As a consequence,
the server shall not maintain any state information about this
session and the client shall not send any session termination
request. Neither the Authorization-Lifetime AVP nor the
Session-Timeout AVP shall be present in requests or responses."
</t>
</list>
</t-->
        <t>
         For the purposes of this discussion, session-less applications are
         further divided into two types of applications:
        </t>
        <t>
         <list style="hanging">
           <t hangText="Stateless Applications:"><vspace blankLines="1"/>
            Requests within a stateless application have no relationship to
            each other. The 3GPP defined S13 application is an example of a
            stateless application <xref target="S13"/>, where only a
            Diameter command is defined between a client and a server and no
            state is maintained between two consecutive transactions.
           </t>
           <t hangText="Pseudo-Session Applications:"><vspace blankLines="1"/>
              Applications that do not rely on the Session-Id AVP for correlation of application
              messages related to the same session but use other session-related information in the Diameter
              requests for
              this purpose. The 3GPP defined Cx application <xref target="Cx"/>
              is an example of a pseudo-session application.
           </t>
         </list>
        </t>
        <t>
         The handling of overload reports must take the type of application
         into consideration, as discussed in <xref target="app-types"/>.
        </t>

      </section>
      <section title="Application Type Overload Implications" anchor="app-types">
        <t>
         This section discusses considerations for mitigating overload
         reported by a Diameter entity. This discussion focuses on the type
         of application. <xref target="req-class"/> discusses considerations
         for handling various request types when the target server is known
         to be in an overloaded state.
        </t>
         <!--xref target="deploy-scenarios"/>
discusses considerations for handling overload conditions based on
the network deployment scenario.
</t -->
        <t>
         These discussions assume that the strategy for mitigating the
         reported overload is to reduce the overall workload sent to the
         overloaded entity. The concept of applying overload treatment to
         requests targeted for an overloaded Diameter entity is inherent to
         this discussion. The method used to reduce offered load is not
         specified here but could include routing requests to another
         Diameter entity known to be able to handle them, or it could mean
         rejecting certain requests. For a Diameter agent, rejecting
         requests will usually mean generating appropriate Diameter error
         responses. For a Diameter client, rejecting requests will depend
         upon the application. For example, it could mean giving an
         indication to the entity requesting the Diameter service that the
         network is busy and to try again later.
        </t>
        <t>
         <list style="hanging">
           <t hangText="Stateless Applications:"><vspace blankLines="1"/>
            By definition there is no relationship between individual
            requests in a stateless application. As a result, when a request
            is sent or relayed to an overloaded Diameter entity - either a
            Diameter Server or a Diameter Agent - the sending or relaying
            entity can choose to apply the overload treatment to any request
            targeted for the overloaded entity.
           </t>
           <t hangText="Pseudo-Session Applications:"><vspace blankLines="1"/>
            For pseudo-session applications, there is an implied ordering of
            requests. As a result, decisions about which requests towards an
            overloaded entity to reject could take the
            command code of the request into consideration. This generally
            means that transactions later in the sequence of transactions
            should be given more favorable treatment than messages earlier
            in the sequence. This is because more work has already been done
            by the Diameter network for those transactions that occur later
            in the sequence. Rejecting them could result in increasing the
            load on the network as the transactions earlier in the sequence
            might also need to be repeated.
           </t>
           <t hangText="Session-Based Applications:"><vspace blankLines="1"/>
            Overload handling for session-based applications must take into
            consideration the work load associated with setting up and maintaining
            a session. As such, the entity sending requests towards an overloaded
            Diameter entity for a session-based application might tend to reject
            new session requests prior to rejecting intra-session requests. In
            addition, session ending requests might be given a lower
            probability of being rejected as rejecting session ending requests
            could result in session status being out of sync between the
            Diameter clients and servers. Application designers that would decide
            to reject mid-session
            requests will need to consider whether the rejection invalidates
            the session and any resulting session cleanup procedures.
           </t>
         </list>
        </t>

      </section>
      <section title="Request Transaction Classification" anchor="req-class">
        <t>
         <list style="hanging">
           <t hangText="Independent Request:"><vspace blankLines="1"/>
            An independent request is not correlated to any other requests
            and, as such, the lifetime of the session-id is constrained to an
            individual transaction.
           </t>
           <t hangText="Session-Initiating Request:"><vspace blankLines="1"/>
            A session-initiating request is the initial message that
            establishes a Diameter session. The ACR message defined in
            <xref target="RFC6733"/> is an example of a session-initiating
            request.
           </t>
           <t hangText="Correlated Session-Initiating Request:"><vspace blankLines="1"/>
            There are cases when multiple session-initiated requests must be correlated and
            managed by the same Diameter server. It is notably the case in the 3GPP PCC
            architecture <xref target="PCC"/>,
            where multiple apparently independent Diameter application sessions are
            actually correlated and must be
            handled by the same Diameter server.
           </t>
           <t hangText="Intra-Session Request:"><vspace blankLines="1"/>
            An intra-session request is a request that uses the same Session-Id
            than the one used in a previous request. An intra-session request
            generally needs to be delivered to the server that handled the
            session creating request for the session. The STR message
            defined in <xref target="RFC6733"/> is an example of an
            intra-session request.
           </t>
           <t hangText="Pseudo-Session Requests:"><vspace blankLines="1"/>
            Pseudo-session requests are independent requests and do not use
            the same Session-Id but are correlated by other session-related
            information contained in the request. There exists Diameter
            applications that
            define an expected ordering of transactions. This sequencing of
            independent transactions results in a pseudo session. The AIR,
            MAR and SAR requests in the 3GPP defined Cx <xref target="Cx"/> application are
            examples of pseudo-session requests.
           </t>
         </list>
        </t>

      </section>
      <section title="Request Type Overload Implications" anchor="req-type-impl">
        <t>
         The request classes identified in <xref target="req-class"/> have
         implications on decisions about which requests should be throttled
         first. The following list of request treatment regarding throttling is provided as
         guidelines for application designers when implementing the Diameter overload control
         mechanism described in this document. The exact behavior regarding throttling is a matter of
         local policy, unless specifically defined for the application.
        </t>
        <t>
         <list style="hanging">
           <t hangText="Independent Requests:"><vspace blankLines="1"/>
            Independent requests can generally be given equal treatment when making throttling
            decisions, unless otherwise indicated by application requirements or local policy.
           </t>
           <t hangText="Session-Initiating Requests:"><vspace blankLines="1"/>
            Session-initiating requests often represent more work than independent or
            intra-session requests.  Moreover, session-initiating requests are typically
            followed by other session-related requests.  Since the main objective of the
            overload control is to reduce the total number of requests sent to the overloaded
            entity, throttling decisions might favor allowing intra-session requests over
            session-initiating requests.  In the absence of local policies or application
            specific requirements to the contrary, Individual session-initiating requests
            can be given equal treatment when making throttling decisions.
           </t>
           <t hangText="Correlated Session-Initiating Requests:"><vspace blankLines="1"/>
            A Request that results in a new binding, where the binding is
            used for routing of subsequent session-initiating requests to the same server,
            represents more work load than other requests. As such, these
            requests might be throttled more frequently than other request
            types.
           </t>
           <t hangText="Pseudo-Session Requests:"><vspace blankLines="1"/>
            Throttling decisions for pseudo-session requests can take into consideration where
            individual requests fit into the overall sequence of requests
            within the pseudo session. Requests that are earlier in the
            sequence might be throttled more aggressively than requests that
            occur later in the sequence.
           </t>
           <t hangText="Intra-Session Requests:"><vspace blankLines="1"/>
            There are two types of intra-sessions requests, requests that terminate
            a session and the remainder of intra-session requests.  Implementers
            and operators may choose to throttle session-terminating
            requests less aggressively in order to gracefully terminate sessions, allow
            cleanup of the related resources (e.g. session state) and avoid the need for
            additional intra-session requests. Favoring session-termination requests may
            reduce the session management impact on the overloaded entity.  The default
            handling of other intra-session requests might be to treat them equally when
            making throttling decisions.  There might also be application level
            considerations whether some request types are favored over others.
           </t>
         </list>
        </t>
      </section>
    </section>
  </back>
</rfc>
