<?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 RFC7683 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7683.xml'>

<!ENTITY I-D.ietf-dime-doic-rate-control PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-dime-doic-rate-control-03.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-agent-overload-06.txt">
  <front>
    <title abbrev="Diameter Agent Overload and Peer Report">Diameter Agent Overload and the Peer
    Overload Report</title>
    <author initials="S" surname="Donovan" fullname="Steve Donovan">
      <organization>Oracle</organization>
      <address>
        <postal>
          <street>7460 Warren Parkway, Suite 300</street>
          <city>Frisco</city>
          <region>Texas</region>
          <code>75034</code>
          <country>United States</country>
        </postal>
        <email>srdonovan@usdonovans.com</email>
      </address>
    </author>
    <date month="June" year="2016"/>
    <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 documents an extension to the
       Diameter Overload Indication Conveyance (DOIC) <xref target="RFC7683"/> base
       solution.  The extension defines the Peer overload report type.  The
       initial use case for the Peer report is
       the handling of occurrences of overload of a
       Diameter agent.
      </t>
    </abstract>
    <note title="Requirements">
      <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>
    </note>
  </front>

  <middle>

    <section title="Introduction" anchor="intro">
      <t>
        This specification documents an extension to the Diameter Overload
        Indication Conveyance (DOIC) [RFC7683] base solution.  The extension
        defines the Peer overload report type.  The initial use case for the
        Peer report is the handling of occurrences of overload of a Diameter
        agent.
      </t>
    <t>
      This document defines the behavior of Diameter nodes when Diameter agents
      enter an overload condition and send an overload report requesting
      a reduction of traffic.  It also defines new overload report type, the Peer
      overload report type, that is used for handling of agent overload conditions.  The
      Peer overload report type is defined in a generic fashion so that it
      can also be used for other Diameter overload scenaios.
    </t>
    <t>
      The base Diameter overload specification <xref target="RFC7683"/> addresses the
      handling of overload when a Diameter
      endpoint (a Diameter Client or Diameter Server as defined in <xref target="RFC6733"/>)      becomes overloaded.    </t>
    <t>
      In the base specification, the goal is to handle abatement of the overload
      occurrence as close to the source
      of the Diameter traffic as is feasible.  When possible this is done at the
      originator of the traffic, generally referred to as a Diameter Client.
      A Diameter Agent might also handle the overload mitigation.
      For instance, a Diameter Agent might handle Diameter overload mitigation
      when it knows that a Diameter Client does not support the DOIC extension.
    </t>
    <t>
      This document extends the base Diameter endpoint overload specification to
      address the case when Diameter Agents become overloaded.  Just as is the
      case with other Diameter nodes -- Diameter Clients and Diameter
      Servers -- surges in Diameter traffic can cause a Diameter Agent
      to be asked to handle more Diameter traffic than it was configured to handle.
      For a more detailed discussion of what can cause the
      overload of Diameter nodes, refer to the Diameter Overload
      Requirements <xref target="RFC7068"/>.    </t>
    <t>
      This document defines a new overload report type to communicate occurrences
      of agent overload.  This report type works for the "Loss" overload mitigation
      algorithm defined
      in <xref target="RFC7683"/> and is expected to work for other
      overload abatement algorithms defined in extensions to the DOIC solution.
    </t>
