<?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 I-D.ietf-dime-overload-reqs PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-dime-overload-reqs-13.xml'>
<!ENTITY I-D.ietf-dime-e2e-sec-req PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-dime-e2e-sec-req-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-donovan-dime-agent-overload-00.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>17210 Campbell Road</street>
          <city>Dallas</city>
          <region>Texas</region>
          <code>75254</code>
          <country>United States</country>
        </postal>
        <email>srdonovan@usdonovans.com</email>
      </address>
    </author>
    <date year="2013"/>
    <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 Control (DOC) base
       solution.  The extension addresses the handling of agent overload.
      </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 become overloaded. 
    </t>
    <t>
    The base Diameter overload specification <xref target="I-D.docdt-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 case, the goal is to react to the overload as close to the generator 
    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 can also do the overload mitigation.  
    For instance, a Diameter agent can handle Diameter overload mitigation when it knows that a Diameter 
    client does not support the ability to do the mitigation.     </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, both clients and 
    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="I-D.ietf-dime-overload-reqs"/>.     </t>
    <t>
    This document builds on the "Loss" overload mitigation algorithm defined 
    in <xref target="I-D.docdt-dime-ovli"/>.  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 in the Diameter network.       </t>
      <t>
      Endpoint overload mitigation deals with traffic targeted for a single Diameter application.  
      In this case 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>
    </section>
    
    <section title="Terminology and Abbreviations" anchor="abbrev">
      <t>
      Editors note – These definitions need to be made consistent with the base Diameter overload specification.
      </t>
      <t>
      <list style="hanging">
        <t hangText="Diameter Node">
        <vspace blankLines="1"/>
        A RFC6733 Diameter Client, an RFC6733 Diameter Server, and RFC6733 agent. 
        </t>
        <t hangText="Diameter Endpoint">
        <vspace blankLines="1"/>
        An RFC6733 Diameter Client and RFC6733 Server. 
        </t>
        <t hangText="Diameter Overload Endpoint">
        <vspace blankLines="1"/>
        A Diameter node that supports the Diameter Overload extension defined in <xref target="I-D.docdt-dime-ovli"/>.
        </t>
        <t hangText="Diameter Overload Reporting Node">
        <vspace blankLines="1"/>
        A Diameter node that sends and overload report in either a Diameter request or answer.
        </t>
        <t hangText="Diameter Overload Reacting Node">
        <vspace blankLines="1"/>
        A Diameter node that receives and acts on a Diameter overload report.
        </t>
      </list>
      </t>
    </section>
    
    <section title="Diameter Agent Overload Use Cases">
      <t>
      The following use cases illustrate the cases where agent overload must be handled.
      </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">   +-+    +-+    +-+   |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">                 +-+               --|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 agent overload report in answer 
      messages flowing to the client.  This overload report will contain a requested reduction in the 
      amount of traffic being sent to the agent.  The client will apply overload abatement behavior 
      as defined in the base Diameter overload specification <xref target="I-D.docdt-dime-ovli"/>.  
      This will result in the requested 
      percentage of the requests that would have been sent to the agent being dropped with the appropriate 
      indication given to the 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 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, 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">
                +--+   +-+           --|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 a local distribution policy to determine 
      the percentage of the traffic sent through each client.
      </t>
      <t>
      <figure  anchor="usecase4">
      <artwork align="center">
                +--+   +-+            --|a1|---|s|   +-+ /  +--+\ /+-+   |c|-        x   +-+ \  +--+/ \+-+        --|a2|---|s|          +--+   +-+
                </artwork>
      </figure>
      </t>
      <t>
      In the case where a single agent 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>
      In the case where both agents are reporting overload, the client will need to start dropping traffic 
      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 agents between clients and 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">
                +---+     +---+   +-+        --|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 the overload reports is similar to that discussed in section 2.2.  If the overload 
      can be addressed by adjusting the amount of traffic sent to the next hop agents, 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 
      rejecting the appropriate amount of transactions.  When rejecting requests, the agent must use the 
      same mechanism as defined in the base overload specification <xref target="I-D.docdt-dime-ovli"/>.
      </t>      </section>
      <section title="Interaction between agent and end-point overload">
      <t>
      It is possible that both an agent and a server can be overloaded at the same time.  When this 
      occurs, the Diameter entity will need to handle both overload reports.  When this occurs the overload 
      reactor should first handle the throttling of the overloaded end-point.  Any messages that survive 
      that throttling should then be throttled (or routed) based on the reduction requested in the agent 
      overload report.
      </t>
      </section>
    </section>
    <section title="Agent Overload Report">
    <t>
    Editors Note: This section depends upon the completion of the base Diameter Overload specification.  
    As such, it cannot be complete until the data model and extension mechanism are finalized in the based DOC 
    specification.  Details for any new AVPs or modifications to existing 
    AVPs will be added in a future version of the draft after the base DOC specification has stabilized.
    </t>
      <section title="OC-Feature-Vector AVP">
      <t>
      This extension adds the following capabilities to 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 the overload control endpoint it means that 
            the endpoint supports the peer overload report type.
           </t>
         </list>
      </t>
      </section>
      <section title="OC-OLR AVP">
      <t>
      This extension makes no changes to the TimeStamp, ValidityDuration and OC-Algorithm AVPs.
      </t>
      <t>The agent overload function extends the base Diameter overload specification by defining a new overload 
      report type of “peer”.  See section [4.5] in <xref target="I-D.docdt-dime-ovli"/> for a description of the 
      overload report type AVP.      </t>
      <t>
      The following extension is proposed for the ReportType AVP.
      </t>
      <t>
      <list style="hanging">
      <t hangText="2">
      Peer. The overload treatment should apply to all request 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>
      <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 requesting node and
      the reacting node.  Without the 
      indication of the agent that generated the overload request, the reacting node would 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>
      This extension adds the Reporting-Node AVP.
      </t>
        <section title="OC-Reporting-Node">
        <t>
        The OC-Reporting-Node AVP (AVP code TBD) is of type DiameterIdentity and is inserted by the 
        reporting node.  It contains the Diameter Identity of the inserting node.  This is used by the
        reacting node to determine if the peer report came from a true peer.  Behavior associated with this
        AVP is discussed in <xref target="reacting" />
        </t>
        <t>
          <figure>
          <artwork>
          <![CDATA[
                                                      +---------+
                                                      |AVP flag |
                                                      |rules    |
                                                      +----+----+
                      AVP   Section                   |    |MUST|
    Attribute Name    Code  Defined Value Type        |MUST| NOT|
   +--------------------------------------------------+----+----+
   |OC-Reporting-Node TBD1 x.x     Unsigned64         |    | V  |
   +--------------------------------------------------+----+----+
   ]]>
          </artwork>
          </figure>
        </t>
        </section>
      </section>
      
    </section>
    
    <section title="Agent Overload Behavior">
      <section title="Agent Overload Reporting Node Behavior">
      <t>
      An agent that supports this specification must have the ability to determine when it is appropriate 
      to send an overload report.  This is based on local policy but, as is the case with Diameter end-point 
      overload, this will generally be done as a way to attempt to avoid the agent actually entering 
      an overloaded state.        </t>
      <t>
      Once the agent determines that there is need to request a reduction in traffic then it SHOULD 
      include the overload report in all answer messages handled by the agent.        </t>
      <t>
      The overload report must include a type of peer.
      </t>
      <t>
      The amount of reduction requested MUST be included in the overload report.      </t>
      <t>
      The requested duration of the report MUST be included in the overload report.      </t>
      <t>
      The overload report must include a timestamp indicating when the report was first sent. The 
      reacting node uses the timestamp to determine differentiate an already received report from 
      a new report.      </t>
      <t>
      Editor's note: These statements might turn out to be repeats of normative requirements in the
      DOC baseline specification.  If this is so then they likelly can be removed from this document.
      </t>
      <t>
      The overload report must include the DiameterIdentity of the reporting node in the OC-Reporting-Node AVP.
      This is used by DOC end-points to determine if the report came from a true peer or from a non adjacent 
      reporting node.
      </t>
      <t>
      The reporting agent must follow all other overload reporting node behaviors outlined in the 
      base overload specification.  This includes sending a report with a reduction of zero when 
      the need for a reduction has been abated.  It also includes sending a new overload report, 
      with a new timestamp, to refresh the abatement duration.      </t>
      </section>
      <section title="Agent Overload Reacting Node Behavior" anchor="reacting" >
      <t>
      A DOC reacting node receiving an overload report of type "peer" must first verify that the report came from 
      an adjacent node or from a non-adjacent reporting node.
      </t>
      <t>
      If the report came from a non-adjacent reporting node then the reacting node must strip the overload
      report and take no other action as a result of the report.
      </t>
      <t>
      If the peer report came from an adjacent node then the reacting node should attempt to distribute subsequent 
      traffic through available routes, with a reduction of the amount of traffic sent to the reporting node.  
      The reasoning behind re-distributing the requests through other routes is the general thought that it 
      is best to attempt to complete requests when there is capacity in the network.  In the case of agent 
      overload, the targetted servers will not necessarily be overloaded.  As such, re-distributed requests 
      are likely to be successfully handled.
      </t>
      <t>
      If there is not sufficient capacity to route offered traffic through the available routes then 
      the reacting node must throttle traffic.       </t>
      <t>
      If the reacting node is throttling traffic then it must select the throttled traffic using the 
      loss algorithm defined in <xref target="I-D.docdt-dime-ovli"/>.       </t>
      <t>
      If the Diameter node is a Diameter end-point then the throttling action results in the Diameter 
      request not being sent and presenting the appropriate application level response to the request 
      that caused the need for the Diameter transaction.       </t>
      <t>
      If the Diameter node is a Diameter agent then the throttling action involves generating the error 
      response in an answer message for the throttled transactions.  The error response must be the same 
      as defined for agent throttling actions in <xref target="I-D.docdt-dime-ovli"/>. 
      </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.docdt-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, an agent overload 
    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;
  <reference anchor='I-D.docdt-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>
  <references title="Informative References">
  &I-D.ietf-dime-overload-reqs;
  </references>
  </back>
 </rfc> 