<?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 I-D.ietf-dime-ovli PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-dime-ovli-08.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-00.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-01.txt">
  <front>
    <title abbrev="Diameter Agent Overload">Diameter Agent Overload</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="March" 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 documents an extension to the
       Diameter Overload Indication Conveyance (DOIC) base
       solution.  The extension addresses the handling of occurrences of overload of a
       Diameter agent, or more generally, a Diameter peer.
      </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 document defines the behavior of Diameter nodes when Diameter agents
      enter an overload condition and send an overload report requesting
      a reduction of traffic.
    </t>
    <t>
      The base Diameter overload specification <xref target="I-D.ietf-dime-ovli"/> 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="I-D.ietf-dime-ovli"/> 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 for 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>
      Editors note – These definitions need to be made consistent with the base Diameter overload specification
      defined in <xref target="I-D.ietf-dime-ovli"/>.
      </t>
      <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 and overload report in a Diameter answer message.
        </t>
        <t hangText="Reacting Node">
        <vspace blankLines="1"/>
          A DOIC Node that receives and acts on a Diameter overload report.
        </t>
        <t hangText="DIOC Node">
        <vspace blankLines="1"/>
          A Diameter Node that supports the DOIC solution defined
          in <xref target="I-D.ietf-dime-ovli"/>.
        </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, those involving the
        overload of agents and those involving overload of Diameter endpoints
        (Diameter Clients and Diameter Servers).
      </t>

      <section title="Diameter Agent Overload Use Cases" anchor="uc-agents">
        <t>
        The agent overload extension must support the following use cases.
        </t>
        <section title="Single Agent">
          <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="I-D.ietf-dime-ovli"/> or the extension draft that defines the
            indicated overload abatement algorithm.
            This will result in the throtting of the abated
            traffic that would have been sent to the agent, as there is no
            alternative route, with the appropriate
            indication given to the service request that resulted in the need for the            Diameter transaction.          </t>
        </section>
        <section title="Redundant Agents">
          <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 percentage of 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 scenarios become 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 section 3.1.
            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.  Examples of this
            type of deployment include when there are edge agents between Diameter networks.
            Another example of this type of deployment is when there are multiple
            sets of servers, each supporting a subset of the Diameter traffic.
          </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>
            Editor's note: Probably need to elaborate the reasoning behind the need for
            the agent overload report being handled by the previous hop agent.
          </t>
          <t>
            The handling of peer overload reports is similar to that discussed in section 2.2.
            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="I-D.ietf-dime-ovli"/>.
          </t>        </section>
      </section>
      <section title="Diameter Endpoint Use Cases">
        <t>
          This section outlines use cases for the peer report feature 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 is 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 a server in the path of a transaction
        are overloaded at the same time.  When this
        occurs, Diameter entities will 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.
      </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">
        <t>
          Editor's Note: Issue - how does an agent indicate the selected
          abatement algorithm? It cannot use the OC-Feature-Vector in the
          OC-Supported-Features AVP as that applies to host and realm report
          types.  A new AVP in the OC-Supported-Features AVP has been added.
        </t>
        <section title="Reacting Node Behavior">
          <t>
            When sending a Diameter request a DOIC node that supports the Peer Report feature
            MUST include an OC-Supported-Features AVP with an OC-Feature-Vector AVP
            with the OLR_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 Diamter request or a Diameter Agent that relays the request.
            </t>
          </list></t>
          <t>
            Support for the 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 Peer Report feature
            MUST include an OC-SourceID AVP in the OC-Supported-Features
            AVP with its own DiameterID.
          </t>
          <t><list><t>
            Note: This allows the next DOIC node 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 peer feature.
          </t></list></t>
        </section>
        <section title="Reporting Node Behavior">
          <t>
            When receiving a request a DOIC node that supports the Peer Report feature
            MUST update transaction state with an indication of whether or not
            the peer from which the request was received supports the 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 to insert OC-Supported-Feature AVP indicating support
            for the OLR_PEER_REPORT feature and OC-OLR reports of type PEER_REPORT into
            answer messages.
            These AVP OLR are only included in answer messages being sent to peers that support
            the OLR_PEER_REPORT feature.
          </t></list></t>
          <t>
            The following are indications that the peer does not support the
            OLR_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 OLR_PEER_REPORT feature bit cleared.
            </t>
            <t>
              The received request contains an OC-Supported-Features AVP with a
              OC-Feature-Vector with the OLR_PEER_REPORT feature bit set but with
              an OC-SourceID AVP with a DiameterID that does not match the DiameterID
              of the peer from which the request was received.
            </t>
          </list></t>
          <t>
            The peer supports the OLR_PEER_REPORT feature if the received
            request contains an OC-Supported-Features AVP with the OC-Feature-Vector
            with the OLR_PEER_REPORT feature bit set and with an OC-SourceID AVP with
            a Diameter ID that matches the DiameterID 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 OC-SourceID AVP from the OC-Supported-Features AVP.
            This is done to prevent the OC-SourceID AVP from being included in a relayed
            message through a node that supports the Peer Report feature.
          </t>
          <t><list><t>
            Note: If the DOIC node relays the message then it will insert
            an OC-SourceID AVP with its own DiameterID in the OC-Supported-Features
            AVP in the relayed message.
          </t></list></t>
          <t>
            When sending an answer message, a reporting node that supports the
            OLR_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
            OLR_PEER_REPORT feature MUST determine if the peer to which the
            answer is to be sent supports the OLR_PEER_REPORT feature.
          </t>
          <t>
            If the peer supports the OLR_PEER_REPORT feature then the reporting node
            MUST indicate support for the feature in the Supported-Features AVP.
          </t>
          <t>
            If the peer supports the OLR_PEER_REPORT feature then the reporting node
            MUST insert the OC-SourceID AVP in the OC-Supported-Features AVP in the
            answer message.
          </t>
          <t>
            If the peer supports the OLR_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 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 Report 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>
          <section title="Reporting Node Peer Report OCS" anchor="rep-ocs">
            <t>
              A DOIC Node that supports the Peer Report feature SHOULD maintain Reporting
              Node Peer Report OCS.  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 peer node peer report OCS
              entry per peer to which a peer overload report is sent.
            </t>
            <t><list><t>
              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 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>
              A Reacting Node Peer Report OCS entry is identified by the
              DiameterID 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>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"/> in an overload condition and 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 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 [DOIC]
            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 an 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 the DiameterID
            in the SourceID contained in the OLR matches the DiameterID of the 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 OC-SourceID
            does not match the ID of the Diameter peer from which the request was received then the
            reacting node MUST strip the OC-OLR AVP from the message and not use it
            to update reacting node peer report OCS entries.
          </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.
          </t>
          <t>
            For a peer report-type this means the DiameterID received in the SourceID AVP
            matches the DiameterID of an existing peer report OLR.
          </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><list><t>
            Editor's note: The above four paragraphs are copied form the DOIC
            specification.  Is it possible to include this behavior by reference or
            do we need to include all of these statements in this specification as well.
          </t></list></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 peer report feature.
          </t>
          <t><list><t>
            The reporting node determines if a peer supports the peer report feature
            based on the indication recorded in the reporting nodes transaction state.
          </t></list></t>
          <t>
            The reporting node MUST include its DiameterID in the OC-SourceID AVP in the
            OC-OLR AVP.  This is used by DOIC nodes that support the 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 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>
            If the request matches and active OCS then the reacting node MUST
            apply abatement treatment on the request.  The abatement treatment
            applied depends on the abatement algorithm stored 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 -- meaning that
            the request is a host-routed request
            as defined in the DOIC specification --
            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="I-D.ietf-dime-ovli"/>.
          </t>
          <t>
            In the case that the OCS entry validity duration expires or has a
            validity duration of zero ("0"), meaning that it 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">
      <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 agents peer.
        </t>
        <t>
          A supporting node must also include the OC-SourceID AVP in the
          OC-Supported-Features capability AVP.
        </t>
        <t>
          This AVP contains the Diameter Identity of the node that supports the OLR_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>
        <figure>
        <artwork><![CDATA[
 OC-Supported-Features ::= < AVP Header: TBD1 >
                           [ OC-Feature-Vector ]
                           [ OC-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="OLR_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 TBD6) 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 in for this
            AVP.
          </t>
          <t><list><t>
            Editor's node: This is to avoid the need for an additional IANA registry.
          </t></list></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 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="I-D.ietf-dime-ovli"/>
          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 OC-SourceID AVP is used in the OC-OLR AVP to carry this DiameterID.
        </t>
        <figure>
        <artwork><![CDATA[
   OC-OLR ::= < AVP Header: TBD2 >
              < OC-Sequence-Number >
              < OC-Report-Type >
              [ OC-Reduction-Percentage ]
              [ OC-Validity-Duration ]
              [ OC-Source-ID ]
            * [ 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="OC-SourceID">
        <t>
          The SourceID AVP (AVP code TBD) is of type DiameterIdentity and is inserted by the
          DOIC node that either indicates support for this feature (in the OC-Supported-Features
          AVP) or that generates an OC-OLR AVP with a report type of peer.
        </t>
        <t>
          It contains the Diameter Identity of the inserting node.  This is used by other
          DOIC nodes to determine if the a peer indicated support this feature or
          inserted the peer report.
        </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-SourceID             TBD1    x.x   Unsigned64        |    | V  |
   |OC-Peer-Algo            TBD1    x.x   Unsigned64        |    | V  |
   +--------------------------------------------------------+----+----+
   ]]>
          </artwork>
          </figure>
        </t>

      </section>
    </section>



    <section title="IANA	 Considerations">
      <t>
      Editors note: This section will be completed once the base overload document has finished the
      definition of extension IANA requirements.
      </t>
    </section>

    <section title="Security Considerations">
      <t>
        Agent overload is an extension to the based Diameter overload mechanism.
        As such, all of the security considerations outlined in
        <xref target="I-D.ietf-dime-ovli"/> 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;

  &I-D.ietf-dime-ovli;
  &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 OC-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 OC-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 OC-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 OC-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 OLR_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 OC-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>
 -->