<!--
    <t>
      The handling of endpoint overload and agent overload is very similar.
      The primary differences are the following:    </t>
    <t>
    <list style='symbols'>
      <t>
        Endpoint overload is handled as close to the originator of the traffic as possible.      </t>
      <t>
        Agent overload is handled by the previous hop Diameter Node.
      </t>
      <t>
        Endpoint overload mitigation deals with traffic targeted for a single Diameter application.
        As such, it is assumed that an overload report impacts just the application implied by
        the message carrying the overload report.      </t>
      <t>
        Agent overload deals with all traffic targeted to an agent, independent of the application.
        As such, a single agent overload report can impact multiple applications.      </t>
    </list>
    </t>
    <t>
      Editor's Note: Open Issue - Does a peer report apply to the implicitly
      communicated application-id in the same way as host and realm reports do or
      does it apply to all applications handled by the peer?  Do we need the ability
      for to support both cases?
    </t>
    <t>
      Open Issue - To support the ability of an agent to select a different
      abatement algorithm than endpoints, we probably need to extend the
      OC-Supported-Features AVP to include an OC-Abatement-Algorithm AVP.  This
      is currently shown to be in the OC-OLR AVP but needs to be moved as
      this information is needed prior to receiving the OC-OLR.  It probably
      needs to be changed to OC-Peer-Abatement-Algorithm.
    </t>
  -->
    </section>

    <section title="Terminology and Abbreviations" anchor="abbrev">
      <t>
      <list style="hanging">
        <t hangText="Diameter Node">
        <vspace blankLines="1"/>
          A RFC6733 Diameter Client, an RFC6733 Diameter Server, and RFC6733 Diameter Agent.
        </t>
        <t hangText="Diameter Endpoint">
        <vspace blankLines="1"/>
          An RFC6733 Diameter Client and RFC6733 Diameter Server.
        </t>
        <t hangText="Reporting Node">
        <vspace blankLines="1"/>
          A DOIC Node that sends an overload report in a Diameter answer message.
        </t>
        <t hangText="Reacting Node">
        <vspace blankLines="1"/>
          A DOIC Node that receives and acts on a DOIC overload report.
        </t>
        <t hangText="DOIC Node">
        <vspace blankLines="1"/>
          A Diameter Node that supports the DOIC solution defined
          in <xref target="RFC7683"/>.
        </t>
      </list>
      </t>
    </section>

    <section title="Peer Report Use Cases">
      <t>
        This section outlines representative use cases for the peer report
        used to communicate agent overload.
      </t>
      <t>
        There are two primary classes of use cases currently identified,
        those involving the overload of agents and those involving overload
        of Diameter endpoints.  In both cases the goal is to use an overload
        algorithm that controls traffic sent towards peers.
      </t>

      <section title="Diameter Agent Overload Use Cases" anchor="uc-agents">
        <t>
        The peer report needs to support the following use cases.
        </t>
        <section title="Single Agent" anchor="singleagent">
          <t>
            This use case is illustrated in <xref target="usecase1" />.
            In this case, the client sends
            all traffic through the single agent.  If there is a failure in the
            agent then the client is
            unable to send Diameter traffic toward the server.
          </t>
          <t>
          <figure anchor="usecase1">          <artwork align="center"><![CDATA[   +-+    +-+    +-+   |c|----|a|----|s|   +-+    +-+    +-+]]>
          </artwork>
          </figure>
          </t>
          <t>
            A more likely case for the use of agents is illustrated in
            <xref target="usecase2" />.
            In this case, there are multiple servers behind the single agent.
            The client sends
            all traffic through the agent and the agent determines how to
            distribute the traffic
            to the servers based on local routing and load distribution policy.
          </t>
          <t>
          <figure anchor="usecase2">
          <artwork align="center"><![CDATA[                 +-+               --|s|   +-+    +-+ /  +-+   |c|----|a|-   ...   +-+    +-+ \  +-+               --|s|                 +-+]]>
          </artwork>
          </figure>
          </t>
          <t>
            In both of these cases, the occurrence of overload in the single agent must
            by handled by the client in a similar fashion as if the client were handling
            the overload of a directly connected server.  When the agent becomes overloaded
            it will insert an overload report in answer messages flowing to the client.
            This overload report will contain a requested reduction in the amount of
            traffic sent to the agent.  The client will apply overload abatement behavior
            as defined in the base Diameter overload specification
            <xref target="RFC7683"/> or the extension draft that defines the
            indicated overload abatement algorithm.
            This will result in the throttling of the abated traffic
            that would have been sent to the agent, as there is no alternative
            route. An appropriate error response is sent back to the originator of the request.
          </t>
        </section>
        <section title="Redundant Agents" anchor="redundantagents">
          <t>
            <xref target="usecase3" /> and <xref target="usecase4" /> illustrate a second,
            and more likely, type of deployment scenario
            involving agents.  In both of these cases, the client has Diameter
            connections to two agents.
          </t>
          <t>
            <xref target="usecase3" /> illustrates a client that has a primary connection
            to one of the agents (agent a1) and a secondary connection to the other agent
            (agent a2).  In this scenario, under normal circumstances, the client will
            use the primary connection for all traffic.  The secondary connection is
            used when there is a failure scenario of some sort.
          </t>
          <t>
          <figure  anchor="usecase3">
          <artwork align="center"><![CDATA[
          +--+   +-+        --|a1|---|s|   +-+ /  +--+\ /+-+   |c|-        x   +-+ .  +--+/ \+-+        ..|a2|---|s|          +--+   +-+]]>
          </artwork>
          </figure>
          </t>
          <t>
            The second case, in <xref target="usecase4" />, illustrates the case where the
            connections to the agents are both actively used.  In this case, the client
            will have local distribution policy to determine
            the traffic sent through each client.
          </t>
          <t>
          <figure  anchor="usecase4">
          <artwork align="center"><![CDATA[
          +--+   +-+        --|a1|---|s|   +-+ /  +--+\ /+-+   |c|-        x   +-+ \  +--+/ \+-+        --|a2|---|s|          +--+   +-+
]]>          </artwork>
          </figure>
          </t>
          <t>
            In the case where one of the agents in the above scenario becomes overloaded,
            the client should reduce the amount of traffic sent to the overloaded
            agent by the amount requested.  This traffic should instead be routed through
            the non-overloaded agent.  For example, assume that the overloaded
            agent requests a reduction of 10 percent.  The client should send 10
            percent of the traffic that would have been routed to the overloaded agent
            through the non-overloaded agent.
          </t>
          <t>
            When the client has an active and a standby connection to the two agents then
            an alternative strategy for responding to an overload report from an agent is
            to change to standby connection to active and route all traffic through the new
            active connection.
          </t>
          <t>
            In the case where both agents are reporting overload, the client may
            need to start decreasing the total traffic sent to the agents.  This
            would be done in a similar fashion as discussed in <xref target="singleagent"/>
            The amount of traffic depends on the combined
            reduction requested by the two agents.
          </t>
        </section>
        <section title="Agent Chains">
          <t>
            There are also deployment scenarios where there can be multiple Diameter
            Agents between Diameter Clients and Diameter Servers.  An example of this
            type of deployment include when there are edge agents between Diameter networks.
          </t>
          <t>
            <xref target="usecase5" /> illustrates one such network deployment case.
            Note that while this figure shows a maximum of two agents being involved
            in a Diameter transaction, it is possible that more
            than two agents could be in the path of a transaction.
          </t>
          <t>
          <figure  anchor="usecase5">
          <artwork align="center"><![CDATA[
          +---+     +---+   +-+        --|a11|-----|a21|---|s|   +-+ /  +---+ \ / +---+\ /+-+   |c|-          x        x   +-+ \  +---+ / \ +---+/ \+-+        --|a12|-----|a22|---|s|          +---+     +---+   +-+
]]>
          </artwork>
          </figure>
          </t>
          <t>
            Handling of overload of one or both of agents a11 or a12 in this case is
            equivalent to that discussed in section 2.2.
          </t>
          <t>
            Overload of agents a21 and a22 must be handled by the previous hop agents.
            As such, agents a11 and a12 must handle the overload mitigation logic when
            receiving an agent overload report from agents a21 and a22.
          </t>
          <t>
            The handling of peer overload reports is similar to that discussed in
            <xref target="redundantagents"/>.
            If the overload can be addressed using diversion then this approach should be taken.
          </t>
          <t>
            If both of the agents have requested a reduction in traffic then the previous hop
            agent must start throttling the appropriate number of transactions.  When
            throttling requests, an agent uses the same error responses as defined in the base
            DOIC specification <xref target="RFC7683"/>.
          </t>        </section>
      </section>
      <section title="Diameter Endpoint Use Cases">
        <t>
          This section outlines use cases for the peer overload report involving Diameter Clients
          and Diameter Servers.
        </t>
        <section title="Hop-by-hop Abatement Algorithms">
          <t>
            It is envisioned that abatement algorithms will be defined that will
            support the option for Diameter Endpoints to send peer reports.  For
            instance, it is envisioned that one usage scenario for the rate
            algorithm,
            <xref target="I-D.ietf-dime-doic-rate-control"/>,

            which is being worked on by the DIME working group as
            this document is being written,
            will involve abatement being done on a hop-by-hop basis.
          </t>
          <t>
            This rate deployment scenario would involve Diameter Endpoints
            generating peer reports and selecting the rate algorithm for
            abatement of overload conditions.
          </t>
        </section>
      </section>
    </section>
    <section title="Interaction Between Host/Realm and Peer Overload Reports">
      <t>
        It is possible that both an agent and an end-point in the path of a transaction
        are overloaded at the same time.  When this
        occurs, Diameter entities need to handle both overload reports.
        In this scenario the reacting node should first handle the throttling of the
        overloaded host or realm.
        Any messages that survive throttling due to host or realm reports should
        then go through abatement for the  peer overload report.  In this scenario,
        when doing abatement on the PEER report, the reacting node SHOULD
        take into consideration the number of messages already throttled by the handling
        of the HOST/REALM report abatement.
      </t>
      <t><list><t>
        Note: The goal is to avoid traffic oscillations that might result from
        throttling of messages for both the HOST/REALM overload reports and the
        PEER overload reports.  This is especially a concern if both
        reports are of type LOSS.
       </t></list></t>
    </section>
    <section title="Peer Report Behavior">
      <t>
        This section defines the normative behavior associated with the Peer Report
        extension to the DOIC solution.
      </t>
      <section title="Capability Announcement" anchor="peer-ca">
        <section title="Reacting Node Behavior">
          <t>
            When sending a Diameter request a DOIC node that supports the OC_PEER_REPORT feature
            MUST include an OC-Supported-Features AVP with an OC-Feature-Vector AVP
            with the OC_PEER_REPORT bit set.
          </t>
