idnits 2.17.1 draft-ietf-dime-doic-rate-control-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There is 1 instance of too long lines in the document, the longest one being 4 characters in excess of 72. ** The abstract seems to contain references ([RFC2119], [RFC7683]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 4, 2016) is 2733 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '0' on line 756 == Missing Reference: 'T' is mentioned on line 756, but not defined == Unused Reference: 'RFC5226' is defined on line 804, but no explicit reference was found in the text == Unused Reference: 'RFC6733' is defined on line 809, but no explicit reference was found in the text == Outdated reference: A later version (-11) exists of draft-ietf-dime-agent-overload-00 ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) Summary: 3 errors (**), 0 flaws (~~), 5 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Diameter Maintenance and Extensions (DIME) S. Donovan, Ed. 3 Internet-Draft Oracle 4 Intended status: Standards Track E. Noel 5 Expires: April 7, 2017 AT&T Labs 6 October 4, 2016 8 Diameter Overload Rate Control 9 draft-ietf-dime-doic-rate-control-04.txt 11 Abstract 13 This specification documents an extension to the Diameter Overload 14 Indication Conveyance (DOIC) [RFC7683] base solution. This extension 15 adds a new overload control abatement algorithm. This abatement 16 algorithm allows for a DOIC reporting node to specify a maximum rate 17 at which a DOIC reacting node sends Diameter requests to the DOIC 18 reporting node. 20 Requirements 22 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 23 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 24 document are to be interpreted as described in RFC 2119 [RFC2119]. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on April 7, 2017. 43 Copyright Notice 45 Copyright (c) 2016 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 61 2. Terminology and Abbreviations . . . . . . . . . . . . . . . . 4 62 3. Interaction with DOIC report types . . . . . . . . . . . . . 4 63 4. Capability Announcement . . . . . . . . . . . . . . . . . . . 5 64 5. Overload Report Handling . . . . . . . . . . . . . . . . . . 6 65 5.1. Reporting Node Overload Control State . . . . . . . . . . 6 66 5.2. Reacting Node Overload Control State . . . . . . . . . . 6 67 5.3. Reporting Node Maintenance of Overload Control State . . 7 68 5.4. Reacting Node Maintenance of Overload Control State . . . 7 69 5.5. Reporting Node Behavior for Rate Abatement Algorithm . . 7 70 5.6. Reacting Node Behavior for Rate Abatement Algorithm . . . 8 71 6. Rate Abatement Algorithm AVPs . . . . . . . . . . . . . . . . 8 72 6.1. OC-Supported-Features AVP . . . . . . . . . . . . . . . . 8 73 6.1.1. OC-Feature-Vector AVP . . . . . . . . . . . . . . . . 8 74 6.2. OC-OLR AVP . . . . . . . . . . . . . . . . . . . . . . . 8 75 6.2.1. OC-Maximum-Rate AVP . . . . . . . . . . . . . . . . . 9 76 6.3. Attribute Value Pair flag rules . . . . . . . . . . . . . 9 77 7. Rate Based Abatement Algorithm . . . . . . . . . . . . . . . 9 78 7.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 10 79 7.2. Reporting Node Behavior . . . . . . . . . . . . . . . . . 10 80 7.3. Reacting Node Behavior . . . . . . . . . . . . . . . . . 11 81 7.3.1. Default algorithm . . . . . . . . . . . . . . . . . . 11 82 7.3.2. Priority treatment . . . . . . . . . . . . . . . . . 14 83 7.3.3. Optional enhancement: avoidance of resonance . . . . 16 84 8. IANA Consideration . . . . . . . . . . . . . . . . . . . . . 17 85 8.1. AVP codes . . . . . . . . . . . . . . . . . . . . . . . . 17 86 8.2. New registries . . . . . . . . . . . . . . . . . . . . . 17 87 9. Security Considerations . . . . . . . . . . . . . . . . . . . 17 88 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18 89 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 90 11.1. Normative References . . . . . . . . . . . . . . . . . . 18 91 11.2. Informative References . . . . . . . . . . . . . . . . . 18 92 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 94 1. Introduction 96 This document defines a new Diameter overload control abatement 97 algorithm. 99 The base Diameter overload specification [RFC7683] defines the loss 100 algorithm as the default Diameter overload abatement algorithm. The 101 loss algorithm allows a reporting node to instruct a reacting node to 102 reduce the amount of traffic sent to the reporting node by abating 103 (diverting or throttling) a percentage of requests sent to the 104 server. While this can effectively decrease the load handled by the 105 server, it does not directly address cases where the rate of arrival 106 of service requests increases quickly. If the service requests that 107 result in Diameter transactions increases quickly then the loss 108 algorithm cannot guarantee the load presented to the server remains 109 below a specific rate level. The loss algorithm can be slow to 110 protect the stability of reporting nodes when subjected with rapidly 111 changing loads. 113 Consider the case where a reacting node is handling 100 service 114 requests per second, where each of these service requests results in 115 one Diameter transaction being sent to a reacting node. If the 116 reacting node is approaching an overload state, or is already in an 117 overload state, it will send a Diameter overload report requesting a 118 percentage reduction in traffic sent. Assume for this discussion 119 that the reporting node requests a 10% reduction. The reacting node 120 will then abate (diverting or throttling) ten Diameter transactions a 121 second, sending the remaining 90 transactions per second to the 122 reacting node. 124 Now assume that the reacting node's service requests spikes to 1000 125 requests per second. The reacting node will continue to honor the 126 reporting nodes request for a 10% reduction in traffic. This 127 results, in this example, in the reacting node sending 900 Diameter 128 transactions per second, abating the remaining 100 transactions per 129 second. This spike in traffic is significantly higher than the 130 reporting node is expecting to handle and can result in negative 131 impacts to the stability of the reporting node. 133 The reporting node can, and likely would, send another overload 134 report requesting that the reacting node abate 91% of requests to get 135 back to the desired 90 transactions per second. However, once the 136 spike has abated and the reacting node handled service requests 137 returns to 100 per second, this will result in just 9 transactions 138 per second being sent to the reporting node, requiring a new overload 139 report setting the reduction percentage back to 10%. This control 140 feedback loop has the potential to make the situation worse. 142 One of the benefits of a rate based algorithm is that it better 143 handles spikes in traffic. Instead of sending a request to reduce 144 traffic by a percentage, the rate approach allows the reporting node 145 to specify the maximum number of Diameter requests per second that 146 can be sent to the reporting node. For instance, in this example, 147 the reporting node could send a rate-based request specifying the 148 maximum transactions per second to be 90. The reacting node will 149 send the 90 regardless of whether it is receiving 100 or 1000 service 150 requests per second. 152 This document extends the base DOIC solution [RFC7683] to add support 153 for the rate based overload abatement algorithm. 155 This document draws heavily on work in the SIP Overload Control 156 working group. The definition of the rate abatement algorithm is 157 copied almost verbatim from the SOC document [RFC7415], with changes 158 focused on making the wording consistent with the DOIC solution and 159 the Diameter protocol. 161 2. Terminology and Abbreviations 163 Diameter Node 165 A RFC6733 Diameter Client, RFC6733 Diameter Server, or RFC6733 166 Diameter Agent. 168 Diameter Endpoint 170 An RFC6733 Diameter Client or RFC6733 Diameter Server. 172 DOIC Node 174 A Diameter Node that supports the DOIC solution defined in 175 [RFC7683]. 177 Reporting Node 179 A DOIC Node that sends a DOIC overload report. 181 Reacting Node 183 A DOIC Node that receives and acts on a DOIC overload report. 185 3. Interaction with DOIC report types 187 As of the publication of this specification there are two DOIC report 188 types defined with the specification of a third in progress: 190 1. Host - Overload of a specific Diameter Application at a specific 191 Diameter Node as defined in [RFC7683]. 193 2. Realm - Overload of a specific Diameter Application at a specific 194 Diameter Realm as defined in [RFC7683]. 196 3. Peer - Overload of a specific Diameter peer as defined in 197 [I-D.ietf-dime-agent-overload]. 199 The rate algorithm MAY be selected by reporting nodes for any of 200 these report types. 202 It is expected that all report types defined in the future will 203 indicate whether or not the rate algorithm can be used with that 204 report type. 206 4. Capability Announcement 208 This extension defines the rate abatement algorithm (referred to as 209 rate in this document) feature. Support for the rate feature will be 210 reflected by use of a new value, as defined in Section 6.1.1, in the 211 OC-Feature-Vector AVP per the rules defined in [RFC7683]. 213 Note that Diameter nodes that support the rate feature will, by 214 definition, support both the loss and rate based abatement 215 algorithms. DOIC reacting nodes SHOULD indicate support for both the 216 loss and rate algorithms in the OC-Feature-Vector AVP. 218 There may be local policy reasons that cause a DOIC node that 219 supports the rate abatement algorithm to not include it in the OC- 220 Feature-Vector. All reacting nodes, however, must continue to 221 include loss in the OC-Feature-Vector in order to remain compliant 222 with [RFC7683]. 224 A reporting node MAY select one abatement algorithm to apply to host 225 and realm reports and a different algorithm to apply to peer reports. 227 For host or realm reports the selected algorithm is reflected in 228 the OC-Feature-Vector AVP sent as part of the OC-Supported- 229 Features AVP included in answer messages for transaction where the 230 request contained an OC-Supported-Features AVP. This is per the 231 procedures defined in [RFC7683]. 233 For peer reports the selected algorithm is reflected in the OC- 234 Peer-Algo AVP sent as part of the OC-Supported-Features AVP 235 included answer messages for transactions where the request 236 contained an OC-Supported-Features AVP. This is per the 237 procedures defined in [I-D.ietf-dime-agent-overload]. 239 Editor's Node: The peer report specification is still under 240 development and, as such, the above paragraph is subject to 241 change. 243 5. Overload Report Handling 245 This section describes any changes to the behavior defined in 246 [RFC7683] for handling of overload reports when the rate overload 247 abatement algorithm is used. 249 5.1. Reporting Node Overload Control State 251 A reporting node that uses the rate abatement algorithm SHOULD 252 maintain reporting node Overload Control State (OCS) for each 253 reacting node to which it sends a rate Overload Report (OLR). 255 This is different from the behavior defined in [RFC7683] where a 256 single loss percentage sent to all reacting nodes. 258 A reporting node SHOULD maintain OCS entries when using the rate 259 abatement algorithm per supported Diameter application, per targeted 260 reacting node and per report-type. 262 A rate OCS entry is identified by the tuple of Application-Id, 263 report-type and DiameterID of the target of the rate OLR. 265 A reporting node that supports the rate abatement algorithm MUST 266 include the rate of its abatement algorithm in the OC-Maximum-Rate 267 AVP when sending a rate OLR. 269 All other elements for the OCS defined in [RFC7683] and 270 [I-D.ietf-dime-agent-overload] also apply to the reporting nodes OCS 271 when using the rate abatement algorithm. 273 5.2. Reacting Node Overload Control State 275 A reacting node that supports the rate abatement algorithm MUST 276 indicate rate as the selected abatement algorithm in the reacting 277 node OCS when receiving a rate OLR. 279 A reacting node that supports the rate abatement algorithm MUST 280 include the rate specified in the OC-Maximum-Rate AVP included in the 281 OC-OLR AVP as an element of the abatement algorithm specific portion 282 of reacting node OCS entries. 284 All other elements for the OCS defined in [RFC7683] and 285 [I-D.ietf-dime-agent-overload] also apply to the reporting nodes OCS 286 when using the rate abatement algorithm. 288 5.3. Reporting Node Maintenance of Overload Control State 290 A reporting node that has selected the rate overload abatement 291 algorithm and enters an overload condition MUST indicate rate as the 292 abatement algorithm in the resulting reporting node OCS entries. 294 A reporting node that has selected the rate abatement algorithm and 295 enters an overload condition MUST indicate the selected rate in the 296 resulting reporting node OCS entries. 298 When selecting the rate algorithm in the response to a request that 299 contained an OC-Supporting-Features AVP with an OC-Feature-Vector AVP 300 indicating support for the rate feature, a reporting node MUST ensure 301 that a reporting node OCS entry exists for the target of the overload 302 report. The target is defined as follows: 304 o For Host reports the target is the DiameterIdentity contained in 305 the Origin-Host AVP received in the request. 307 o For Realm reports the target is the DiameterIdentity contained in 308 the Origin-Realm AVP received in the request. 310 o For Peer reports the target is the DiameterIdentity of the 311 Diameter Peer from which the request was received. 313 5.4. Reacting Node Maintenance of Overload Control State 315 When receiving an answer message indicating that the reporting node 316 has selected the rate algorithm, a reacting node MUST indicate the 317 rate abatement algorithm in the reacting node OCS entry for the 318 reporting node. 320 A reacting node receiving an overload report for the rate abatement 321 algorithm MUST save the rate received in the OC-Maximum-Rate AVP 322 contained in the OC-OLR AVP in the reacting node OCS entry. 324 5.5. Reporting Node Behavior for Rate Abatement Algorithm 326 When in an overload condition with rate selected as the overload 327 abatement algorithm and when handling a request that contained an OC- 328 Supported-Features AVP that indicated support for the rate abatement 329 algorithm, a reporting node SHOULD include an OC-OLR AVP for the rate 330 algorithm using the parameters stored in the reporting node OCS for 331 the target of the overload report. 333 When sending an overload report for the Rate algorithm, the OC- 334 Maximum-Rate AVP is included and the OC-Reduction-Percentage AVP is 335 not included. 337 5.6. Reacting Node Behavior for Rate Abatement Algorithm 339 When determining if abatement treatment should be applied to a 340 request being sent to a reporting node that has selected the rate 341 overload abatement algorithm, the reacting node MAY use the algorithm 342 detailed in Section 7. 344 Note: Other algorithms for controlling the rate can be implemented 345 by the reacting node as long as they result in the correct rate of 346 traffic being sent to the reporting node. 348 Once a determination is made by the reacting node that an individual 349 Diameter request is to be subjected to abatement treatment then the 350 procedures for throttling and diversion defined in [RFC7683] and 351 [I-D.ietf-dime-agent-overload] apply. 353 6. Rate Abatement Algorithm AVPs 355 6.1. OC-Supported-Features AVP 357 The rate algorithm does not add any new AVPs to the OC-Supported- 358 Features AVP. 360 The rate algorithm does add a new feature bit to be carried in the 361 OC-Feature-Vector AVP. 363 6.1.1. OC-Feature-Vector AVP 365 This extension adds the following capabilities to the OC-Feature- 366 Vector AVP. 368 OLR_RATE_ALGORITHM (0x0000000000000004) 370 When this flag is set by the overload control endpoint it 371 indicates that the DOIC Node supports the rate overload control 372 algorithm. 374 6.2. OC-OLR AVP 376 This extension defines the OC-Maximum-Rate AVP to be an optional part 377 of the OC-OLR AVP. 379 OC-OLR ::= < AVP Header: TBD2 > 380 < OC-Sequence-Number > 381 < OC-Report-Type > 382 [ OC-Reduction-Percentage ] 383 [ OC-Validity-Duration ] 384 [ SourceID ] 385 [ OC-Maximum-Rate ] 386 * [ AVP ] 388 This extension makes no changes to the other AVPs that are part of 389 the OC-OLR AVP. 391 This extension does not define new overload report types. The 392 existing report types of host and realm defined in [RFC7683] apply to 393 the rate control algorithm. The peer report type defined in 394 [I-D.ietf-dime-agent-overload] also applies to the rate control 395 algorithm. 397 6.2.1. OC-Maximum-Rate AVP 399 The OC-Maximum-Rate AVP (AVP code TBD1) is type of Unsigned32 and 400 describes the maximum rate that that the sender is requested to send 401 traffic. This is specified in terms of requests per second. 403 A value of zero indicates that no traffic is to be sent. 405 6.3. Attribute Value Pair flag rules 407 +---------+ 408 |AVP flag | 409 |rules | 410 +----+----+ 411 AVP Section | |MUST| 412 Attribute Name Code Defined Value Type |MUST| NOT| 413 +---------------------------------------------------------+----+----+ 414 |OC-Maximum-Rate TBD1 6.2 Unsigned32 | | V | 415 +---------------------------------------------------------+----+----+ 417 7. Rate Based Abatement Algorithm 419 This section is pulled from [RFC7415], with minor changes needed to 420 make it apply to the Diameter protocol. 422 7.1. Overview 424 The reporting node is the one protected by the overload control 425 algorithm defined here. The reacting node is the one that abates 426 traffic towards the server. 428 Following the procedures defined in [draft-ietf-dime-doic], the 429 reacting node and reporting node signal one another support for rate- 430 based overload control. 432 Then periodically, the reporting node relies on internal measurements 433 (e.g. CPU utilization or queuing delay) to evaluate its overload 434 state and estimate a target maximum Diameter request rate in number 435 of requests per second (as opposed to target percent reduction in the 436 case of loss-based abatement). 438 When in an overloaded state, the reporting node uses the OC-OLR AVP 439 to inform reacting nodes of its overload state and of the target 440 Diameter request rate. 442 Upon receiving the overload report with a target maximum Diameter 443 request rate, each reacting node applies abatement treatment for new 444 Diameter requests towards the reporting node. 446 7.2. Reporting Node Behavior 448 The actual algorithm used by the reporting node to determine its 449 overload state and estimate a target maximum Diameter request rate is 450 beyond the scope of this document. 452 However, the reporting node MUST periodically evaluate its overload 453 state and estimate a target Diameter request rate beyond which it 454 would become overloaded. The reporting node must allocate a portion 455 of the target Diameter request rate to each of its reacting nodes. 456 The reporting node may set the same rate for every reacting node, or 457 may set different rates for different reacting node. 459 The maximum rate determined by the reporting node for a reacting node 460 applies to the entire stream of Diameter requests, even though 461 abatement may only affect a particular subset of the requests, since 462 the reacting node might apply priority as part of its decision of 463 which requests to abate. 465 When setting the maximum rate for a particular reacting node, the 466 reporting node may need take into account the workload (e.g. CPU 467 load per request) of the distribution of message types from that 468 reacting node. Furthermore, because the reacting node may prioritize 469 the specific types of messages it sends while under overload 470 restriction, this distribution of message types may be different from 471 the message distribution for that reacting node under non-overload 472 conditions (e.g., either higher or lower CPU load). 474 Note that the AVP for the rate algorithm is an upper bound (in 475 request messages per second) on the traffic sent by the reacting node 476 to the reporting node. The reacting node may send traffic at a rate 477 significantly lower than the upper bound, for a variety of reasons. 479 In other words, when multiple reacting nodes are being controlled by 480 an overloaded reporting node, at any given time some reacting nodes 481 may receive requests at a rate below its target maximum Diameter 482 request rate while others above that target rate. But the resulting 483 request rate presented to the overloaded reporting node will converge 484 towards the target Diameter request rate. 486 Upon detection of overload, and the determination to invoke overload 487 controls, the reporting node MUST follow the specifications in 488 [RFC7683] to notify its clients of the allocated target maximum 489 Diameter request rate and to notify them that the rate overload 490 abatement is in effect. 492 The reporting node MUST use the OC-Maximum-Rate AVP defined in this 493 specification to communicate a target maximum Diameter request rate 494 to each of its clients. 496 7.3. Reacting Node Behavior 498 7.3.1. Default algorithm 500 In determining whether or not to transmit a specific message, the 501 reacting node can use any algorithm that limits the message rate to 502 the OC-Maximum-Rate AVP value in units of messages per second. For 503 ease of discussion, we define T = 1/[OC-Maximum-Rate] as the target 504 inter-Diameter request interval. It may be strictly deterministic, 505 or it may be probabilistic. It may, or may not, have a tolerance 506 factor, to allow for short bursts, as long as the long term rate 507 remains below 1/T. 509 The algorithm may have provisions for prioritizing traffic. 511 If the algorithm requires other parameters (in addition to "T", which 512 is 1/OC-Maximum-Rate), they may be set autonomously by the reacting 513 node, or they may be negotiated independently between reacting node 514 and reporting node. 516 In either case, the coordination is out of scope for this document. 517 The default algorithms presented here (one with and one without 518 provisions for prioritizing traffic) are only examples. 520 To apply abatement treatment to new Diameter requests at the rate 521 specified in the OC-Maximum-Rate AVP value sent by the reporting node 522 to its reacting nodes, the reacting node MAY use the proposed default 523 algorithm for rate-based control or any other equivalent algorithm 524 that forward messages in conformance with the upper bound of 1/T 525 messages per second. 527 The default Leaky Bucket algorithm presented here is based on [ITU-T 528 Rec. I.371] Appendix A.2. The algorithm makes it possible for 529 reacting nodes to deliver Diameter requests at a rate specified in 530 the OC-Maximum-Rate value with tolerance parameter TAU (preferably 531 configurable). 533 Conceptually, the Leaky Bucket algorithm can be viewed as a finite 534 capacity bucket whose real-valued content drains out at a continuous 535 rate of 1 unit of content per time unit and whose content increases 536 by the increment T for each forwarded Diameter request. T is 537 computed as the inverse of the rate specified in the OC-Maximum-Rate 538 AVP value, namely T = 1 / OC-Maximum-Rate. 540 Note that when the OC-Maximum-Rate value is 0 with a non-zero OC- 541 Validity-Duration, then the reacting node should apply abatement 542 treatment to 100% of Diameter requests destined to the overloaded 543 reporting node. However, when the OC-Validity-Duration value is 0, 544 the reacting node should stop applying abatement treatment. 546 If, at a new Diameter request arrival, the content of the bucket is 547 less than or equal to the limit value TAU, then the Diameter request 548 is forwarded to the server; otherwise, the abatement treatment is 549 applied to the Diameter request. 551 Note that the capacity of the bucket (the upper bound of the counter) 552 is (T + TAU). 554 The tolerance parameter TAU determines how close the long-term 555 admitted rate is to an ideal control that would admit all Diameter 556 requests for arrival rates less than 1/T and then admit Diameter 557 requests precisely at the rate of 1/T for arrival rates above 1/T. 558 In particular at mean arrival rates close to 1/T, it determines the 559 tolerance to deviation of the inter-arrival time from T (the larger 560 TAU the more tolerance to deviations from the inter-departure 561 interval T). 563 This deviation from the inter-departure interval influences the 564 admitted rate burstyness, or the number of consecutive Diameter 565 requests forwarded to the reporting node (burst size proportional to 566 TAU over the difference between 1/T and the arrival rate). 568 In situations where reacting nodes are configured with some knowledge 569 about the reporting node (e.g., operator pre-provisioning), it can be 570 beneficial to choose a value of TAU based on how many reacting nodes 571 will be sending requests to the reporting node. 573 Reporting nodes with a very large number of reacting nodes, each with 574 a relatively small arrival rate, will generally benefit from a 575 smaller value for TAU in order to limit queuing (and hence response 576 times) at the reporting node when subjected to a sudden surge of 577 traffic from all reacting nodes. Conversely, a reporting node with a 578 relatively small number of reacting nodes, each with proportionally 579 larger arrival rate, will benefit from a larger value of TAU. 581 Once the control has been activated, at the arrival time of the k-th 582 new Diameter request, ta(k), the content of the bucket is 583 provisionally updated to the value 585 X' = X - (ta(k) - LCT) 587 where X is the value of the leaky bucket counter after arrival of the 588 last forwarded Diameter request, and LCT is the time at which the 589 last Diameter request was forwarded. 591 If X' is less than or equal to the limit value TAU, then the new 592 Diameter request is forwarded and the leaky bucket counter X is set 593 to X' (or to 0 if X' is negative) plus the increment T, and LCT is 594 set to the current time ta(k). If X' is greater than the limit value 595 TAU, then the abatement treatment is applied to the new Diameter 596 request and the values of X and LCT are unchanged. 598 When the first response from the reporting node has been received 599 indicating control activation (OC-Validity-Duration>0), LCT is set to 600 the time of activation, and the leaky bucket counter is initialized 601 to the parameter TAU0 (preferably configurable) which is 0 or larger 602 but less than or equal to TAU. 604 TAU can assume any positive real number value and is not necessarily 605 bounded by T. 607 TAU=4*T is a reasonable compromise between burst size and abatement 608 rate adaptation at low offered rate. 610 Note that specification of a value for TAU, and any communication or 611 coordination between servers, is beyond the scope of this document. 613 A reference algorithm is shown below. 615 No priority case: 617 // T: inter-transmission interval, set to 1 / OC-Maximum-Rate 618 // TAU: tolerance parameter 619 // ta: arrival time of the most recent arrival 620 // LCT: arrival time of last SIP request that was sent to the server 621 // (initialized to the first arrival time) 622 // X: current value of the leaky bucket counter (initialized to 623 // TAU0) 625 // After most recent arrival, calculate auxiliary variable Xp 626 Xp = X - (ta - LCT); 628 if (Xp <= TAU) { 629 // Transmit SIP request 630 // Update X and LCT 631 X = max (0, Xp) + T; 632 LCT = ta; 633 } else { 634 // Reject SIP request 635 // Do not update X and LCT 636 } 638 7.3.2. Priority treatment 640 The reacting node is responsible for applying message priority and 641 for maintaining two categories of requests: Request candidates for 642 reduction, requests not subject to reduction (except under 643 extenuating circumstances when there aren't any messages in the first 644 category that can be reduced). 646 Accordingly, the proposed Leaky bucket implementation is modified to 647 support priority using two thresholds for Diameter requests in the 648 set of request candidates for reduction. With two priorities, the 649 proposed Leaky bucket requires two thresholds TAU1 < TAU2: 651 o All new requests would be admitted when the leaky bucket counter 652 is at or below TAU1, 654 o Only higher priority requests would be admitted when the leaky 655 bucket counter is between TAU1 and TAU2, 657 o All requests would be rejected when the bucket counter is above 658 TAU2. 660 This can be generalized to n priorities using n thresholds for n>2 in 661 the obvious way. 663 With a priority scheme that relies on two tolerance parameters (TAU2 664 influences the priority traffic, TAU1 influences the non-priority 665 traffic), always set TAU1 <= TAU2 (TAU is replaced by TAU1 and TAU2). 666 Setting both tolerance parameters to the same value is equivalent to 667 having no priority. TAU1 influences the admitted rate the same way 668 as TAU does when no priority is set. And the larger the difference 669 between TAU1 and TAU2, the closer the control is to strict priority 670 queuing. 672 TAU1 and TAU2 can assume any positive real number value and is not 673 necessarily bounded by T. 675 Reasonable values for TAU0, TAU1 & TAU2 are: 677 o TAU0 = 0, 679 o TAU1 = 1/2 * TAU2, and 681 o TAU2 = 10 * T. 683 Note that specification of a value for TAU1 and TAU2, and any 684 communication or coordination between servers, is beyond the scope of 685 this document. 687 A reference algorithm is shown below. 689 Priority case: 691 // T: inter-transmission interval, set to 1 / OC-Maximum-Rate 692 // TAU1: tolerance parameter of no priority Diameter requests 693 // TAU2: tolerance parameter of priority Diameter requests 694 // ta: arrival time of the most recent arrival 695 // LCT: arrival time of last Diameter request that was sent to the server 696 // (initialized to the first arrival time) 697 // X: current value of the leaky bucket counter (initialized to 698 // TAU0) 700 // After most recent arrival, calculate auxiliary variable Xp 701 Xp = X - (ta - LCT); 703 if (AnyRequestReceived && Xp <= TAU1) || (PriorityRequestReceived && 704 Xp <= TAU2 && Xp > TAU1) { 705 // Transmit Diameter request 706 // Update X and LCT 707 X = max (0, Xp) + T; 708 LCT = ta; 709 } else { 710 // Apply abatement treatment to Diameter request 711 // Do not update X and LCT 712 } 714 7.3.3. Optional enhancement: avoidance of resonance 716 As the number of reacting node sources of traffic increases and the 717 throughput of the reporting node decreases, the maximum rate admitted 718 by each reacting node needs to decrease, and therefore the value of T 719 becomes larger. Under some circumstances, e.g. if the traffic arises 720 very quickly simultaneously at many sources, the occupancies of each 721 bucket can become synchronized, resulting in the admissions from each 722 source being close in time and batched or very 'peaky' arrivals at 723 the reporting node, which not only gives rise to control instability, 724 but also very poor delays and even lost messages. An appropriate 725 term for this is 'resonance' [Erramilli]. 727 If the network topology is such that resonance can occur, then a 728 simple way to avoid resonance is to randomize the bucket occupancy at 729 two appropriate points -- at the activation of control and whenever 730 the bucket empties -- as described below. 732 After updating the value of the leaky bucket to X', generate a value 733 u as follows: 735 if X' > 0, then u=0 737 else if X' <= 0, then let u be set to a random value uniformly 738 distributed between -1/2 and +1/2 739 Then (only) if the arrival is admitted, increase the bucket by an 740 amount T + uT, which will therefore be just T if the bucket hadn't 741 emptied, or lie between T/2 and 3T/2 if it had. 743 This randomization should also be done when control is activated, 744 i.e. instead of simply initializing the leaky bucket counter to TAU0, 745 initialize it to TAU0 + uT, where u is uniformly distributed as 746 above. Since activation would have been a result of response to a 747 request sent by the reacting node, the second term in this expression 748 can be interpreted as being the bucket increment following that 749 admission. 751 This method has the following characteristics: 753 o If TAU0 is chosen to be equal to TAU and all sources activate 754 control at the same time due to an extremely high request rate, 755 then the time until the first request admitted by each reacting 756 node would be uniformly distributed over [0,T]; 758 o The maximum occupancy is TAU + (3/2)T, rather than TAU + T without 759 randomization; 761 o For the special case of 'classic gapping' where TAU=0, then the 762 minimum time between admissions is uniformly distributed over 763 [T/2, 3T/2], and the mean time between admissions is the same, 764 i.e. T+1/R where R is the request arrival rate. 766 o At high load randomization rarely occurs, so there is no loss of 767 precision of the admitted rate, even though the randomized 768 'phasing' of the buckets remains. 770 8. IANA Consideration 772 8.1. AVP codes 774 New AVPs defined by this specification are listed in Section 6. All 775 AVP codes are allocated from the 'Authentication, Authorization, and 776 Accounting (AAA) Parameters' AVP Codes registry. 778 8.2. New registries 780 There are no new IANA registries introduced by this document. 782 9. Security Considerations 784 The rate overload abatement mechanism is an extension to the base 785 Diameter overload mechanism. As such, all of the security 786 considerations outlined in [RFC7683] apply to the rate overload 787 abatement mechanism. 789 10. Acknowledgements 791 11. References 793 11.1. Normative References 795 [I-D.ietf-dime-agent-overload] 796 Donovan, S., "Diameter Agent Overload", draft-ietf-dime- 797 agent-overload-00 (work in progress), December 2014. 799 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 800 Requirement Levels", BCP 14, RFC 2119, 801 DOI 10.17487/RFC2119, March 1997, 802 . 804 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 805 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 806 DOI 10.17487/RFC5226, May 2008, 807 . 809 [RFC6733] Fajardo, V., Ed., Arkko, J., Loughney, J., and G. Zorn, 810 Ed., "Diameter Base Protocol", RFC 6733, 811 DOI 10.17487/RFC6733, October 2012, 812 . 814 [RFC7683] Korhonen, J., Ed., Donovan, S., Ed., Campbell, B., and L. 815 Morand, "Diameter Overload Indication Conveyance", 816 RFC 7683, DOI 10.17487/RFC7683, October 2015, 817 . 819 11.2. Informative References 821 [Erramilli] 822 Erramilli, A. and L. Forys, "Traffic Synchronization 823 Effects In Teletraffic Systems", 1991. 825 [RFC7415] Noel, E. and P. Williams, "Session Initiation Protocol 826 (SIP) Rate Control", RFC 7415, DOI 10.17487/RFC7415, 827 February 2015, . 829 Authors' Addresses 830 Steve Donovan (editor) 831 Oracle 832 17210 Campbell Road 833 Dallas, Texas 75254 834 United States 836 Email: srdonovan@usdonovans.com 838 Eric Noel 839 AT&T Labs 840 200s Laurel Avenue 841 Middletown, NJ 07747 842 United States 844 Email: ecnoel@research.att.com