idnits 2.17.1 draft-ietf-dime-doic-rate-control-03.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 (March 18, 2016) is 2960 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) == Missing Reference: 'Erramilli' is mentioned on line 724, but not defined -- Looks like a reference, but probably isn't: '0' on line 755 == Missing Reference: 'T' is mentioned on line 755, but not defined == Unused Reference: 'RFC5226' is defined on line 794, but no explicit reference was found in the text == Unused Reference: 'RFC6733' is defined on line 799, 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 (~~), 6 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: September 19, 2016 AT&T Labs 6 March 18, 2016 8 Diameter Overload Rate Control 9 draft-ietf-dime-doic-rate-control-03.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 September 19, 2016. 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 9. Security Considerations . . . . . . . . . . . . . . . . . . . 17 86 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 17 87 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 88 11.1. Normative References . . . . . . . . . . . . . . . . . . 18 89 11.2. Informative References . . . . . . . . . . . . . . . . . 18 90 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 92 1. Introduction 94 This document defines a new Diameter overload control abatement 95 algorithm. 97 The base Diameter overload specification [RFC7683] defines the loss 98 algorithm as the default Diameter overload abatement algorithm. The 99 loss algorithm allows a reporting node to instruct a reacting node to 100 reduce the amount of traffic sent to the reporting node by abating 101 (diverting or throttling) a percentage of requests sent to the 102 server. While this can effectively decrease the load handled by the 103 server, it does not directly address cases where the rate of arrival 104 of service requests increase quickly. If the service requests that 105 result in Diameter transactions increases quickly then the loss 106 algorithm cannot guarantee the load presented to the server remains 107 below a specific rate level. The loss algorithm can be slow to 108 protect the stability of reporting nodes when subjected with rapidly 109 changing loads. 111 Consider the case where a reacting node is handling 100 service 112 requests per second, where each of these service requests results in 113 one Diameter transaction being sent to a reacting node. If the 114 reacting node is approaching an overload state, or is already in an 115 overload state, it will send a Diameter overload report requesting a 116 percentage reduction in traffic sent. Assume for this discussion 117 that the reporting node requests a 10% reduction. The reacting node 118 will then abate (diverting or throttling) ten Diameter transactions a 119 second, sending the remaining 90 transactions per second to the 120 reacting node. 122 Now assume that the reacting node's service requests spikes to 1000 123 requests per second. The reacting node will continue to honor the 124 reporting nodes request for a 10% reduction in traffic. This 125 results, in this example, in the reacting node sending 900 Diameter 126 transactions per second, abating the remaining 100 transactions per 127 second. This spike in traffic is significantly higher than the 128 reporting node is expecting to handle and can result in negative 129 impacts to the stability of the reporting node. 131 The reporting node can, and likely would, send another overload 132 report requesting that the reacting node abate 91% of requests to get 133 back to the desired 90 transactions per second. However, once the 134 spike has abated and the reacting node handled service requests 135 returns to 100 per second, this will result in just 9 transactions 136 per second being sent to the reporting node, requiring a new overload 137 report setting the reduction percentage back to 10%. This control 138 feedback loop has the potential to make the situation worse. 140 One of the benefits of a rate based algorithm is that it better 141 handles spikes in traffic. Instead of sending a request to reduce 142 traffic by a percentage, the rate approach allows the reporting node 143 to specify the maximum number of Diameter requests per second that 144 can be sent to the reporting node. For instance, in this example, 145 the reporting node could send a rate based request specifying the 146 maximum transactions per second to be 90. The reacting node will 147 send the 90 regardless of whether it is receiving 100 or 1000 service 148 requests per second. 150 This document extends the base DOIC solution [RFC7683] to add support 151 for the rate based overload abatement algorithm. 153 This document draws heavily on work in the RIA SIP Overload Control 154 working group. The definition of the rate abatement algorithm is 155 copied almost verbatim from the SOC document [RFC7415], with changes 156 focused on making the wording consistent with the DOIC solution and 157 the Diameter protocol. 159 2. Terminology and Abbreviations 161 Diameter Node 163 A RFC6733 Diameter Client, RFC6733 Diameter Server, or RFC6733 164 Diameter Agent. 166 Diameter Endpoint 168 An RFC6733 Diameter Client or RFC6733 Diameter Server. 170 DOIC Node 172 A Diameter Node that supports the DOIC solution defined in 173 [RFC7683]. 175 Reporting Node 177 A DOIC Node that sends a DOIC overload report. 179 Reacting Node 181 A DOIC Node that receives and acts on a DOIC overload report. 183 3. Interaction with DOIC report types 185 As of the publication of this specification there are two DOIC report 186 types defined with the specification of a third in progress: 188 1. Host - Overload of a specific Diameter Application at a specific 189 Diameter Node as defined in [RFC7683]. 191 2. Realm - Overload of a specific Diameter Application at a specific 192 Diameter Realm as defined in [RFC7683]. 194 3. Peer - Overload of a specific Diameter peer as defined in 195 [I-D.ietf-dime-agent-overload]. 197 The rate algorithm MAY be selected by reporting nodes for any of 198 these report types. 200 It is expected that all report types defined in the future will 201 indicate whether or not the rate algorithm can be used with that 202 report type. 204 4. Capability Announcement 206 This extension defines the rate abatement algorithm (referred to as 207 rate in this document) feature. Support for the rate feature will be 208 reflected by use of a new value, as defined in Section 6.1.1, in the 209 OC-Feature-Vector AVP per the rules defined in [RFC7683]. 211 Note that Diameter nodes that support the rate feature will, by 212 definition, support both the loss and rate based abatement 213 algorithms. DOIC reacting nodes SHOULD indicate support for both the 214 loss and rate algorithms in the OC-Feature-Vector AVP. 216 There may be local policy reasons that cause a DOIC node that 217 supports the rate abatement algorithm to not include it in the OC- 218 Feature-Vector. All reacting nodes, however, must continue to 219 include loss in the OC-Feature-Vector in order to remain compliant 220 with [RFC7683]. 222 A reporting node MAY select one abatement algorithm to apply to host 223 and realm reports and a different algorithm to apply to peer reports. 225 For host or realm reports the selected algorithm is reflected in 226 the OC-Feature-Vector AVP sent as part of the OC-Selected-Features 227 AVP included in answer messages for transaction where the request 228 contained an OC-Supported-Features AVP. This is per the 229 procedures defined in [RFC7683]. 231 For peer reports the selected algorithm is reflected in the OC- 232 Peer-Algo AVP sent as part of the OC-Supported-Features AVP 233 included answer messages for transactions where the request 234 contained an OC-Supported-Features AVP. This is per the 235 procedures defined in [I-D.ietf-dime-agent-overload]. 237 Editor's Node: The peer report specification is still under 238 development and, as such, the above paragraph is subject to 239 change. 241 5. Overload Report Handling 243 This section describes any changes to the behavior defined in 244 [RFC7683] for handling of overload reports when the rate overload 245 abatement algorithm is used. 247 5.1. Reporting Node Overload Control State 249 A reporting node that uses the rate abatement algorithm SHOULD 250 maintain reporting node OCS for each reacting node to which it sends 251 a rate OLR. 253 This is different from the behavior defines in [RFC7683] where a 254 single loss percentage sent to all reacting nodes. 256 A reporting node SHOULD maintain OCS entries when using the rate 257 abatement algorithm per supported Diameter application, per targeted 258 reacting node and per report-type. 260 A rate OCS entry is identified by the tuple of Application-Id, 261 report-type and DiameterID of the target of the rate OLR. 263 A reporting node that supports the rate abatement algorithm MUST 264 include the specified rate in the abatement algorithm specific 265 portion of the reporting node rate OCS when sending a rate OLR. 267 All other elements for the OCS defined in [RFC7683] and 268 [I-D.ietf-dime-agent-overload] also apply to the reporting nodes OCS 269 when using the rate abatement algorithm. 271 5.2. Reacting Node Overload Control State 273 A reacting node that supports the rate abatement algorithm MUST 274 indicate rate as the selected abatement algorithm in the reacting 275 node OCS when receiving a rate OLR. 277 A reacting node that supports the rate abatement algorithm MUST 278 include the rate specified in the OC-Maximum-Rate AVP included in the 279 OC-OLR AVP as an element of the abatement algorithm specific portion 280 of reacting node OCS entries. 282 All other elements for the OCS defined in [RFC7683] and 283 [I-D.ietf-dime-agent-overload] also apply to the reporting nodes OCS 284 when using the rate abatement algorithm. 286 5.3. Reporting Node Maintenance of Overload Control State 288 A reporting node that has selected the rate overload abatement 289 algorithm and enters an overload condition MUST indicate rate as the 290 abatement algorithm in the resulting reporting node OCS entries. 292 A reporting node that has selected the rate abatement algorithm and 293 enters an overload condition MUST indicate the selected rate in the 294 resulting reporting node OCS entries. 296 When selecting the rate algorithm in the response to a request that 297 contained an OC-Supporting-Features AVP with an OC-Feature-Vector AVP 298 indicating support for the rate feature, a reporting node MUST ensure 299 that a reporting node OCS entry exists for the target of the overload 300 report. The target is defined as follows: 302 o For Host reports the target is the DiameterIdentity contained in 303 the Origin-Host AVP received in the request. 305 o For Realm reports the target is the DiameterIdentity contained in 306 the Origin-Realm AVP received in the request. 308 o For Peer reports the target is the DiameterIdentity of the 309 Diameter Peer from which the request was received. 311 5.4. Reacting Node Maintenance of Overload Control State 313 When receiving an answer message indicating that the reacting node 314 has selected the rate algorithm, a reaction node MUST indicate the 315 rate abatement algorithm in the reacting node OCS entry for the 316 reporting node. 318 A reacting node receiving an overload report for the rate abatement 319 algorithm MUST save the rate received in the OC-Maximum-Rate AVP 320 contained in the OC-OLR AVP in the reacting node OCS entry. 322 5.5. Reporting Node Behavior for Rate Abatement Algorithm 324 When in an overload condition with rate selected as the overload 325 abatement algorithm and when handling a request that contained an OC- 326 Supported-Features AVP that indicated support for the rate abatement 327 algorithm, a reporting node SHOULD include an OC-OLR AVP for the rate 328 algorithm using the parameters stored in the reporting node OCS for 329 the target of the overload report. 331 When sending an overload report for the Rate algorithm, the OC- 332 Maximum-Rate AVP is included and the OC-Reduction-Percentage AVP is 333 not included. 335 5.6. Reacting Node Behavior for Rate Abatement Algorithm 337 When determining if abatement treatment should be applied to a 338 request being sent to a reporting node that has selected the rate 339 overload abatement algorithm, the reacting node MAY use the algorithm 340 detailed in Section 6. 342 Note: Other algorithms for controlling the rate can be implemented 343 by the reacting node as long as they result in the correct rate of 344 traffic being sent to the reporting node. 346 Once a determination is made by the reacting node that an individual 347 Diameter request is to be subjected to abatement treatment then the 348 procedures for throttling and diversion defined in [RFC7683] and 349 [I-D.ietf-dime-agent-overload] apply. 351 6. Rate Abatement Algorithm AVPs 353 6.1. OC-Supported-Features AVP 355 The rate algorithm does not add any new AVPs to the OC-Supported- 356 Features AVP. 358 The rate algorithm does add a new feature bit to be carried in the 359 OC-Feature-Vector AVP. 361 6.1.1. OC-Feature-Vector AVP 363 This extension adds the following capabilities to the OC-Feature- 364 Vector AVP. 366 OLR_RATE_ALGORITHM (0x0000000000000004) 368 When this flag is set by the overload control endpoint it 369 indicates that the DOIC Node supports the rate overload control 370 algorithm. 372 6.2. OC-OLR AVP 374 This extension defines the OC-Maximum-Rate AVP to be an optional part 375 of the OC-OLR AVP. 377 OC-OLR ::= < AVP Header: TBD2 > 378 < OC-Sequence-Number > 379 < OC-Report-Type > 380 [ OC-Reduction-Percentage ] 381 [ OC-Validity-Duration ] 382 [ OC-Source-ID ] 383 [ OC-Abatement-Algorithm ] 384 [ OC-Maximum-Rate ] 385 * [ AVP ] 387 This extension makes no changes to the other AVPs that are part of 388 the OC-OLR AVP. 390 This extension does not define new overload report types. The 391 existing report types of host and realm defined in [RFC7683] apply to 392 the rate control algorithm. The peer report type defined in 393 [I-D.ietf-dime-agent-overload] also applies to the rate control 394 algorithm. 396 6.2.1. OC-Maximum-Rate AVP 398 The OC-Maximum-Rate AVP (AVP code TBD1) is type of Unsigned32 and 399 describes the maximum rate that that the sender is requested to send 400 traffic. This is specified in terms of requests per second. 402 A value of zero indicates that no traffic is to be sent. 404 6.3. Attribute Value Pair flag rules 406 +---------+ 407 |AVP flag | 408 |rules | 409 +----+----+ 410 AVP Section | |MUST| 411 Attribute Name Code Defined Value Type |MUST| NOT| 412 +---------------------------------------------------------+----+----+ 413 |OC-Maximum-Rate TBD1 x.x Unsigned64 | | V | 414 +---------------------------------------------------------+----+----+ 416 7. Rate Based Abatement Algorithm 418 This section is pulled from [RFC7415], with minor changes needed to 419 make it apply to the Diameter protocol. 421 7.1. Overview 423 The reporting node is the one protected by the overload control 424 algorithm defined here. The reacting node is the one that abates 425 traffic towards the server. 427 Following the procedures defined in [draft-ietf-dime-doic], the 428 reacting node and reporting node signal one another support for rate- 429 based overload control. 431 Then periodically, the reporting node relies on internal measurements 432 (e.g. CPU utilization or queuing delay) to evaluate its overload 433 state and estimate a target maximum Diameter request rate in number 434 of requests per second (as opposed to target percent reduction in the 435 case of loss-based abatement). 437 When in an overloaded state, the reporting node uses the OC-OLR AVP 438 to inform reacting nodes of its overload state and of the target 439 Diameter request rate. 441 Upon receiving the overload report with a target maximum Diameter 442 request rate, each reacting node applies abatement treatment for new 443 Diameter requests towards the reporting node. 445 7.2. Reporting Node Behavior 447 The actual algorithm used by the reporting node to determine its 448 overload state and estimate a target maximum Diameter request rate is 449 beyond the scope of this document. 451 However, the reporting node MUST periodically evaluate its overload 452 state and estimate a target Diameter request rate beyond which it 453 would become overloaded. The reporting node must allocate a portion 454 of the target Diameter request rate to each of its reacting nodes. 455 The reporting node may set the same rate for every reacting node, or 456 may set different rates for different reacting node. 458 The maximum rate determined by the reporting node for a reacting node 459 applies to the entire stream of Diameter requests, even though 460 abatement may only affect a particular subset of the requests, since 461 the reacting node might apply priority as part of its decision of 462 which requests to abate. 464 When setting the maximum rate for a particular reacting node, the 465 reporting node may need take into account the workload (e.g. cpu load 466 per request) of the distribution of message types from that reacting 467 node. Furthermore, because the reacting node may prioritize the 468 specific types of messages it sends while under overload restriction, 469 this distribution of message types may be different from the message 470 distribution for that reacting node under non-overload conditions 471 (e.g., either higher or lower cpu load). 473 Note that the AVP for the rate algorithm is an upper bound (in 474 request messages per second) on the traffic sent by the reacting node 475 to the reporting node. The reacting node may send traffic at a rate 476 significantly lower than the upper bound, for a variety of reasons. 478 In other words, when multiple reacting nodes are being controlled by 479 an overloaded reporting node, at any given time some reacting nodes 480 may receive requests at a rate below its target maximum Diameter 481 request rate while others above that target rate. But the resulting 482 request rate presented to the overloaded reporting node will converge 483 towards the target Diameter request rate. 485 Upon detection of overload, and the determination to invoke overload 486 controls, the reporting node MUST follow the specifications in 487 [draft-ietf-dime-ovli] to notify its clients of the allocated target 488 maximum Diameter request rate and to notify them that the rate 489 overload abatement is in effect. 491 The reporting node MUST use the OC-Maximum-Rate AVP defined in this 492 specification to communicate a target maximum Diameter request rate 493 to each of its clients. 495 7.3. Reacting Node Behavior 497 7.3.1. Default algorithm 499 In determining whether or not to transmit a specific message, the 500 reacting node can use any algorithm that limits the message rate to 501 the OC-Maximum-Rate AVP value in units of messages per second. For 502 ease of discussion, we define T = 1/[OC-Maximum-Rate] as the target 503 inter-Diameter request interval. It may be strictly deterministic, 504 or it may be probabilistic. It may, or may not, have a tolerance 505 factor, to allow for short bursts, as long as the long term rate 506 remains below 1/T. 508 The algorithm may have provisions for prioritizing traffic. 510 If the algorithm requires other parameters (in addition to "T", which 511 is 1/OC-Maximum-Rate), they may be set autonomously by the reacting 512 node, or they may be negotiated independently between reacting node 513 and reporting node. 515 In either case, the coordination is out of scope for this document. 516 The default algorithms presented here (one with and one without 517 provisions for prioritizing traffic) are only examples. 519 To apply abatement treatment to new Diameter requests at the rate 520 specified in the OC-Maximum-Rate AVP value sent by the reporting node 521 to its reacting nodes, the reacting node MAY use the proposed default 522 algorithm for rate-based control or any other equivalent algorithm 523 that forward messages in conformance with the upper bound of 1/T 524 messages per second. 526 The default Leaky Bucket algorithm presented here is based on [ITU-T 527 Rec. I.371] Appendix A.2. The algorithm makes it possible for 528 reacting nodes to deliver Diameter requests at a rate specified in 529 the OC-Maximum-Rate value with tolerance parameter TAU (preferably 530 configurable). 532 Conceptually, the Leaky Bucket algorithm can be viewed as a finite 533 capacity bucket whose real-valued content drains out at a continuous 534 rate of 1 unit of content per time unit and whose content increases 535 by the increment T for each forwarded Diameter request. T is 536 computed as the inverse of the rate specified in the OC-Maximum-Rate 537 AVP value, namely T = 1 / OC-Maximum-Rate. 539 Note that when the OC-Maximum-Rate value is 0 with a non-zero OC- 540 Validity-Duration, then the reacting node should apply abatement 541 treatment to 100% of Diameter requests destined to the overloaded 542 reporting node. However, when the OC-Validity-Duration value is 0, 543 the reacting node should stop applying abatement treatment. 545 If, at a new Diameter request arrival, the content of the bucket is 546 less than or equal to the limit value TAU, then the Diameter request 547 is forwarded to the server; otherwise, the abatement treatment is 548 applied to the Diameter request. 550 Note that the capacity of the bucket (the upper bound of the counter) 551 is (T + TAU). 553 The tolerance parameter TAU determines how close the long-term 554 admitted rate is to an ideal control that would admit all Diameter 555 requests for arrival rates less than 1/T and then admit Diameter 556 requests precisely at the rate of 1/T for arrival rates above 1/T. 557 In particular at mean arrival rates close to 1/T, it determines the 558 tolerance to deviation of the inter-arrival time from T (the larger 559 TAU the more tolerance to deviations from the inter-departure 560 interval T). 562 This deviation from the inter-departure interval influences the 563 admitted rate burstyness, or the number of consecutive Diameter 564 requests forwarded to the reporting node (burst size proportional to 565 TAU over the difference between 1/T and the arrival rate). 567 In situations where reacting nodes are configured with some knowledge 568 about the reporting node (e.g., operator pre-provisioning), it can be 569 beneficial to choose a value of TAU based on how many reacting nodes 570 will be sending requests to the reporting node. 572 Reporting nodes with a very large number of reacting nodes, each with 573 a relatively small arrival rate, will generally benefit from a 574 smaller value for TAU in order to limit queuing (and hence response 575 times) at the reporting node when subjected to a sudden surge of 576 traffic from all reacting nodes. Conversely, a reporting node with a 577 relatively small number of reacting nodes, each with proportionally 578 larger arrival rate, will benefit from a larger value of TAU. 580 Once the control has been activated, at the arrival time of the k-th 581 new Diameter request, ta(k), the content of the bucket is 582 provisionally updated to the value 584 X' = X - (ta(k) - LCT) 586 where X is the value of the leaky bucket counter after arrival of the 587 last forwarded Diameter request, and LCT is the time at which the 588 last Diameter request was forwarded. 590 If X' is less than or equal to the limit value TAU, then the new 591 Diameter request is forwarded and the leaky bucket counter X is set 592 to X' (or to 0 if X' is negative) plus the increment T, and LCT is 593 set to the current time ta(k). If X' is greater than the limit value 594 TAU, then the abatement treatment is applied to the new Diameter 595 request and the values of X and LCT are unchanged. 597 When the first response from the reporting node has been received 598 indicating control activation (OC-Validity-Duration>0), LCT is set to 599 the time of activation, and the leaky bucket counter is initialized 600 to the parameter TAU0 (preferably configurable) which is 0 or larger 601 but less than or equal to TAU. 603 TAU can assume any positive real number value and is not necessarily 604 bounded by T. 606 TAU=4*T is a reasonable compromise between burst size and abatement 607 rate adaptation at low offered rate. 609 Note that specification of a value for TAU, and any communication or 610 coordination between servers, is beyond the scope of this document. 612 A reference algorithm is shown below. 614 No priority case: 616 // T: inter-transmission interval, set to 1 / OC-Maximum-Rate 617 // TAU: tolerance parameter 618 // ta: arrival time of the most recent arrival 619 // LCT: arrival time of last SIP request that was sent to the server 620 // (initialized to the first arrival time) 621 // X: current value of the leaky bucket counter (initialized to 622 // TAU0) 624 // After most recent arrival, calculate auxiliary variable Xp 625 Xp = X - (ta - LCT); 627 if (Xp <= TAU) { 628 // Transmit SIP request 629 // Update X and LCT 630 X = max (0, Xp) + T; 631 LCT = ta; 632 } else { 633 // Reject SIP request 634 // Do not update X and LCT 635 } 637 7.3.2. Priority treatment 639 The reacting node is responsible for applying message priority and 640 for maintaining two categories of requests: Request candidates for 641 reduction, requests not subject to reduction (except under 642 extenuating circumstances when there aren't any messages in the first 643 category that can be reduced). 645 Accordingly, the proposed Leaky bucket implementation is modified to 646 support priority using two thresholds for Diameter requests in the 647 set of request candidates for reduction. With two priorities, the 648 proposed Leaky bucket requires two thresholds TAU1 < TAU2: 650 o All new requests would be admitted when the leaky bucket counter 651 is at or below TAU1, 653 o Only higher priority requests would be admitted when the leaky 654 bucket counter is between TAU1 and TAU2, 656 o All requests would be rejected when the bucket counter is above 657 TAU2. 659 This can be generalized to n priorities using n thresholds for n>2 in 660 the obvious way. 662 With a priority scheme that relies on two tolerance parameters (TAU2 663 influences the priority traffic, TAU1 influences the non-priority 664 traffic), always set TAU1 <= TAU2 (TAU is replaced by TAU1 and TAU2). 665 Setting both tolerance parameters to the same value is equivalent to 666 having no priority. TAU1 influences the admitted rate the same way 667 as TAU does when no priority is set. And the larger the difference 668 between TAU1 and TAU2, the closer the control is to strict priority 669 queuing. 671 TAU1 and TAU2 can assume any positive real number value and is not 672 necessarily bounded by T. 674 Reasonable values for TAU0, TAU1 & TAU2 are: 676 o TAU0 = 0, 678 o TAU1 = 1/2 * TAU2, and 680 o TAU2 = 10 * T. 682 Note that specification of a value for TAU1 and TAU2, and any 683 communication or coordination between servers, is beyond the scope of 684 this document. 686 A reference algorithm is shown below. 688 Priority case: 690 // T: inter-transmission interval, set to 1 / OC-Maximum-Rate 691 // TAU1: tolerance parameter of no priority Diameter requests 692 // TAU2: tolerance parameter of priority Diameter requests 693 // ta: arrival time of the most recent arrival 694 // LCT: arrival time of last Diameter request that was sent to the server 695 // (initialized to the first arrival time) 696 // X: current value of the leaky bucket counter (initialized to 697 // TAU0) 699 // After most recent arrival, calculate auxiliary variable Xp 700 Xp = X - (ta - LCT); 702 if (AnyRequestReceived && Xp <= TAU1) || (PriorityRequestReceived && 703 Xp <= TAU2 && Xp > TAU1) { 704 // Transmit Diameter request 705 // Update X and LCT 706 X = max (0, Xp) + T; 707 LCT = ta; 708 } else { 709 // Apply abatement treatment to Diameter request 710 // Do not update X and LCT 711 } 713 7.3.3. Optional enhancement: avoidance of resonance 715 As the number of reacting node sources of traffic increases and the 716 throughput of the reporting node decreases, the maximum rate admitted 717 by each reacting node needs to decrease, and therefore the value of T 718 becomes larger. Under some circumstances, e.g. if the traffic arises 719 very quickly simultaneously at many sources, the occupancies of each 720 bucket can become synchronized, resulting in the admissions from each 721 source being close in time and batched or very 'peaky' arrivals at 722 the reporting node, which not only gives rise to control instability, 723 but also very poor delays and even lost messages. An appropriate 724 term for this is 'resonance' [Erramilli]. 726 If the network topology is such that resonance can occur, then a 727 simple way to avoid resonance is to randomize the bucket occupancy at 728 two appropriate points -- at the activation of control and whenever 729 the bucket empties -- as described below. 731 After updating the value of the leaky bucket to X', generate a value 732 u as follows: 734 if X' > 0, then u=0 736 else if X' <= 0, then let u be set to a random value uniformly 737 distributed between -1/2 and +1/2 738 Then (only) if the arrival is admitted, increase the bucket by an 739 amount T + uT, which will therefore be just T if the bucket hadn't 740 emptied, or lie between T/2 and 3T/2 if it had. 742 This randomization should also be done when control is activated, 743 i.e. instead of simply initializing the leaky bucket counter to TAU0, 744 initialize it to TAU0 + uT, where u is uniformly distributed as 745 above. Since activation would have been a result of response to a 746 request sent by the reacting node, the second term in this expression 747 can be interpreted as being the bucket increment following that 748 admission. 750 This method has the following characteristics: 752 o If TAU0 is chosen to be equal to TAU and all sources activate 753 control at the same time due to an extremely high request rate, 754 then the time until the first request admitted by each reacting 755 node would be uniformly distributed over [0,T]; 757 o The maximum occupancy is TAU + (3/2)T, rather than TAU + T without 758 randomization; 760 o For the special case of 'classic gapping' where TAU=0, then the 761 minimum time between admissions is uniformly distributed over 762 [T/2, 3T/2], and the mean time between admissions is the same, 763 i.e. T+1/R where R is the request arrival rate. 765 o At high load randomization rarely occurs, so there is no loss of 766 precision of the admitted rate, even though the randomized 767 'phasing' of the buckets remains. 769 8. IANA Consideration 771 TBD 773 9. Security Considerations 775 The rate overload abatement mechanism is an extension to the based 776 Diameter overload mechanism. As such, all of the security 777 considerations outlined in [RFC7683] apply to the rate overload 778 abatement mechanism. 780 10. Acknowledgements 781 11. References 783 11.1. Normative References 785 [I-D.ietf-dime-agent-overload] 786 Donovan, S., "Diameter Agent Overload", draft-ietf-dime- 787 agent-overload-00 (work in progress), December 2014. 789 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 790 Requirement Levels", BCP 14, RFC 2119, 791 DOI 10.17487/RFC2119, March 1997, 792 . 794 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 795 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 796 DOI 10.17487/RFC5226, May 2008, 797 . 799 [RFC6733] Fajardo, V., Ed., Arkko, J., Loughney, J., and G. Zorn, 800 Ed., "Diameter Base Protocol", RFC 6733, 801 DOI 10.17487/RFC6733, October 2012, 802 . 804 [RFC7683] Korhonen, J., Ed., Donovan, S., Ed., Campbell, B., and L. 805 Morand, "Diameter Overload Indication Conveyance", 806 RFC 7683, DOI 10.17487/RFC7683, October 2015, 807 . 809 11.2. Informative References 811 [RFC7415] Noel, E. and P. Williams, "Session Initiation Protocol 812 (SIP) Rate Control", RFC 7415, DOI 10.17487/RFC7415, 813 February 2015, . 815 Authors' Addresses 817 Steve Donovan (editor) 818 Oracle 819 17210 Campbell Road 820 Dallas, Texas 75254 821 United States 823 Email: srdonovan@usdonovans.com 824 Eric Noel 825 AT&T Labs 826 200s Laurel Avenue 827 Middletown, NJ 07747 828 United States 830 Email: ecnoel@research.att.com