<!--
          <t><list>
            <t>
              Note: The sender of a request can be a Diameter Client or Diameter Server that
              originates the Diameter request or a Diameter Agent that relays the request.
            </t>
          </list></t>
          <t>
            Support for the OC_PEER_REPORT feature does not impact the logic for setting
            of other feature bits in the OC-Feature-Vector AVP.
          </t>
-->
          <t>
            When sending a request a DOIC node that supports the OC_PEER_REPORT feature
            MUST include a SourceID AVP in the OC-Supported-Features
            AVP with its own DiameterIdentity.
          </t>
          <t><list><t>
            Note: This allows the DOIC nodes in the path of the request to determine if
            the indication of support came from a Diameter peer or if the request traversed
            a node that does not support the OC_PEER_REPORT feature.
          </t></list></t>
          <t>
            When an agent relays a request that includes a SourceID AVP in the OC-Supported-Features AVP,
            a DOIC node that supports the OC_PEER_REPORT feature MUST remove the received SourceID
            AVP and replace it with a SourceID AVP containing its own Diameter identity.
          </t>
        </section>
        <section title="Reporting Node Behavior">
          <t>
            When receiving a request a DOIC node that supports the OC_PEER_REPORT feature
            MUST update transaction state with an indication of whether or not
            the peer from which the request was received supports the OC_PEER_REPORT
            feature.
          </t>
          <t><list><t>
            Note: The transaction state is used when the DOIC node is acting as a peer-report
            reporting node and needs send OC-OLR reports of type PEER_REPORT in
            answer messages.
            The peer overload reports are only included in answer messages being sent to peers that support
            the OC_PEER_REPORT feature.
          </t></list></t>
