idnits 2.17.1 draft-ietf-soc-overload-control-12.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 694 has weird spacing: '...control param...' == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document date (February 1, 2013) is 4102 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 740 -- Looks like a reference, but probably isn't: '100' on line 740 == Outdated reference: A later version (-13) exists of draft-ietf-soc-load-control-event-package-06 == Outdated reference: A later version (-10) exists of draft-ietf-soc-overload-rate-control-03 Summary: 0 errors (**), 0 flaws (~~), 5 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SOC Working Group V. Gurbani, Ed. 3 Internet-Draft V. Hilt 4 Intended status: Standards Track Bell Laboratories, Alcatel-Lucent 5 Expires: August 5, 2013 H. Schulzrinne 6 Columbia University 7 February 1, 2013 9 Session Initiation Protocol (SIP) Overload Control 10 draft-ietf-soc-overload-control-12 12 Abstract 14 Overload occurs in Session Initiation Protocol (SIP) networks when 15 SIP servers have insufficient resources to handle all SIP messages 16 they receive. Even though the SIP protocol provides a limited 17 overload control mechanism through its 503 (Service Unavailable) 18 response code, SIP servers are still vulnerable to overload. This 19 document defines the behaviour of SIP servers involved in overload 20 control, and in addition, it specifies a loss-based overload scheme 21 for SIP. 23 Status of this Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on August 5, 2013. 40 Copyright Notice 42 Copyright (c) 2013 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 58 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 59 3. Overview of operations . . . . . . . . . . . . . . . . . . . . 5 60 4. Via header parameters for overload control . . . . . . . . . . 6 61 4.1. The oc parameter . . . . . . . . . . . . . . . . . . . . . 6 62 4.2. The oc-algo parameter . . . . . . . . . . . . . . . . . . 7 63 4.3. The oc-validity parameter . . . . . . . . . . . . . . . . 7 64 4.4. The oc-seq parameter . . . . . . . . . . . . . . . . . . . 8 65 5. General behaviour . . . . . . . . . . . . . . . . . . . . . . 8 66 5.1. Determining support for overload control . . . . . . . . . 9 67 5.2. Creating and updating the overload control parameters . . 10 68 5.3. Determining the 'oc' Parameter Value . . . . . . . . . . . 11 69 5.4. Processing the Overload Control Parameters . . . . . . . . 12 70 5.5. Using the Overload Control Parameter Values . . . . . . . 12 71 5.6. Forwarding the overload control parameters . . . . . . . . 13 72 5.7. Terminating overload control . . . . . . . . . . . . . . . 13 73 5.8. Stabilizing overload algorithm selection . . . . . . . . . 14 74 5.9. Self-Limiting . . . . . . . . . . . . . . . . . . . . . . 14 75 5.10. Responding to an Overload Indication . . . . . . . . . . . 15 76 5.10.1. Message prioritization at the hop before the 77 overloaded server . . . . . . . . . . . . . . . . . . 15 78 5.10.2. Rejecting requests at an overloaded server . . . . . 16 79 5.11. 100-Trying provisional response and overload control 80 parameters . . . . . . . . . . . . . . . . . . . . . . . . 16 81 6. The loss-based overload control scheme . . . . . . . . . . . . 17 82 6.1. Special parameter values for loss-based overload 83 control . . . . . . . . . . . . . . . . . . . . . . . . . 17 84 6.2. Example . . . . . . . . . . . . . . . . . . . . . . . . . 18 85 6.3. Default algorithm for loss-based overload control . . . . 19 86 7. Relationship with other IETF SIP load control efforts . . . . 22 87 8. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 88 9. Design Considerations . . . . . . . . . . . . . . . . . . . . 23 89 9.1. SIP Mechanism . . . . . . . . . . . . . . . . . . . . . . 23 90 9.1.1. SIP Response Header . . . . . . . . . . . . . . . . . 23 91 9.1.2. SIP Event Package . . . . . . . . . . . . . . . . . . 24 92 9.2. Backwards Compatibility . . . . . . . . . . . . . . . . . 25 93 10. Security Considerations . . . . . . . . . . . . . . . . . . . 26 94 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 95 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 27 96 12.1. Normative References . . . . . . . . . . . . . . . . . . . 27 97 12.2. Informative References . . . . . . . . . . . . . . . . . . 27 98 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 28 99 Appendix B. RFC5390 requirements . . . . . . . . . . . . . . . . 28 100 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 34 102 1. Introduction 104 As with any network element, a Session Initiation Protocol (SIP) 105 [RFC3261] server can suffer from overload when the number of SIP 106 messages it receives exceeds the number of messages it can process. 107 Overload can pose a serious problem for a network of SIP servers. 108 During periods of overload, the throughput of a network of SIP 109 servers can be significantly degraded. In fact, overload may lead to 110 a situation in which the throughput drops down to a small fraction of 111 the original processing capacity. This is often called congestion 112 collapse. 114 Overload is said to occur if a SIP server does not have sufficient 115 resources to process all incoming SIP messages. These resources may 116 include CPU processing capacity, memory, network bandwidth, input/ 117 output, or disk resources. 119 For overload control, we only consider failure cases where SIP 120 servers are unable to process all SIP requests due to resource 121 constraints. There are other cases where a SIP server can 122 successfully process incoming requests but has to reject them due to 123 failure conditions unrelated to the SIP server being overloaded. For 124 example, a PSTN gateway that runs out of trunks but still has plenty 125 of capacity to process SIP messages should reject incoming INVITEs 126 using a 488 (Not Acceptable Here) response [RFC4412]. Similarly, a 127 SIP registrar that has lost connectivity to its registration database 128 but is still capable of processing SIP requests should reject 129 REGISTER requests with a 500 (Server Error) response [RFC3261]. 130 Overload control does not apply to these cases and SIP provides 131 appropriate response codes for them. 133 The SIP protocol provides a limited mechanism for overload control 134 through its 503 (Service Unavailable) response code. However, this 135 mechanism cannot prevent overload of a SIP server and it cannot 136 prevent congestion collapse. In fact, the use of the 503 (Service 137 Unavailable) response code may cause traffic to oscillate and to 138 shift between SIP servers and thereby worsen an overload condition. 139 A detailed discussion of the SIP overload problem, the problems with 140 the 503 (Service Unavailable) response code and the requirements for 141 a SIP overload control mechanism can be found in [RFC5390]. 143 This document defines the general behaviour of SIP servers and 144 clients involved in overload control in Section 5. In addition, 145 Section 6 specifies a loss-based overload control scheme. SIP 146 clients and servers conformant to this specification MUST implement 147 the loss-based overload control scheme. They MAY implement other 148 overload control schemes as well. 150 2. Terminology 152 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 153 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 154 document are to be interpreted as described in RFC 2119 [RFC2119]. 156 In this document, the terms "SIP client" and "SIP server" are used in 157 their generic forms. Thus, a "SIP client" could refer to the client 158 transaction state machine in a SIP proxy or it could refer to a user 159 agent client. Similarly, a "SIP server" could be a user agent server 160 or the server transaction state machine in a proxy. Various 161 permutations of this are also possible, for instance, SIP clients and 162 servers could also be part of back-to-back user agents (B2BUAs). 164 However, irrespective of the context (i.e., proxy, B2BUA, UAS, UAC) 165 these terms are used in, "SIP client" applies to any SIP entity that 166 provides overload control to traffic destined downstream. Similarly, 167 "SIP server" applies to any SIP entity that is experiencing overload 168 and would like its upstream neighbour to throttle incoming traffic. 170 Unless otherwise specified, all SIP entities described in this 171 document are assumed to support this specification. 173 The normative statements in this specification as they apply to SIP 174 clients and SIP servers assume that both the SIP clients and SIP 175 servers support this specification. If, for instance, only a SIP 176 client supports this specification and not the SIP server, then 177 follows that the normative statements in this specification pertinent 178 to the behavior of a SIP server do not apply to the server that does 179 not support this specification. 181 3. Overview of operations 183 We now explain the overview of how the overload control mechanism 184 operates by introducing the overload control parameters. Section 4 185 provides more details and normative behavior on the parameters listed 186 below. 188 Because overload control is performed hop-by-hop, the Via parameter 189 is attractive since it allows two adjacent SIP entities to indicate 190 support for, and exchange information associated with overload 191 control [RFC6357]. Additional advantages of this choice are 192 discussed in Section 9.1.1. An alternative mechanism using SIP event 193 packages was also considered, and the characteristics of that choice 194 are further outlined in Section 9.1.2. 196 This document defines four new parameters for the SIP Via header for 197 overload control. These parameters provide a mechanism for conveying 198 overload control information between adjacent SIP entities. The "oc" 199 parameter is used by a SIP server to indicate a reduction in the 200 amount of requests arriving at the server. The "oc-algo" parameter 201 contains a token or a list of tokens corresponding to the class of 202 overload control algorithms supported by the client. The server 203 chooses one algorithm from this list. The "oc-validity" parameter 204 establishes a time limit for which overload control is in effect, and 205 the "oc-seq" parameter aids in sequencing the responses at the 206 client. These parameters are discussed in detail in the next 207 section. 209 4. Via header parameters for overload control 211 The four Via header parameters are introduced below. Further context 212 about how to interpret these under various conditions is provided in 213 Section 5. 215 4.1. The oc parameter 217 This parameter is inserted by the SIP client and updated by the SIP 218 server. 220 A SIP client MUST add an "oc" parameter to the topmost Via header it 221 inserts into every SIP request. This provides an indication to 222 downstream neighbors that the client supports overload control. 223 There MUST NOT be a value associated with the parameter (the value 224 will be added by the server). 226 The downstream server MUST add a value to the "oc" parameter in the 227 response going upstream to a client that included the "oc" parameter 228 in the request. Inclusion of a value to the parameter represents two 229 things: one, upon the first contact (see Section 5.1), addition of a 230 value by the server to this parameter indicates (to the client) that 231 the downstream server supports overload control as defined in this 232 document. Second, if overload control is active, then it indicates 233 the level of control to be applied. 235 When a SIP client receives a response with the value in the "oc" 236 parameter filled in, it SHOULD reduce, as indicated by the "oc" and 237 "oc-algo" parameters, the number of requests going downstream to the 238 SIP server from which it received the response (see Section 5.10 for 239 pertinent discussion on traffic reduction). 241 4.2. The oc-algo parameter 243 This parameter is inserted by the SIP client and updated by the SIP 244 server. 246 A SIP client MUST add an "oc-algo" parameter to the topmost Via 247 header it inserts into every SIP request, with a default value of 248 "loss". 250 This parameter contains names of one or more classes of overload 251 control algorithms. A SIP client MUST support the loss-based 252 overload control scheme and MUST insert at least the token "loss" as 253 one of the "oc-algo" parameter values. In addition, the SIP client 254 MAY insert other tokens, separated by a comma, in the "oc-algo" 255 parameter if it supports other overload control schemes such as a 256 rate-based scheme ([I-D.ietf-soc-overload-rate-control]). Each 257 element in the comma-separated list corresponds to the class of 258 overload control algorithms supported by the SIP client. When more 259 than one class of overload control algorithms is present in the "oc- 260 algo" parameter, the client may indicate algorithm preference by 261 ordering the list in a decreasing order of preference. However, the 262 client must not assume that the server will pick the most preferred 263 algorithm. 265 When a downstream SIP server receives a request with multiple 266 overload control algorithms specified in the "oc-algo" parameter 267 (optionally sorted by decreasing order of preference), it MUST choose 268 one algorithm from the list and return the single selected algorithm 269 in the response to the upstream SIP client. 271 Once the SIP server has chosen, and communicated to the client, a 272 mutually agreeable class of overload control algorithm, the selection 273 stays in effect until such time that the algorithm is changed by the 274 server. Furthermore, the client MUST continue to include all the 275 supported algorithms in subsequent requests; the server MUST respond 276 with the agreed to algorithm until such time that the algorithm is 277 changed by the server. The selection SHOULD stay the same for a non- 278 trivial duration of time to allow the overload control algorithm to 279 stabilize its behaviour (see Section 5.8). 281 4.3. The oc-validity parameter 283 This parameter MAY be inserted by the SIP server in a response; it 284 MUST NOT be inserted by the SIP client in a request. 286 This parameter contains a value that indicates an interval of time 287 (measured in milliseconds) that the load reduction specified in the 288 value of the "oc" parameter should be in effect. The default value 289 of the "oc-validity" parameter is 500 (millisecond). If the client 290 receives a response with the "oc" and "oc-algo" parameters suitably 291 filled in, but no "oc-validity" parameter, the SIP client should 292 behave as if it had received "oc-validity=500". 294 A value of 0 in the "oc-validity" parameter is reserved to denote the 295 event that the server wishes to stop overload control, or to indicate 296 that it supports overload control, but is not currently requesting 297 any reduction in traffic (see Section 5.7). 299 A non-zero value for the "oc-validity" parameter MUST only be present 300 in conjunction with an "oc" parameter. A SIP client MUST discard a 301 non-zero value of the "oc-validity" parameter if the client receives 302 it in a response without the corresponding "oc" parameter being 303 present as well. 305 After the value specified in the "oc-validity" parameter expires and 306 until the SIP client receives an updated set of overload control 307 parameters from the SIP server, the client MUST behave as if overload 308 control is not in effect between it and the downstream SIP server. 310 4.4. The oc-seq parameter 312 This parameter MUST be inserted by the SIP server in a response; it 313 MUST NOT be inserted by the SIP client in a request. 315 This parameter contains a value that indicates the sequence number 316 associated with the "oc" parameter. This sequence number is used to 317 differentiate two "oc" parameter values generated by an overload 318 control algorithm at two different instants in time. "oc" parameter 319 values generated by an overload control algorithm at time t and t+1 320 MUST have an increasing value in the "oc-seq" parameter. This allows 321 the upstream SIP client to properly collate out-of-order responses. 323 A timestamp can be used as a value of the "oc-seq" parameter. 325 If the value contained in "oc-seq" parameter overflows during the 326 period in which the load reduction is in effect, then the "oc-seq" 327 parameter MUST be reset to the current timestamp or an appropriate 328 base value. 330 5. General behaviour 332 When forwarding a SIP request, a SIP client uses the SIP procedures 333 of [RFC3263] to determine the next hop SIP server. The procedures of 334 [RFC3263] take as input a SIP URI, extract the domain portion of that 335 URI for use as a lookup key, and query the Domain Name Service (DNS) 336 to obtain an ordered set of one or more IP addresses with a port 337 number and transport corresponding to each IP address in this set 338 (the "Expected Output"). 340 After selecting a specific SIP server from the Expected Output, a SIP 341 client MUST determine whether overload controls are currently active 342 with that server. If overload controls are currently active (and oc- 343 validity period has not yet expired), the client applies the relevant 344 algorithm to determine whether or not to send the SIP request to the 345 server. If overload controls are not currently active with this 346 server (which will be the case if this is the initial contact with 347 the server, or the last response from this server had "oc- 348 validity=0", or the time period indicated by the "oc-validity" 349 parameter has expired), the SIP client sends the SIP message to the 350 server without invoking any overload control algorithm. 352 5.1. Determining support for overload control 354 If a client determines that this is the first contact with a server, 355 the client MUST insert the "oc" parameter without any value, and MUST 356 insert the "oc-algo" parameter with a list of algorithms it supports. 357 This list MUST include "loss" and MAY include other algorithm names 358 approved by IANA and described in corresponding documents. The 359 client transmits the request to the chosen server. 361 If a server receives a SIP request containing the "oc" and "oc-algo" 362 parameters, the server MUST determine if it has already selected the 363 overload control algorithm class with this client. If it has, the 364 server SHOULD use the previously selected algorithm class in its 365 response to the message. If the server determines that the message 366 is from a new client, or a client the server has not heard from in a 367 long time, the server MUST choose one algorithm from the list of 368 algorithms in the "oc-algo" parameter. It MUST put the chosen 369 algorithm as the sole parameter value in the "oc-algo" parameter of 370 the response it sends to the client. In addition, if the server is 371 currently not in an overload condition, it MUST set the value of the 372 "oc" parameter to be 0 and MAY insert an "oc-validity=0" parameter in 373 the response to further qualify the value in the "oc" parameter. If 374 the server is currently overloaded, it MUST follow the procedures of 375 Section 5.2. 377 A client that supports the rate-based overload control scheme 378 [I-D.ietf-soc-overload-rate-control] will consider "oc=0" as an 379 indication not to send any requests downstream at all. Thus, when 380 the server inserts "oc-validity=0" as well, it is indicating that 381 it does support overload control, but it is not under overload 382 mode right now (see Section 5.7). 384 5.2. Creating and updating the overload control parameters 386 A SIP server provides overload control feedback to its upstream 387 clients by providing a value for the "oc" parameter to the topmost 388 Via header field of a SIP response, that is, the Via header added by 389 the client before it sent the request to the server. 391 Since the topmost Via header of a response will be removed by an 392 upstream client after processing it, overload control feedback 393 contained in the "oc" parameter will not travel beyond the upstream 394 SIP client. A Via header parameter therefore provides hop-by-hop 395 semantics for overload control feedback (see [RFC6357]) even if the 396 next hop neighbor does not support this specification. 398 The "oc" parameter can be used in all response types, including 399 provisional, success and failure responses (please see Section 5.11 400 for special consideration on transporting overload control parameters 401 in a 100-Trying response). A SIP server MAY update the "oc" 402 parameter a response, asking the client to increase or decrease the 403 number of requests destined to the server, or to stop performing 404 overload control altogether. 406 A SIP server that has updated the "oc" parameter SHOULD also add a 407 "oc-validity" parameter. The "oc-validity" parameter defines the 408 time in milliseconds during which the the overload control feedback 409 specified in the "oc" parameter is valid. The default value of the 410 "oc-validity" parameter is 500 (millisecond). 412 When a SIP server retransmits a response, it SHOULD use the "oc" 413 parameter value and "oc-validity" parameter value consistent with the 414 overload state at the time the retransmitted response is sent. This 415 implies that the values in the "oc" and "oc-validity" parameters may 416 be different than the ones used in previous retransmissions of the 417 response. Due to the fact that responses sent over UDP may be 418 subject to delays in the network and arrive out of order, the "oc- 419 seq" parameter aids in detecting a stale "oc" parameter value. 421 Implementations that are capable of updating the "oc" and "oc- 422 validity" parameter values during retransmissions MUST insert the 423 "oc-seq" parameter. The value of this parameter MUST be a set of 424 numbers drawn from an increasing sequence. 426 Implementations that are not capable of updating the "oc" and "oc- 427 validity" parameter values during retransmissions --- or 428 implementations that do not want to do so because they will have to 429 regenerate the message to be retransmitted --- MUST still insert a 430 "oc-seq" parameter in the first response associated with a 431 transaction; however, they do not have to update the value in 432 subsequent retransmissions. 434 The "oc-validity" and "oc-seq" Via header parameters are only defined 435 in SIP responses and MUST NOT be used in SIP requests. These 436 parameters are only useful to the upstream neighbor of a SIP server 437 (i.e., the entity that is sending requests to the SIP server) since 438 the client is the entity that can offload traffic by redirecting or 439 rejecting new requests. If requests are forwarded in both directions 440 between two SIP servers (i.e., the roles of upstream/downstream 441 neighbors change), there are also responses flowing in both 442 directions. Thus, both SIP servers can exchange overload 443 information. 445 Since overload control protects a SIP server from overload, it is 446 RECOMMENDED that a SIP server uses the mechanisms described in this 447 specification. However, if a SIP server wanted to limit its overload 448 control capability for privacy reasons, it MAY decide to perform 449 overload control only for requests that are received on a secure 450 transport channel, such as TLS. This enables a SIP server to protect 451 overload control information and ensure that it is only visible to 452 trusted parties. 454 5.3. Determining the 'oc' Parameter Value 456 The value of the "oc" parameter is determined by the overloaded 457 server using any pertinent information at its disposal. The only 458 constraint imposed by this document is that the server control 459 algorithm MUST produce a value for the "oc" parameter that it expects 460 the receiving SIP clients to apply to all downstream SIP requests 461 (dialogue forming as well as in-dialogue) to this SIP server. Beyond 462 this stipulation, the process by which an overloaded server 463 determines the value of the "oc" parameter is considered out of scope 464 for this document. 466 Note that this stipulation is required so that both the client and 467 server have an common view of which messages the overload control 468 applies to. With this stipulation in place, the client can 469 prioritize messages as discussed in Section 5.10.1. 471 As an example, a value of "oc=10" when the loss-based algorithm is 472 used implies that 10% of the total number of SIP requests (dialog 473 forming as well as in-dialogue) are subject to reduction at the 474 client. Analogously, a value of "oc=10" when the rate-based 475 algorithm [I-D.ietf-soc-overload-rate-control] is used indicates that 476 the client should send SIP requests at a rate of 10 SIP requests or 477 fewer per second. 479 5.4. Processing the Overload Control Parameters 481 A SIP client SHOULD remove "oc", "oc-validity" and "oc-seq" 482 parameters from all Via headers of a response received, except for 483 the topmost Via header. This prevents overload control parameters 484 that were accidentally or maliciously inserted into Via headers by a 485 downstream SIP server from traveling upstream. 487 The scope of overload control applies to unique combinations of IP 488 and port values. A SIP client maintains the overload control values 489 received (along with the address and port number of the SIP servers 490 from which they were received) for the duration specified in the "oc- 491 validity" parameter or the default duration. Each time a SIP client 492 receives a response with overload control parameter from a downstream 493 SIP server, it compares the "oc-seq" value extracted from the Via 494 header with the "oc-seq" value stored for this server. If these 495 values match, the response does not update the overload control 496 parameters related to this server and the client continues to provide 497 overload control as previously negotiated. If the "oc-seq" value 498 extracted from the Via header is larger than the value stored value, 499 the client updates the stored values by copying the new values of 500 "oc", "oc-algo" and "oc-seq" parameters from the Via header to the 501 stored values. Upon such an update of the overload control 502 parameters, the client restarts the validity period of the new 503 overload control parameters. The overload control parameters now 504 remain in effect until the validity period expires or the parameters 505 are updated in a new response. Stored overload control parameters 506 MUST be reset to default values once the validity period has expired 507 (see Section 5.7 for the detailed steps on terminating overload 508 control). 510 5.5. Using the Overload Control Parameter Values 512 A SIP client MUST honor overload control values it receives from 513 downstream neighbors. The SIP client MUST NOT forward more requests 514 to a SIP server than allowed by the current "oc" and "oc-algo" 515 parameter values from that particular downstream server. 517 When forwarding a SIP request, a SIP client uses the SIP procedures 518 of [RFC3263] to determine the next hop SIP server. The procedures of 519 [RFC3263] take as input a SIP URI, extract the domain portion of that 520 URI for use as a lookup key, and query the Domain Name Service (DNS) 521 to obtain an ordered set of one or more IP addresses with a port 522 number and transport corresponding to each IP address in this set 523 (the "Expected Output"). 525 After selecting a specific SIP server from the Expected Output, the 526 SIP client MUST determine if it already has overload control 527 parameter values for the server chosen from the Expected Output. If 528 the SIP client has a non-expired "oc" parameter value for the server 529 chosen from the Expected Output, then this chosen server is operating 530 in overload control mode. Thus, the SIP client MUST determine if it 531 can or cannot forward the current request to the SIP server based on 532 the "oc" and "oc-algo" parameters and any relevant local policy. 534 The particular algorithm used to determine whether or not to forward 535 a particular SIP request is a matter of local policy, and may take 536 into account a variety of prioritization factors. However, this 537 local policy SHOULD transmit the same number of SIP requests as the 538 sample algorithm defined by the overload control scheme being used. 539 (See Section 6.3 for the default loss-based overload control 540 algorithm.) 542 5.6. Forwarding the overload control parameters 544 Overload control is defined in a hop-by-hop manner. Therefore, 545 forwarding the contents of the overload control parameters is 546 generally NOT RECOMMENDED and should only be performed if permitted 547 by the configuration of SIP servers. This means that a SIP proxy 548 SHOULD strip the overload control parameters inserted by the client 549 before proxying the request further downstream. 551 5.7. Terminating overload control 553 A SIP client removes overload control if one of the following events 554 occur: 556 1. The "oc-validity" period previously received by the client from 557 this server (or the default value of 500ms if the server did not 558 previously specify an "oc-validity" parameter) expires; 559 2. The client is explicitly told by the server to stop performing 560 overload control using the "oc-validity=0" parameter. 562 A SIP server can decide to terminate overload control by explicitly 563 signaling the client. To do so, the SIP server MUST set the value of 564 the "oc-validity" parameter to 0. The SIP server MUST increment the 565 value of "oc-seq", and SHOULD set the value of the "oc" parameter to 566 0. 568 Note that the loss-based overload control scheme (Section 6) can 569 effectively stop overload control by setting the value of the "oc" 570 parameter to 0. However, the rate-based scheme 571 ([I-D.ietf-soc-overload-rate-control]) needs an additional piece 572 of information in the form of "oc-validity=0". 574 When the client receives a response with a higher "oc-seq" number 575 than the one it most recently processed, it checks the "oc-validity" 576 parameter. If the value of the "oc-validity" parameter is 0, the 577 client MUST stop performing overload control of messages destined to 578 the server and the traffic should flow without any reduction. 579 Furthermore, when the value of the "oc-validity" parameter is 0, the 580 client SHOULD disregard the value in the "oc" parameter. 582 5.8. Stabilizing overload algorithm selection 584 Realities of deployments of SIP necessitate that the overload control 585 algorithm may be changed upon a system reboot or a software upgrade. 586 However, frequent changes of the overload control algorithm MUST be 587 avoided. Frequent changes of the overload control algorithm will not 588 benefit the client or the server as such flapping does not allow the 589 chosen algorithm to stabilize. An algorithm change, when desired, is 590 simply accomplished by the SIP server choosing a new algorithm from 591 the list in the client's "oc-algo" parameter and sending it back to 592 the client in a response. 594 The client associates a specific algorithm with each server it sends 595 traffic to and when the server changes the algorithm, the client must 596 change its behaviour accordingly. 598 Once the client and server agree on an overload control algorithm, it 599 MUST remain in effect for at least 3600 seconds (1 hour) before 600 another change occurs. This period may involve one or more cycles of 601 overload control being in effect and then being stopped depending on 602 the traffic and resources at the server. 604 One way to accomplish this involves the server saving the time of 605 the last algorithm change in a lookup table, indexed by the 606 client's network identifiers. An algorithm change is only done 607 when the time of the last negotiation has surpassed 3600 seconds. 608 Similarly, the client should save the time of the last algorithm 609 change with a server and only agree to change it again after a 610 time period of at least 3600 seconds. 612 5.9. Self-Limiting 614 In some cases, a SIP client may not receive a response from a server 615 after sending a request. RFC3261 [RFC3261] defines that when a 616 timeout error is received from the transaction layer, it MUST be 617 treated as if a 408 (Request Timeout) status code has been received. 618 If a fatal transport error is reported by the transport layer, it 619 MUST be treated as a 503 (Service Unavailable) status code. 621 In the event of repeated timeouts or fatal transport errors, the SIP 622 client MUST stop sending requests to this server. The SIP client 623 SHOULD periodically probe if the downstream server is alive using any 624 mechanism at its disposal. Once a SIP client has successfully 625 received a normal response for a request sent to the downstream 626 server, the SIP client can resume sending SIP requests. It should, 627 of course, honor any overload control parameters it may receive in 628 the initial, or later, responses. 630 5.10. Responding to an Overload Indication 632 A SIP client can receive overload control feedback indicating that it 633 needs to reduce the traffic it sends to its downstream server. The 634 client can accomplish this task by sending some of the requests that 635 would have gone to the overloaded element to a different destination. 636 It needs to ensure, however, that this destination is not in overload 637 and capable of processing the extra load. A client can also buffer 638 requests in the hope that the overload condition will resolve quickly 639 and the requests still can be forwarded in time. In many cases, 640 however, it will need to reject these requests. 642 5.10.1. Message prioritization at the hop before the overloaded server 644 During an overload condition, a SIP client needs to prioritize 645 requests and select those requests that need to be rejected or 646 redirected. This selection is largely a matter of local policy. It 647 is expected that a SIP client will follow local policy as long as the 648 result in reduction of traffic is consistent with the overload 649 algorithm in effect at that node. Accordingly, the normative 650 behaviour in the next three paragraphs should be interpreted with the 651 understanding that the SIP client will aim to preserve local policy 652 to the fullest extent possible. 654 A SIP client SHOULD honor the local policy for prioritizing SIP 655 requests such as policies based on message type, e.g., INVITEs versus 656 requests associated with existing sessions. 658 A SIP client SHOULD honor the local policy for prioritizing SIP 659 requests based on the content of the Resource-Priority header (RPH, 660 RFC4412 [RFC4412]). Specific (namespace.value) RPH contents may 661 indicate high priority requests that should be preserved as much as 662 possible during overload. The RPH contents can also indicate a low- 663 priority request that is eligible to be dropped during times of 664 overload. 666 A SIP client SHOULD honor the local policy for prioritizing SIP 667 requests relating to emergency calls as identified by the SOS URN 668 [RFC5031] indicating an emergency request. 670 A local policy can be expected to combine both the SIP request type 671 and the prioritization markings, and SHOULD be honored when overload 672 conditions prevail. 674 5.10.2. Rejecting requests at an overloaded server 676 If the upstream SIP client to the overloaded server does not support 677 overload control, it will continue to direct requests to the 678 overloaded server. Thus, for the non-participating client, the 679 overloaded server must bear the cost of rejecting some requests from 680 the client as well as the cost of processing the non-rejected 681 requests to completion. It would be fair to devote the same amount 682 of processing at the overloaded server to the combination of 683 rejection and processing from a non-participating client as the 684 overloaded server would devote to processing requests from a 685 participating client. This is to ensure that SIP clients that do not 686 support this specification don't receive an unfair advantage over 687 those that do. 689 A SIP server that is under overload and has started to throttle 690 incoming traffic MUST reject some requests from non-participating 691 clients with a "503 (Service Unavailable)" response without the 692 Retry-After header. 694 5.11. 100-Trying provisional response and overload control parameters 696 The overload control information sent from a SIP server to a client 697 is transported in the responses. While implementations can insert 698 overload control information in any response, special attention 699 should be accorded to overload control information transported in a 700 100-Trying response. 702 Traditionally, the 100-Trying response has been used in SIP to quench 703 retransmissions. In some implementations, the 100-Trying message may 704 not be generated by the transaction user (TU) nor consumed by the TU. 705 In these implementations, the 100-Trying response is generated at the 706 transaction layer and sent to the upstream SIP client. At the 707 receiving SIP client, the 100-Trying is consumed at the transaction 708 layer by inhibiting the retransmission of the corresponding request. 709 Consequently, implementations that insert overload control 710 information in the 100-Trying cannot assume that the upstream SIP 711 client passed the overload control information in the 100-Trying to 712 their corresponding TU. For this reason, implementations that insert 713 overload control information in the 100-Trying MUST re-insert the 714 same (or updated) overload control information in the first non-100 715 response being sent to the upstream SIP client. 717 6. The loss-based overload control scheme 719 Under a loss-based approach, a SIP server asks an upstream neighbor 720 to reduce the number of requests it would normally forward to this 721 server by a certain percentage. For example, a SIP server can ask an 722 upstream neighbor to reduce the number of requests this neighbor 723 would normally send by 10%. The upstream neighbor then redirects or 724 rejects 10% of the traffic originally destined for that server. 726 This section specifies the semantics of the overload control 727 parameters associated with the loss-based overload control scheme. 728 The general behaviour of SIP clients and servers is specified in 729 Section 5 and is applicable to SIP clients and servers that implement 730 loss-based overload control. 732 6.1. Special parameter values for loss-based overload control 734 The loss-based overload control scheme is identified using the token 735 "loss". This token MUST appear in the "oc-algo" parameter list sent 736 by the SIP client. 738 A SIP server that has selected the loss-based algorithm, upon 739 entering the overload state, will assign a value to the "oc" 740 parameter. This value MUST be in the range of [0, 100], inclusive. 741 This value MUST be interpreted by the client as a percentage, and the 742 SIP client MUST reduce the number of requests being forwarded to the 743 overloaded server by that percent. The SIP client may use any 744 algorithm that reduces the traffic it sends to the overloaded server 745 by the amount indicated. Such an algorithm SHOULD honor the message 746 prioritization discussion of Section 5.10.1. While a particular 747 algorithm is not subject to standardization, for completeness a 748 default algorithm for loss-based overload control is provided in 749 Section 6.3. 751 When a SIP server using the loss-based algorithm receives a request 752 from a client with an "oc" parameter but the SIP server is not 753 experiencing overload, it MUST assign a value of 0 to the "oc" 754 parameter in the response. Assigning such a value lets the client 755 know that the server supports overload control but is not currently 756 requesting any reduction in traffic. 758 When the "oc-validity" parameter is used to signify overload control 759 termination (Section 5.7), the server MUST insert a value of 0 in the 760 "oc-validity" parameter. The server MUST insert a value of 0 in the 761 "oc" parameter as well. When a client receives a response whose "oc- 762 validity" parameter contains a 0, it MUST treat any non-zero value in 763 the "oc" parameter as if it had received a value of 0 in that 764 parameter. 766 6.2. Example 768 Consider a SIP client, P1, which is sending requests to another 769 downstream SIP server, P2. The following snippets of SIP messages 770 demonstrate how the overload control parameters work. 772 INVITE sips:user@example.com SIP/2.0 773 Via: SIP/2.0/TLS p1.example.net; 774 branch=z9hG4bK2d4790.1;oc;oc-algo="loss,A" 775 ... 777 SIP/2.0 100 Trying 778 Via: SIP/2.0/TLS p1.example.net; 779 branch=z9hG4bK2d4790.1;received=192.0.2.111; 780 oc=0;oc-algo="loss";oc-validity=0 781 ... 783 In the messages above, the first line is sent by P1 to P2. This line 784 is a SIP request; because P1 supports overload control, it inserts 785 the "oc" parameter in the topmost Via header that it created. P1 786 supports two overload control algorithms: loss and some algorithm 787 called "A". 789 The second line --- a SIP response --- shows the topmost Via header 790 amended by P2 according to this specification and sent to P1. 791 Because P2 also supports overload control, and because it chooses the 792 "loss" based scheme, it sends "loss" back to P1 in the "oc-algo" 793 parameter. It also sets the value of "oc" and "oc-validity" 794 parameters to 0 because it is not currently requesting overload 795 control activation. 797 Had P2 not supported overload control, it would have left the "oc" 798 and "oc-algo" parameters unchanged, thus allowing the client to know 799 that it did not support overload control. 801 At some later time, P2 starts to experience overload. It sends the 802 following SIP message indicating that P1 should decrease the messages 803 arriving to P2 by 20% for 1s. 805 SIP/2.0 180 Ringing 806 Via: SIP/2.0/TLS p1.example.net; 807 branch=z9hG4bK2d4790.3;received=192.0.2.111; 808 oc=20;oc-algo="loss";oc-validity=500; 809 oc-seq=1282321615.782 810 ... 812 After some time, the overload condition at P2 subsides. It then 813 changes the parameter values in the response it sends to P1 to allow 814 P1 to send all messages destined to P2. 816 SIP/2.0 183 Queued 817 Via: SIP/2.0/TLS p1.example.net; 818 branch=z9hG4bK2d4790.4;received=192.0.2.111; 819 oc=0;oc-algo="loss";oc-validity=0;oc-seq=1282321892.439 820 ... 822 6.3. Default algorithm for loss-based overload control 824 This section describes a default algorithm that a SIP client can use 825 to throttle SIP traffic going downstream by the percentage loss value 826 specified in the "oc" parameter. 828 The client maintains two categories of requests; the first category 829 will include requests that are candidates for reduction, and the 830 second category will include requests that are not subject to 831 reduction except when all messages in the first category have been 832 rejected, and further reduction is still needed. Section 833 Section 5.10.1 contains directives on identifying messages for 834 inclusion in the second category. The remaining messages are 835 allocated to the first category. 837 Under overload condition, the client converts the value of the "oc" 838 parameter to a value that it applies to requests in the first 839 category. As a simple example, if "oc=10" and 40% of the requests 840 should be included in the first category, then: 842 10 / 40 * 100 = 25 844 Or, 25% of the requests in the first category can be reduced to get 845 an overall reduction of 10%. The client uses random discard to 846 achieve the 25% reduction of messages in the first category. 847 Messages in the second category proceed downstream unscathed. To 848 affect the 25% reduction rate from the first category, the client 849 draws a random number between 1 and 100 for the request picked from 850 the first category. If the random number is less than or equal to 851 converted value of the "oc" parameter, the request is not forwarded; 852 otherwise the request is forwarded. 854 A reference algorithm is shown below. 856 cat1 := 80.0 // Category 1 --- subject to reduction 857 cat2 := 100.0 - cat1 // Category 2 --- Under normal operations 858 // only subject to reduction after category 1 is exhausted. 859 // Note that the above ratio is simply a reasonable default. 860 // The actual values will change through periodic sampling 861 // as the traffic mix changes over time. 863 while (true) { 864 // We're modeling message processing as a single work queue 865 // that contains both incoming and outgoing messages. 866 sip_msg := get_next_message_from_work_queue() 868 update_mix(cat1, cat2) // See Note below 870 switch (sip_msg.type) { 872 case outbound request: 873 destination := get_next_hop(sip_msg) 874 oc_context := get_oc_context(destination) 876 if (oc_context == null) { 877 send_to_network(sip_msg) // Process it normally by sending the 878 // request to the next hop since this particular destination 879 // is not subject to overload 880 } 881 else { 882 // Determine if server wants to enter in overload or is in 883 // overload 884 in_oc := extract_in_oc(oc_context) 886 oc_value := extract_oc(oc_context) 887 oc_validity := extract_oc_validity(oc_context) 889 if (in_oc == false or oc_validity is not in effect) { 890 send_to_network(sip_msg) // Process it normally by sending 891 // the request to the next hop since this particular 892 // destination is not subject to overload. Optionally, 893 // clear the oc context for this server (not shown). 894 } 895 else { // Begin perform overload control 896 r := random() 897 drop_msg := false 899 category := assign_msg_to_category(sip_msg) 901 pct_to_reduce_cat1 = oc_value / cat1 * 100 903 if (oc_value <= cat1) { // Reduce all msgs from category 1 904 if (r <= pct_to_reduce_cat1 && category == cat1) { 905 drop_msg := true 906 } 907 } 908 else { // oc_value > category 1. Reduce 100% of msgs from 909 // category 1 and remaining from category 2. 910 pct_to_reduce_cat2 = (oc_value - cat1) / cat2 * 100 911 if (category == cat1) { 912 drop_msg := true 913 } 914 else { 915 if (r <= pct_to_reduce_cat2) { 916 drop_msg := true; 917 } 918 } 919 } 921 if (drop_msg == false) { 922 send_to_network(sip_msg) // Process it normally by 923 // sending the request to the next hop 924 } 925 else { 926 // Do not send request downstream, handle locally by 927 // generating response (if a proxy) or treating as 928 // an error (if a user agent). 929 } 931 } // End perform overload control 932 } 934 end case // outbound request 936 case outbound response: 937 if (we are in overload) { 938 add_overload_parameters(sip_msg) 939 } 940 send_to_network(sip_msg) 942 end case // outbound response 944 case inbound response: 946 if (sip_msg has oc parameter values) { 947 create_or_update_oc_context() // For the specific server 948 // that sent the response, create or update the oc context; 949 // i.e., extract the values of the oc-related parameters 950 // and store them for later use. 951 } 952 process_msg(sip_msg) 954 end case // inbound response 955 case inbound request: 957 if (we are not in overload) { 958 process_msg(sip_msg) 960 } 961 else { // We are in overload 962 if (sip_msg has oc parameters) { // Upstream client supports 963 process_msg(sip_msg) // oc; only sends important requests 964 } 965 else { // Upstream client does not support oc 966 if (local_policy(sip_msg) says process message) { 967 process_msg(sip_msg) 968 } 969 else { 970 send_response(sip_msg, 503) 971 } 972 } 973 } 974 end case // inbound request 975 } 976 } 978 Note: A simple way to sample the traffic mix for category 1 and 979 category 2 is to associate a counter with each category of message. 980 Periodically (every 5-10s) get the value of the counters and calculate 981 the ratio of category 1 messages to category 2 messages since the 982 last calculation. 984 Example: In the last 5 seconds, a total of 500 requests arrived 985 at the queue. 450 out of the 500 were messages subject 986 to reduction and 50 out of 500 were classified as requests not 987 subject to reduction. Based on this ratio, cat1 := 90 and 988 cat2 := 10, so a 90/10 mix will be used in overload calculations. 990 7. Relationship with other IETF SIP load control efforts 992 The overload control mechanism described in this document is reactive 993 in nature and apart from message prioritization directives listed in 994 Section 5.10.1 the mechanisms described in this draft will not 995 discriminate requests based on user identity, filtering action and 996 arrival time. SIP networks that require pro-active overload control 997 mechanisms can upload user-level load control filters as described in 998 [I-D.ietf-soc-load-control-event-package]. Local policy will also 999 dictate the precedence of different overload control mechanisms 1000 applied to the traffic. Specifically, in a scenario where load 1001 control filters are installed by signaling neighbours [I-D.ietf-soc- 1002 load-control-event-package] and the same traffic can also be 1003 throttled using the overload control mechanism, local policy will 1004 dictate which of these schemes shall be given precedence. 1005 Interactions between the two schemes are out of scope for this 1006 document. 1008 8. Syntax 1010 This specification extends the existing definition of the Via header 1011 field parameters of [RFC3261] as follows: 1013 via-params = via-ttl / via-maddr 1014 / via-received / via-branch 1015 / oc / oc-validity 1016 / oc-seq / oc-algo / via-extension 1018 oc = "oc" [EQUAL oc-num] 1019 oc-num = 1*DIGIT 1020 oc-validity = "oc-validity" [EQUAL delta-ms] 1021 oc-seq = "oc-seq" EQUAL 1*12DIGIT "." 1*5DIGIT 1022 oc-algo = "oc-algo" EQUAL DQUOTE algo-list *(COMMA algo-list) 1023 DQUOTE 1024 algo-list = "loss" / *(other-algo) 1025 other-algo = %x41-5A / %x61-7A / %x30-39 1026 delta-ms = 1*DIGIT 1028 9. Design Considerations 1030 This section discusses specific design considerations for the 1031 mechanism described in this document. General design considerations 1032 for SIP overload control can be found in [RFC6357]. 1034 9.1. SIP Mechanism 1036 A SIP mechanism is needed to convey overload feedback from the 1037 receiving to the sending SIP entity. A number of different 1038 alternatives exist to implement such a mechanism. 1040 9.1.1. SIP Response Header 1042 Overload control information can be transmitted using a new Via 1043 header field parameter for overload control. A SIP server can add 1044 this header parameter to the responses it is sending upstream to 1045 provide overload control feedback to its upstream neighbors. This 1046 approach has the following characteristics: 1048 o A Via header parameter is light-weight and creates very little 1049 overhead. It does not require the transmission of additional 1050 messages for overload control and does not increase traffic or 1051 processing burdens in an overload situation. 1053 o Overload control status can frequently be reported to upstream 1054 neighbors since it is a part of a SIP response. This enables the 1055 use of this mechanism in scenarios where the overload status needs 1056 to be adjusted frequently. It also enables the use of overload 1057 control mechanisms that use regular feedback such as window-based 1058 overload control. 1059 o With a Via header parameter, overload control status is inherent 1060 in SIP signaling and is automatically conveyed to all relevant 1061 upstream neighbors, i.e., neighbors that are currently 1062 contributing traffic. There is no need for a SIP server to 1063 specifically track and manage the set of current upstream or 1064 downstream neighbors with which it should exchange overload 1065 feedback. 1066 o Overload status is not conveyed to inactive senders. This avoids 1067 the transmission of overload feedback to inactive senders, which 1068 do not contribute traffic. If an inactive sender starts to 1069 transmit while the receiver is in overload it will receive 1070 overload feedback in the first response and can adjust the amount 1071 of traffic forwarded accordingly. 1072 o A SIP server can limit the distribution of overload control 1073 information by only inserting it into responses to known upstream 1074 neighbors. A SIP server can use transport level authentication 1075 (e.g., via TLS) with its upstream neighbors. 1077 9.1.2. SIP Event Package 1079 Overload control information can also be conveyed from a receiver to 1080 a sender using a new event package. Such an event package enables a 1081 sending entity to subscribe to the overload status of its downstream 1082 neighbors and receive notifications of overload control status 1083 changes in NOTIFY requests. This approach has the following 1084 characteristics: 1086 o Overload control information is conveyed decoupled from SIP 1087 signaling. It enables an overload control manager, which is a 1088 separate entity, to monitor the load on other servers and provide 1089 overload control feedback to all SIP servers that have set up 1090 subscriptions with the controller. 1091 o With an event package, a receiver can send updates to senders that 1092 are currently inactive. Inactive senders will receive a 1093 notification about the overload and can refrain from sending 1094 traffic to this neighbor until the overload condition is resolved. 1095 The receiver can also notify all potential senders once they are 1096 permitted to send traffic again. However, these notifications do 1097 generate additional traffic, which adds to the overall load. 1098 o A SIP entity needs to set up and maintain overload control 1099 subscriptions with all upstream and downstream neighbors. A new 1100 subscription needs to be set up before/while a request is 1101 transmitted to a new downstream neighbor. Servers can be 1102 configured to subscribe at boot time. However, this would require 1103 additional protection to avoid the avalanche restart problem for 1104 overload control. Subscriptions need to be terminated when they 1105 are not needed any more, which can be done, for example, using a 1106 timeout mechanism. 1107 o A receiver needs to send NOTIFY messages to all subscribed 1108 upstream neighbors in a timely manner when the control algorithm 1109 requires a change in the control variable (e.g., when a SIP server 1110 is in an overload condition). This includes active as well as 1111 inactive neighbors. These NOTIFYs add to the amount of traffic 1112 that needs to be processed. To ensure that these requests will 1113 not be dropped due to overload, a priority mechanism needs to be 1114 implemented in all servers these request will pass through. 1115 o As overload feedback is sent to all senders in separate messages, 1116 this mechanism is not suitable when frequent overload control 1117 feedback is needed. 1118 o A SIP server can limit the set of senders that can receive 1119 overload control information by authenticating subscriptions to 1120 this event package. 1121 o This approach requires each proxy to implement user agent 1122 functionality (UAS and UAC) to manage the subscriptions. 1124 9.2. Backwards Compatibility 1126 An new overload control mechanism needs to be backwards compatible so 1127 that it can be gradually introduced into a network and functions 1128 properly if only a fraction of the servers support it. 1130 Hop-by-hop overload control (see [RFC6357]) has the advantage that it 1131 does not require that all SIP entities in a network support it. It 1132 can be used effectively between two adjacent SIP servers if both 1133 servers support overload control and does not depend on the support 1134 from any other server or user agent. The more SIP servers in a 1135 network support hop-by-hop overload control, the better protected the 1136 network is against occurrences of overload. 1138 A SIP server may have multiple upstream neighbors from which only 1139 some may support overload control. If a server would simply use this 1140 overload control mechanism, only those that support it would reduce 1141 traffic. Others would keep sending at the full rate and benefit from 1142 the throttling by the servers that support overload control. In 1143 other words, upstream neighbors that do not support overload control 1144 would be better off than those that do. 1146 A SIP server should therefore follow the behaviour outlined in 1147 Section 5.10.2 to handle clients that do not support overload 1148 control. 1150 10. Security Considerations 1152 Overload control mechanisms can be used by an attacker to conduct a 1153 denial-of-service attack on a SIP entity if the attacker can pretend 1154 that the SIP entity is overloaded. When such a forged overload 1155 indication is received by an upstream SIP client, it will stop 1156 sending traffic to the victim. Thus, the victim is subject to a 1157 denial-of-service attack. 1159 An attacker can create forged overload feedback by inserting itself 1160 into the communication between the victim and its upstream neighbors. 1161 The attacker would need to add overload feedback indicating a high 1162 load to the responses passed from the victim to its upstream 1163 neighbor. Proxies can prevent this attack by communicating via TLS. 1164 Since overload feedback has no meaning beyond the next hop, there is 1165 no need to secure the communication over multiple hops. 1167 Another way to conduct an attack is to send a message containing a 1168 high overload feedback value through a proxy that does not support 1169 this extension. If this feedback is added to the second Via headers 1170 (or all Via headers), it will reach the next upstream proxy. If the 1171 attacker can make the recipient believe that the overload status was 1172 created by its direct downstream neighbor (and not by the attacker 1173 further downstream) the recipient stops sending traffic to the 1174 victim. A precondition for this attack is that the victim proxy does 1175 not support this extension since it would not pass through overload 1176 control feedback otherwise. 1178 A malicious SIP entity could gain an advantage by pretending to 1179 support this specification but never reducing the amount of traffic 1180 it forwards to the downstream neighbor. If its downstream neighbor 1181 receives traffic from multiple sources which correctly implement 1182 overload control, the malicious SIP entity would benefit since all 1183 other sources to its downstream neighbor would reduce load. 1185 The solution to this problem depends on the overload control 1186 method. For rate-based and window-based overload control, it is 1187 very easy for a downstream entity to monitor if the upstream 1188 neighbor throttles traffic forwarded as directed. For percentage 1189 throttling this is not always obvious since the load forwarded 1190 depends on the load received by the upstream neighbor. 1192 11. IANA Considerations 1194 This specification defines four new Via header parameters as detailed 1195 below in the "Header Field Parameter and Parameter Values" sub- 1196 registry as per the registry created by [RFC3968]. The required 1197 information is: 1199 Header Field Parameter Name Predefined Values Reference 1200 __________________________________________________________ 1201 Via oc Yes RFCXXXX 1202 Via oc-validity Yes RFCXXXX 1203 Via oc-seq Yes RFCXXXX 1204 Via oc-algo Yes RFCXXXX 1206 RFC XXXX [NOTE TO RFC-EDITOR: Please replace with final RFC 1207 number of this specification.] 1209 12. References 1211 12.1. Normative References 1213 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1214 Requirement Levels", BCP 14, RFC 2119, March 1997. 1216 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1217 A., Peterson, J., Sparks, R., Handley, M., and E. 1218 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1219 June 2002. 1221 [RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation 1222 Protocol (SIP): Locating SIP Servers", RFC 3263, 1223 June 2002. 1225 [RFC3968] Camarillo, G., "The Internet Assigned Number Authority 1226 (IANA) Header Field Parameter Registry for the Session 1227 Initiation Protocol (SIP)", BCP 98, RFC 3968, 1228 December 2004. 1230 [RFC4412] Schulzrinne, H. and J. Polk, "Communications Resource 1231 Priority for the Session Initiation Protocol (SIP)", 1232 RFC 4412, February 2006. 1234 12.2. Informative References 1236 [I-D.ietf-soc-load-control-event-package] 1237 Shen, C., Schulzrinne, H., and A. Koike, "A Session 1238 Initiation Protocol (SIP) Load Control Event Package", 1239 draft-ietf-soc-load-control-event-package-06 (work in 1240 progress), December 2012. 1242 [I-D.ietf-soc-overload-rate-control] 1243 Noel, E. and P. Williams, "Session Initiation Protocol 1244 (SIP) Rate Control", 1245 draft-ietf-soc-overload-rate-control-03 (work in 1246 progress), October 2012. 1248 [RFC5031] Schulzrinne, H., "A Uniform Resource Name (URN) for 1249 Emergency and Other Well-Known Services", RFC 5031, 1250 January 2008. 1252 [RFC5390] Rosenberg, J., "Requirements for Management of Overload in 1253 the Session Initiation Protocol", RFC 5390, December 2008. 1255 [RFC6357] Hilt, V., Noel, E., Shen, C., and A. Abdelal, "Design 1256 Considerations for Session Initiation Protocol (SIP) 1257 Overload Control", RFC 6357, August 2011. 1259 Appendix A. Acknowledgements 1261 The authors acknowledge the contributions of Bruno Chatras, Keith 1262 Drage, Janet Gunn, Rich Terpstra, Daryl Malas, R. Parthasarathi, 1263 Antoine Roly, Jonathan Rosenberg, Charles Shen, Rahul Srivastava, 1264 Padma Valluri, Shaun Bharrat, Paul Kyzivat and Jeroen Van Bemmel to 1265 this document. 1267 Adam Roach and Eric McMurry helped flesh out the different cases for 1268 handling SIP messages described in the algorithm of Section 6.3. 1269 Janet Gunn reviewed the algorithm and suggested changes that lead to 1270 simpler processing for the case where "oc_value > cat1". 1272 Appendix B. RFC5390 requirements 1274 Table 1 provides a summary how this specification fulfills the 1275 requirements of [RFC5390]. A more detailed view on how each 1276 requirements is fulfilled is provided after the table. 1278 +-------------+-------------------+ 1279 | Requirement | Meets requirement | 1280 +-------------+-------------------+ 1281 | REQ 1 | Yes | 1282 | REQ 2 | Yes | 1283 | REQ 3 | Partially | 1284 | REQ 4 | Partially | 1285 | REQ 5 | Partially | 1286 | REQ 6 | Not applicable | 1287 | REQ 7 | Yes | 1288 | REQ 8 | Partially | 1289 | REQ 9 | Yes | 1290 | REQ 10 | Yes | 1291 | REQ 11 | Yes | 1292 | REQ 12 | Yes | 1293 | REQ 13 | Yes | 1294 | REQ 14 | Yes | 1295 | REQ 15 | Yes | 1296 | REQ 16 | Yes | 1297 | REQ 17 | Partially | 1298 | REQ 18 | Yes | 1299 | REQ 19 | Yes | 1300 | REQ 20 | Yes | 1301 | REQ 21 | Yes | 1302 | REQ 22 | Yes | 1303 | REQ 23 | Yes | 1304 +-------------+-------------------+ 1306 Summary of meeting requirements in RFC5390 1308 Table 1 1310 REQ 1: The overload mechanism shall strive to maintain the overall 1311 useful throughput (taking into consideration the quality-of-service 1312 needs of the using applications) of a SIP server at reasonable 1313 levels, even when the incoming load on the network is far in excess 1314 of its capacity. The overall throughput under load is the ultimate 1315 measure of the value of an overload control mechanism. 1317 Meeting REQ 1: Yes, the overload control mechanism allows an 1318 overloaded SIP server to maintain a reasonable level of throughput as 1319 it enters into congestion mode by requesting the upstream clients to 1320 reduce traffic destined downstream. 1322 REQ 2: When a single network element fails, goes into overload, or 1323 suffers from reduced processing capacity, the mechanism should strive 1324 to limit the impact of this on other elements in the network. This 1325 helps to prevent a small-scale failure from becoming a widespread 1326 outage. 1328 Meeting REQ 2: Yes. When a SIP server enters overload mode, it will 1329 request the upstream clients to throttle the traffic destined to it. 1330 As a consequence of this, the overloaded SIP server will itself 1331 generate proportionally less downstream traffic, thereby limiting the 1332 impact on other elements in the network. 1334 REQ 3: The mechanism should seek to minimize the amount of 1335 configuration required in order to work. For example, it is better 1336 to avoid needing to configure a server with its SIP message 1337 throughput, as these kinds of quantities are hard to determine. 1339 Meeting REQ 3: Partially. On the server side, the overload condition 1340 is determined monitoring S (c.f., Section 4 of [RFC6357]) and 1341 reporting a load feedback F as a value to the "oc" parameter. On the 1342 client side, a throttle T is applied to requests going downstream 1343 based on F. This specification does not prescribe any value for S, 1344 nor a particular value for F. The "oc-algo" parameter allows for 1345 automatic convergence to a particular class of overload control 1346 algorithm. There are suggested default values for the "oc-validity" 1347 parameter. 1349 REQ 4: The mechanism must be capable of dealing with elements that do 1350 not support it, so that a network can consist of a mix of elements 1351 that do and don't support it. In other words, the mechanism should 1352 not work only in environments where all elements support it. It is 1353 reasonable to assume that it works better in such environments, of 1354 course. Ideally, there should be incremental improvements in overall 1355 network throughput as increasing numbers of elements in the network 1356 support the mechanism. 1358 Meeting REQ 4: Partially. The mechanism is designed to reduce 1359 congestion when a pair of communicating entities support it. If a 1360 downstream overloaded SIP server does not respond to a request in 1361 time, a SIP client will attempt to reduce traffic destined towards 1362 the non-responsive server as outlined in Section 5.9. 1364 REQ 5: The mechanism should not assume that it will only be deployed 1365 in environments with completely trusted elements. It should seek to 1366 operate as effectively as possible in environments where other 1367 elements are malicious; this includes preventing malicious elements 1368 from obtaining more than a fair share of service. 1370 Meeting REQ 5: Partially. Since overload control information is 1371 shared between a pair of communicating entities, a confidential and 1372 authenticated channel can be used for this communication. However, 1373 if such a channel is not available, then the security ramifications 1374 outlined in Section 10 apply. 1376 REQ 6: When overload is signaled by means of a specific message, the 1377 message must clearly indicate that it is being sent because of 1378 overload, as opposed to other, non overload-based failure conditions. 1379 This requirement is meant to avoid some of the problems that have 1380 arisen from the reuse of the 503 response code for multiple purposes. 1381 Of course, overload is also signaled by lack of response to requests. 1382 This requirement applies only to explicit overload signals. 1384 Meeting REQ 6: Not applicable. Overload control information is 1385 signaled as part of the Via header and not in a new header. 1387 REQ 7: The mechanism shall provide a way for an element to throttle 1388 the amount of traffic it receives from an upstream element. This 1389 throttling shall be graded so that it is not all- or-nothing as with 1390 the current 503 mechanism. This recognizes the fact that "overload" 1391 is not a binary state and that there are degrees of overload. 1393 Meeting REQ 7: Yes, please see Section 5.5 and Section 5.10. 1395 REQ 8: The mechanism shall ensure that, when a request was not 1396 processed successfully due to overload (or failure) of a downstream 1397 element, the request will not be retried on another element that is 1398 also overloaded or whose status is unknown. This requirement derives 1399 from REQ 1. 1401 Meeting REQ 8: Partially. A SIP client that has overload information 1402 from multiple downstream servers will not retry the request on 1403 another element. However, if a SIP client does not know the overload 1404 status of a downstream server, it may send the request to that 1405 server. 1407 REQ 9: That a request has been rejected from an overloaded element 1408 shall not unduly restrict the ability of that request to be submitted 1409 to and processed by an element that is not overloaded. This 1410 requirement derives from REQ 1. 1412 Meeting REQ 9: Yes, a SIP client conformant to this specification 1413 will send the request to a different element. 1415 REQ 10: The mechanism should support servers that receive requests 1416 from a large number of different upstream elements, where the set of 1417 upstream elements is not enumerable. 1419 Meeting REQ 10: Yes, there are no constraints on the number of 1420 upstream clients. 1422 REQ 11: The mechanism should support servers that receive requests 1423 from a finite set of upstream elements, where the set of upstream 1424 elements is enumerable. 1426 Meeting REQ 11: Yes, there are no constraints on the number of 1427 upstream clients. 1429 REQ 12: The mechanism should work between servers in different 1430 domains. 1432 Meeting REQ 12: Yes, there are no inherent limitations on using 1433 overload control between domains. 1435 REQ 13: The mechanism must not dictate a specific algorithm for 1436 prioritizing the processing of work within a proxy during times of 1437 overload. It must permit a proxy to prioritize requests based on any 1438 local policy, so that certain ones (such as a call for emergency 1439 services or a call with a specific value of the Resource-Priority 1440 header field [RFC4412]) are given preferential treatment, such as not 1441 being dropped, being given additional retransmission, or being 1442 processed ahead of others. 1444 Meeting REQ 13: Yes, please see Section 5.10. 1446 REQ 14: REQ 14: The mechanism should provide unambiguous directions 1447 to clients on when they should retry a request and when they should 1448 not. This especially applies to TCP connection establishment and SIP 1449 registrations, in order to mitigate against avalanche restart. 1451 Meeting REQ 14: Yes, Section 5.9 provides normative behavior on when 1452 to retry a request after repeated timeouts and fatal transport errors 1453 resulting from communications with a non-responsive downstream SIP 1454 server. 1456 REQ 15: In cases where a network element fails, is so overloaded that 1457 it cannot process messages, or cannot communicate due to a network 1458 failure or network partition, it will not be able to provide explicit 1459 indications of the nature of the failure or its levels of congestion. 1460 The mechanism must properly function in these cases. 1462 Meeting REQ 15: Yes, Section 5.9 provides normative behavior on when 1463 to retry a request after repeated timeouts and fatal transport errors 1464 resulting from communications with a non-responsive downstream SIP 1465 server. 1467 REQ 16: The mechanism should attempt to minimize the overhead of the 1468 overload control messaging. 1470 Meeting REQ 16: Yes, overload control messages are sent in the 1471 topmost Via header, which is always processed by the SIP elements. 1473 REQ 17: The overload mechanism must not provide an avenue for 1474 malicious attack, including DoS and DDoS attacks. 1476 Meeting REQ 17: Partially. Since overload control information is 1477 shared between a pair of communicating entities, a confidential and 1478 authenticated channel can be used for this communication. However, 1479 if such a channel is not available, then the security ramifications 1480 outlined in Section 10 apply. 1482 REQ 18: The overload mechanism should be unambiguous about whether a 1483 load indication applies to a specific IP address, host, or URI, so 1484 that an upstream element can determine the load of the entity to 1485 which a request is to be sent. 1487 Meeting REQ 18: Yes, please see discussion in Section 5.5. 1489 REQ 19: The specification for the overload mechanism should give 1490 guidance on which message types might be desirable to process over 1491 others during times of overload, based on SIP-specific 1492 considerations. For example, it may be more beneficial to process a 1493 SUBSCRIBE refresh with Expires of zero than a SUBSCRIBE refresh with 1494 a non-zero expiration (since the former reduces the overall amount of 1495 load on the element), or to process re-INVITEs over new INVITEs. 1497 Meeting REQ 19: Yes, please see Section 5.10. 1499 REQ 20: In a mixed environment of elements that do and do not 1500 implement the overload mechanism, no disproportionate benefit shall 1501 accrue to the users or operators of the elements that do not 1502 implement the mechanism. 1504 Meeting REQ 20: Yes, an element that does not implement overload 1505 control does not receive any measure of extra benefit. 1507 REQ 21: The overload mechanism should ensure that the system remains 1508 stable. When the offered load drops from above the overall capacity 1509 of the network to below the overall capacity, the throughput should 1510 stabilize and become equal to the offered load. 1512 Meeting REQ 21: Yes, the overload control mechanism described in this 1513 draft ensures the stability of the system. 1515 REQ 22: It must be possible to disable the reporting of load 1516 information towards upstream targets based on the identity of those 1517 targets. This allows a domain administrator who considers the load 1518 of their elements to be sensitive information, to restrict access to 1519 that information. Of course, in such cases, there is no expectation 1520 that the overload mechanism itself will help prevent overload from 1521 that upstream target. 1523 Meeting REQ 22: Yes, an operator of a SIP server can configure the 1524 SIP server to only report overload control information for requests 1525 received over a confidential channel, for example. However, note 1526 that this requirement is in conflict with REQ 3, as it introduces a 1527 modicum of extra configuration. 1529 REQ 23: It must be possible for the overload mechanism to work in 1530 cases where there is a load balancer in front of a farm of proxies. 1532 Meeting REQ 23: Yes. Depending on the type of load balancer, this 1533 requirement is met. A load balancer fronting a farm of SIP proxies 1534 could be a SIP-aware load balancer or one that is not SIP-aware. If 1535 the load balancer is SIP-aware, it can make conscious decisions on 1536 throttling outgoing traffic towards the individual server in the farm 1537 based on the overload control parameters returned by the server. On 1538 the other hand, if the load balancer is not SIP-aware, then there are 1539 other strategies to perform overload control. Section 6 of [RFC6357] 1540 documents some of these strategies in more detail (see discussion 1541 related to Figure 3(a) in Section 6). 1543 Authors' Addresses 1545 Vijay K. Gurbani (editor) 1546 Bell Laboratories, Alcatel-Lucent 1547 1960 Lucent Lane, Rm 9C-533 1548 Naperville, IL 60563 1549 USA 1551 Email: vkg@bell-labs.com 1553 Volker Hilt 1554 Bell Laboratories, Alcatel-Lucent 1555 791 Holmdel-Keyport Rd 1556 Holmdel, NJ 07733 1557 USA 1559 Email: volkerh@bell-labs.com 1560 Henning Schulzrinne 1561 Columbia University/Department of Computer Science 1562 450 Computer Science Building 1563 New York, NY 10027 1564 USA 1566 Phone: +1 212 939 7004 1567 Email: hgs@cs.columbia.edu 1568 URI: http://www.cs.columbia.edu