<!--
          <t>
            The following are indications that the peer does not support the
            OC_PEER_REPORT feature:
          </t>
          <t><list>
            <t>
              The request does not contain an OC-Supported-Features AVP.
            </t>
            <t>
              The received request contains an OC-Supported-Features AVP with
              no OC-Feature-Vector.
            </t>
            <t>
              The received request contains an OC-Supported-Features AVP with a
              OC-Feature-Vector with the OC_PEER_REPORT feature bit cleared.
            </t>
            <t>
              The received request contains an OC-Supported-Features AVP with a
              OC-Feature-Vector with the OC_PEER_REPORT feature bit set but with
              a SourceID AVP with a DiameterIdentity that does not match the DiameterIdentity
              of the peer from which the request was received.
            </t>
          </list></t>
-->
          <t>
            The peer supports the OC_PEER_REPORT feature if the received
            request contains an OC-Supported-Features AVP with the OC-Feature-Vector
            with the OC_PEER_REPORT feature bit set and with a SourceID AVP with
            a Diameter ID that matches the DiameterIdentity of the peer from which the
            request was received.
          </t>
<!--
          <t>
            When receiving a request a DOIC node that supports the Peer Report feature
            MUST remove any received SourceID AVP from the OC-Supported-Features AVP.
          </t>
          <t><list><t>
            Note: If the DOIC node relays the message then it will insert
            a SourceID AVP with its own DiameterID in the OC-Supported-Features
            AVP in the relayed message.
          </t></list></t>
-->
          <t>
            When an agent relays an answer message, a reporting node that supports the
            OC_PEER_REPORT feature MUST strip any SourceID AVP from the
            OC-Supported-Features AVP.
          </t>
          <t>
            When sending an answer message, a reporting node that supports the
            OC_PEER_REPORT feature MUST determine if the peer to which the
            answer is to be sent supports the OC_PEER_REPORT feature.
          </t>
          <t>
            If the peer supports the OC_PEER_REPORT feature then the reporting node
            MUST indicate support for the feature in the OC-Supported-Features AVP.
          </t>
          <t>
            If the peer supports the OC_PEER_REPORT feature then the reporting node
            MUST insert the SourceID AVP in the OC-Supported-Features AVP in the
            answer message.
          </t>
          <t>
            If the peer supports the OC_PEER_REPORT feature then the reporting node
            MUST insert the OC-Peer-Algo AVP in the OC-Supported-Features AVP.  The
            OC-Peer-Algo AVP MUST indicate the overload abatement algorithm that
            the reporting node wants the reacting nodes to use should the reporting node
            send a peer overload report as a result of becoming overloaded.
          </t>
        </section>
      </section>
      <section title="Peer Overload Report Handling" anchor="peer-olr">
        <t>
          This section defines the behavior for the handling of overload reports
          of type peer.
        </t>
        <section title="Overload Control State">
          <t>
            This section describes the Overload Control State (OCS) that might be maintained
            by both the peer report reporting node and the peer report reacting node.
          </t>
          <t>
            This is an extension of the OCS handling defined in <xref target="RFC7683"/>.
          </t>
          <section title="Reporting Node Peer Report OCS" anchor="rep-ocs">
            <t>
              A DOIC Node that supports the OC_PEER_REPORT feature SHOULD maintain Reporting
              Node OCS, as defined in <xref target="RFC7683"/> and extended here.
<!--
              This is used to record overload events and build
              overload reports at the reporting node.
-->
            </t>
            <t>
              If different abatement specific contents are sent to each peer then
              the reporting node MUST maintain a separate reporting node peer report OCS
              entry per peer to which a peer overload report is sent.
            </t>
            <t><list><t>
              Note: The rate overload abatement algorithm allows for different
              rates to be sent to each peer.
            </t></list></t>
<!--
            <t>
              The Reporting Node Peer Report OCS entry MAY include 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>Abatement Algorithm</t>
              <t>Algorithm specific input data (for example, the Reduction
                Percentage for the Loss Abatement Algorithm)</t>
            </list></t>
-->
          </section>
          <section title="Reacting Node Peer Report OCS" anchor="react-ocs">
<!--
            <t>
              A DOIC node that supports the OC_PEER_REPORT feature SHOULD maintain
              Reacting Node Peer Report OCS
              for each peer with which it communicates.
              This is used to record overload reports received from peer nodes.
            </t>
-->
            <t>
              In addition to OCS maintained as defined in <xref target="RFC7683"/>,
              a reacting node that supports the OC_PEER_REPORT feature
              maintains the following OCS per supported Diameter
              application:
            </t>
            <t><list><t>
              A peer-type OCS entry for each peer to which it sends requests.
            </t></list></t>
            <t>
              A peer-type OCS entry is identified by the pair of Application-ID and
              the peer's DiameterIdentity.
            </t>
            <t>
              The peer-type OCS entry include the following information
              (the actual information stored is an implementation decision):
            </t>
            <t><list>
              <t>
                Sequence number (as received in the OC-OLR AVP).
              </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>
                Input data that is abatement algorithm specific (as received in
                the OC-OLR AVP -- for example, OC-Reduction-Percentage for the
                loss abatement algorithm).
              </t>
            </list></t>
<!--
            <t>
              A Reacting Node Peer Report OCS entry is identified by the
              DiameterIdentity of the peer as
              communicated during the RFC6733 defined Capability Exchange procedure.
            </t>
            <t>
              The Reacting Node Peer Report OCS entry MAY include 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>Abatement Algorithm</t>
              <t>Algorithm specific input data (for example, the Reduction
                Percentage for the Loss Abatement Algorithm)</t>
            </list></t>
-->
          </section>
        </section>
        <section title="Reporting Node Maintenance of Peer Report OCS">
<!--
          <t>
            A reporting node SHOULD create a new Reporting Node Peer Report
            OCS entry (<xref target="rep-ocs"/>) when sending
            a peer overload report to a peer for the first time.
          </t>
          <t><list><t>
              If the reporting node knows that there are no reacting nodes supporting
              the OC_PEER_REPORT feature then the reporting node can choose to not
              create OCS entries.
          </t></list></t>
-->
          <t>
            All rules for managing the reporting node OCS entries defined in
            <xref target="RFC7683"/>
            apply to the peer report.
          </t>
        </section>
        <section title="Reacting Node Maintenance of Peer Report OCS">
          <t>
            When a reacting node receives an OC-OLR AVP with a report type of peer it
            MUST determine if the report was generated by the Diameter peer from which the report was
            received.
          </t>
          <t>
            If a reacting node receives an OC-OLR AVP of type peer and the SourceID
            matches the ID of the Diameter peer from which the request was received then the
            report was received from a Diameter peer.
          </t>
          <t>
            If a reacting node receives an OC-OLR AVP of type peer and the SourceID
            does not match the ID of the Diameter peer from which the request was received then the
            reacting node MUST ignore the overload report.
          </t>
          <t>
            If the Peer Report OLR was received from a Diameter peer then the
            reacting node MUST determine if it is for an existing or new overload condition.
          </t>
          <t>
            The OLR is for an existing overload condition if the reacting node
            has an OCS that matches the received OLR.
            For a peer report-type, this means it matches the Application-ID and the peer's
            DiameterIdentity in an existing OCS entry.
          </t>
          <t>
            If the OLR is for an existing overload condition then it 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 the 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 the 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 the reacting
            node MUST generate a new OCS entry for the overload condition.
          </t>
          <t>
            For a peer report this means it creates an OCS entry with an DiameterID
            from the SourceID AVP in the received OC-OLR AVP.
          </t>
          <t>
            If the received OLR contains a validity duration of zero ("0") then
            the reacting node MUST update the OCS entry as being expired.
          </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>
            The reacting node sets the abatement algorithm based on the
            OC-Peer-Algo AVP in the received OC-Supported-Features AVP.
          </t>
        </section>
        <section title="Peer Report Reporting Node Behavior">
          <t>
            When there is an existing reporting node peer report OCS entry, the reporting
            node MUST include an OC-OLR AVP with a report type of peer using the
            contents of the reporting node peer report OCS entry in all answer messages
            sent by the reporting node to peers that support the OC_PEER_REPORT feature.
          </t>
          <t><list><t>
            The reporting node determines if a peer supports the OC_PEER_REPORT feature
            based on the indication recorded in the reporting node's transaction state.
          </t></list></t>
          <t>
            The reporting node MUST include its DiameterIdentity in the SourceID AVP in the
            OC-OLR AVP.  This is used by DOIC nodes that support the OC_PEER_REPORT feature to
            determine if the report was received from a Diameter peer.
          </t>
          <t>
            The reporting agent must follow all other overload reporting node
            behaviors outlined in the DOIC specification.
          </t>
        </section>
        <section title="Peer Report Reacting Node Behavior" anchor="reacting" >
          <t>
            A reacting node supporting this extension MUST support the receipt of multiple
            overload reports in a single message.  The message might include a host
            overload report, a realm overload report and/or a peer overload report.
          </t>
          <t>
            When a reacting node sends a request it MUST determine if that
            request matches an active OCS.
          </t>
          <t>
            In all cases, if the reacting node is an agent then it
            MUST strip the Peer Report OC-OLR AVP from the message.
          </t>
          <t>
            If the request matches an active OCS then the reacting node MUST
            apply abatement treatment on the request.  The abatement treatment
            applied depends on the abatement algorithm indicated in the OCS.
          </t>
          <t>
            For peer overload reports, the preferred abatement treatment is
            diversion.  As such, the reacting node SHOULD attempt to divert
            requests identified as needing abatement to other peers.
          </t>
<!--
          <t>
            If a host-routed request, as defined in <xref target="I-D.ietf-dime-ovli"/>,
            is selected for abatement and the request must be routed to
            the DOIC node that generated the peer overload report
            then the reacting node MUST throttle the request.
          </t>
          <t><list><t>
            This would result from an overloaded Diameter endpoint (Diameter Server or
            Diameter Client) sending a peer overload report and the request
            contains a Destination-Host AVP with a DiameterID that matches the
            DiameterID in the SourceID AVP received in the peer overload report.
          </t></list></t>
-->
          <t>
            If there is not sufficient capacity to divert abated traffic then
            the reacting node MUST throttle the necessary requests to fit
            within the available capacity of the peers able to handle the
            requests.
          </t>
          <t>
            If the 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="RFC7683"/>.
          </t>
          <t>
            In the case that the OCS entry validity duration expires or has a
            validity duration of zero ("0"), meaning that if the reporting node
            has explicitly signaled the end of the overload condition then
            abatement associated with the overload abatement MUST be ended in a
            controlled fashion.
          </t>
        </section>
      </section>
    </section>
    <section title="Peer Report AVPs" anchor="avps">
      <section title="OC-Supported-Features AVP">
        <t>
          This extension adds a new feature to the OC-Feature-Vector AVP.  This feature
          indication shows support for handling of peer overload reports.  Peer overload
          reports are used by agents to indicate the need for overload abatement handling
          by the agent's peer.
        </t>
        <t>
          A supporting node must also include the SourceID AVP in the
          OC-Supported-Features capability AVP.
        </t>
        <t>
          This AVP contains the Diameter Identity of the node that supports the OC_PEER_REPORT
          feature.  This AVP is used to determine if support for the peer overload report
          is in an adjacent node.  The value of this AVP should
          be the same Diameter identity used as part of the CER/CEA base
          Diameter capabilities exchange.
        </t>
        <t>
          This extension also adds the OC-Peer-Algo AVP to the OC-Supported-Features AVP.  This AVP
          is used by a reporting node to indicate the abatement algorithm it will use for
          peer overload reports.
        </t>
        <t>
        <figure>
        <artwork><![CDATA[
 OC-Supported-Features ::= < AVP Header: 621 >
                           [ OC-Feature-Vector ]
                           [ SourceID ]
                           [ OC-Peer-Algo]
                         * [ AVP ]
]]>
        </artwork>
        </figure>
        </t>
        <section title="OC-Feature-Vector">
          <t>
            The peer report feature defines a new feature bit is added for the OC-Feature-Vector AVP.
          </t>
          <t>
            <list style="hanging">
              <t hangText="OC_PEER_REPORT (0x0000000000000010)">
              <vspace blankLines="1"/>
                When this flag is set by a DOIC node it indicates that
                the DOIC node supports the peer overload report type.
              </t>
            </list>
           </t>
        </section>
        <section title="OC-Peer-Algo">
          <t>
            The OC-Peer-Algo AVP (AVP code TBD1) 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>
            Feature bits defined for the OC-Feature-Vector AVP and associated with overload
            abatement algorithms are reused for this
            AVP.
          </t>
        </section>
      </section>
      <section title="OC-OLR AVP">
        <t>
          This extension makes no changes to the SequenceNumber or ValidityDuration AVPs in
          the OC-OLR AVP.  These AVPs are also be used in peer overload reports.
        </t>
        <t>
          The OC_PEER_REPORT feature extends the base Diameter overload specification
          by defining a new overload
          report type of “peer”.  See section [7.6] in <xref target="RFC7683"/>
          for a description of the OC-Report-Type AVP.
        </t>
        <t>
          The overload report MUST also include the Diameter identity of the agent that
          generated the report. This is necessary to handle the case where there is a non
          supporting agent between the reporting node and the reacting node.  Without the
          indication of the agent that generated the overload request, the reacting
          node could erroneously assume that the report applied to the non-supporting node.
          This could, in turn, result in unnecessary traffic being either redistributed or throttled.
        </t>
        <t>
          The SourceID AVP is used in the OC-OLR AVP to carry this DiameterIdentity.
        </t>
        <figure>
        <artwork><![CDATA[
   OC-OLR ::= < AVP Header: 623 >
              < OC-Sequence-Number >
              < OC-Report-Type >
              [ OC-Reduction-Percentage ]
              [ OC-Validity-Duration ]
              [ SourceID ]
            * [ AVP ]
  ]]>
        </artwork>
        </figure>
        <section title="OC-Report-Type AVP">
          <t>
            The following new report type is defined for the OC-Report-Type AVP.
          </t>
          <t>
            <list style="hanging">
              <t hangText="PEER_REPORT 2 ">
                The overload treatment should apply to all requests bound for the peer
                identified in the overload report.  If the peer identified in the overload
                report is not a peer to the reacting endpoint then the overload report
                should be stripped and not acted upon.
              </t>
            </list>
          </t>
        </section>
      </section>
      <section title="SourceID">
        <t>
          The SourceID AVP (AVP code TBD2) is of type DiameterIdentity and is inserted by a
          Diameter node to indicate the source of the AVP in which it is a part.
        </t>
        <t>
          In the case of peer reports, the SourceID AVP indicates the node
          that supports this feature (in the OC-Supported-Features
          AVP) or the node that generates an overload with a report type of peer
          (in the OC-OLR AVP).
        </t>
        <t>
          It contains the DiameterIdentity of the inserting node.  This is used by other
          Diameter nodes to determine the node that inserted the enclosing AVP that
          contains the SourceID AVP.
        </t>
      </section>
      <section title="Attribute Value Pair flag rules">
        <t>
          <figure>
          <artwork>
          <![CDATA[
                                                            +---------+
                                                            |AVP flag |
                                                            |rules    |
                                                            +----+----+
                            AVP   Section                   |    |MUST|
    Attribute Name          Code  Defined Value Type        |MUST| NOT|
   +--------------------------------------------------------+----+----+
   |OC-Peer-Algo            TBD1    x.x   Unsigned64        |    | V  |
   |SourceID                TBD2    x.x   DiameterIdentity  |    | V  |
   +--------------------------------------------------------+----+----+
   ]]>
          </artwork>
          </figure>
        </t>

      </section>
    </section>
    <section title="IANA	 Considerations">
      <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>
          There are no new IANA registries introduced by this document.
        </t>
        <t>
          The values used for the OC-Peer-Algo AVP are the subset of the
          "OC-Feature-Vector AVP Values (code 622)" registry.  Only the
          values in that registry that apply to overload abatement
          algorithms apply to the OC-Peer-Algo AVP.
        </t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>
        Agent overload is an extension to the base Diameter overload mechanism.
        As such, all of the security considerations outlined in
        <xref target="RFC7683"/> apply to the agent overload scenarios.
      </t>
      <t>
        It is possible that the malicious insertion of an agent overload report
        could have a bigger impact
        on a Diameter network as agents can be concentration points in a Diameter
        network.  Where an end-point
        report would impact the traffic sent to a single Diameter server, for example,
        a peer
        report could throttle all traffic to the Diameter network.      </t>
      <t>
        This impact is amplified in an agent that sits at the edge of a Diameter
        network that serves as the
        entry point from all other Diameter networks.      </t>
    </section>

    <section title="Acknowledgements">
      <t>
      Adam Roach and Eric McMurry for the work done in defining a comprehensive Diameter overload solution
      in draft-roach-dime-overload-ctrl-03.txt.
      </t>
      <t>
      Ben Campbell for his insights and review of early versions of this document.
      </t>
    </section>

  </middle>

  <back>

  <references title="Normative References">
  &RFC2119;
  &RFC6733;
  &RFC5226;
  &RFC7068;

  &RFC7683;
  &I-D.ietf-dime-doic-rate-control;
<!--
    <reference anchor='I-D.ietf-dime-ovli'>
        <front>
            <title>Diameter Overload Indication Conveyance</title>
            <author initials='J.' surname='Korhonen'>
                <organization abbrev='Broadcom Communications'>
                Broadcom Communications
                </organization>
            </author>

            <date month='October' year='2013' />
        </front>
        <format type='TXT' octets='94506'
                target='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-docdt-dime-ovli-00.xml' />
    </reference>
-->
  </references>

  </back>
 </rfc>
 <!--
         <t>
           When receiving a request that does not contain an OC-Supported-Features AVP a
           DOIC node that supports the Peer Report feature MUST do the following:
         </t>
         <t><list>
           <t>
             Indicate in transaction state that the peer does not suppoort the peer report
             feature.  This is done to prevent peer reports being sent to that peer.
           </t>
           <t>
             Insert an OC-Supported-Features AVP into the request.
           </t>
           <t>
             Indicate support for the Peer Report feature the
             OC-Feature-Vector AVP in the OC-Supported-Features AVP.  The OC-Feature-Vector
             AVP SHOULD also contain an indication of the other features supported
             but the DOIC node.
           </t>
           <t>
             Include the SourceID AVP in the OC-Supported-Features
             AVP with its own DiameterID.
           </t>
         </list></t>
         <t>
           When receiving a request that contains an OC-Supported-Features AVP
           and the OC-Features-Vector AVP does not indicate support for the Peer
           Report Feature, a DOIC node that supports the Peer Report feature MUST
           do the following:
         </t>
         <t><list>
           <t>
           </t>
         </list></t>
         <t>
           When receiving a request that contains an OC-Supported-Features AVP
           and the OC-Features-Vector AVP indicates support for the Peer
           Report Feature, a DOIC node that supports the Peer Report feature MUST
           do the following:
         </t>
         <t><list>
           <t>
             If the SourceID matches the DiameterID of the Diameter Peer from
             which it received the request then the DOIC node MUST do the following:
           </t>
           <t>
             If the SourceID does not match the DiameterID of the Diameter Peer
             from which it received the request then the DOIC node MUST do the following:
           </t>
           <t><list>
             <t>
               Indicate in transaction state that the peer does not suppoort the peer report
               feature.  This is done to prevent peer reports being sent to that peer.
             </t>
             <t>
               Generate an OC-Supported-Features AVP with a OC-Feature-Vector AVP that
               indicates support for the Peer Feature.  The OC-Feature-Vector AVP should
               also contain either the features indicated in the received OC-Features-Vector
               AVP or the features that the DOIC node supports.
             </t>
             <t>
               Include a SourceID AVP in the OC-Supported-Features AVP that
               contains DiameterID it uses in RFC6733 capabailities exchange procedures.
             </t>
           </list></t>
         </list></t>


         <t>
           Diameter nodes that support this extension must include the OC_PEER_REPORT capability
           in all the OC-Feature-Vector AVPs sent in Diameter reqeuest messages.
         </t>
         <t>
           Diameter nodes that support this extension must also inlcude the SourceID AVP
           in the OC-Supported-Features AVP.
         </t>
         <t>
           The value of the OC-Peer-Node-ID AVP must be the same as the Diameter
           identity used in the base Diameter CER/CEA capabilities exchange
           for the connection upon which the message carrying the OC-Feature-Vector
           AVP is to be sent.
         </t>
         <t><list><t>
           Editor's note: Is this a MUST or SHOULD?
         </t></list></t>
         <t>
           An agent that supports this extension must insert a separate OC-Supported-Features
           AVP in all request messages traversing the agent.
         </t>
         <t>
           A Diameter node that receives an OC-Supported-Features AVP that indicates support for the peer
           report type must determine if the
           support came from a true peer.  If the value of the OC-Peer-Node-ID AVP matches the
           Diameter identity of the previous hop Diameter
           node then the receiving node knows that the peer node supports this extension.
         </t>
         <t>
           When an agent receives a request that contains an OC-Supported-Features AVP containing an indication for support of
           the peer overload report type, the agent must remove that instance of the OC-Supported-Features AVP from the request.
           The agent must insert it's own OC-Supported-Features AVP, with an OC-Peer-Node-ID AVP containing its
           own Diameter ID, in the request.
         </t>
 -->
