idnits 2.17.1 draft-ietf-soc-overload-control-10.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 are 2 instances of too long lines in the document, the longest one being 4 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 676 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 (October 22, 2012) is 4205 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 721 -- Looks like a reference, but probably isn't: '100' on line 721 == Outdated reference: A later version (-13) exists of draft-ietf-soc-load-control-event-package-04 == Outdated reference: A later version (-10) exists of draft-ietf-soc-overload-rate-control-03 Summary: 1 error (**), 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: April 25, 2013 H. Schulzrinne 6 Columbia University 7 October 22, 2012 9 Session Initiation Protocol (SIP) Overload Control 10 draft-ietf-soc-overload-control-10 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 April 25, 2013. 40 Copyright Notice 42 Copyright (c) 2012 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 . . 9 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 . . . . . . . . . 13 74 5.9. Self-Limiting . . . . . . . . . . . . . . . . . . . . . . 14 75 5.10. Responding to an Overload Indication . . . . . . . . . . . 14 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 . . . . . 15 79 5.11. 100-Trying provisional response and overload control 80 parameters . . . . . . . . . . . . . . . . . . . . . . . . 16 81 6. The loss-based overload control scheme . . . . . . . . . . . . 16 82 6.1. Special parameter values for loss-based overload 83 control . . . . . . . . . . . . . . . . . . . . . . . . . 16 84 6.2. Example . . . . . . . . . . . . . . . . . . . . . . . . . 17 85 6.3. Default algorithm for loss-based overload control . . . . 18 86 7. Relationship with other IETF SIP load control efforts . . . . 22 87 8. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 88 9. Design Considerations . . . . . . . . . . . . . . . . . . . . 22 89 9.1. SIP Mechanism . . . . . . . . . . . . . . . . . . . . . . 23 90 9.1.1. SIP Response Header . . . . . . . . . . . . . . . . . 23 91 9.1.2. SIP Event Package . . . . . . . . . . . . . . . . . . 23 92 9.2. Backwards Compatibility . . . . . . . . . . . . . . . . . 24 93 10. Security Considerations . . . . . . . . . . . . . . . . . . . 25 94 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 95 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 26 96 12.1. Normative References . . . . . . . . . . . . . . . . . . . 26 97 12.2. Informative References . . . . . . . . . . . . . . . . . . 27 98 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 27 99 Appendix B. RFC5390 requirements . . . . . . . . . . . . . . . . 28 100 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 33 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 is inserted by the SIP server. 314 This parameter contains a value that indicates the sequence number 315 associated with the "oc" parameter. This sequence number is used to 316 differentiate two "oc" parameter values generated by an overload 317 control algorithm at two different instants in time. "oc" parameter 318 values generated by an overload control algorithm at time t and t+1 319 MUST have an increasing value in the "oc-seq" parameter. This allows 320 the upstream SIP client to properly collate out-of-order responses. 322 A timestamp can be used as a value of the "oc-seq" parameter. 324 If the value contained in "oc-seq" parameter overflows during the 325 period in which the load reduction is in effect, then the "oc-seq" 326 parameter MUST be reset to the current timestamp or an appropriate 327 base value. 329 5. General behaviour 331 When forwarding a SIP request, a SIP client uses the SIP procedures 332 of [RFC3263] to determine the next hop SIP server. The procedures of 333 [RFC3263] take as input a SIP URI, extract the domain portion of that 334 URI for use as a lookup key, and query the Domain Name Service (DNS) 335 to obtain an ordered set of one or more IP addresses with a port 336 number and transport corresponding to each IP address in this set 337 (the "Expected Output"). 339 After selecting a specific SIP server from the Expected Output, a SIP 340 client MUST determine if it is operating under overload control mode 341 with the server (see Section 5.5) or if this is the initial contact 342 with the server. 344 If the client determines that this is the initial contact with the 345 server, it follows the steps outlined in the first paragraph of 346 Section 5.1. Otherwise, the client has conversed with this server 347 before and any overload control parameters established during the 348 previous exchange remain in effect. 350 5.1. Determining support for overload control 352 If a client determines that this is the initial contact with the 353 server, the client MUST insert the "oc" parameter without any value, 354 and MUST insert the "oc-algo" parameter with a list of algorithms it 355 supports. This list MUST include "loss" and MAY include other 356 algorithm names approved by IANA and described in corresponding 357 documents. The client transmits the request to the chosen server. 359 A server that supports overload control MUST choose one algorithm 360 from the list of algorithms in the "oc-algo" parameter. It MUST put 361 the chosen algorithm as the sole parameter value in the "oc-algo" 362 parameter of the response it sends to the client. In addition, if 363 the server is currently not in an overload condition, it MUST set the 364 value of the "oc" parameter to be 0 and MAY insert an "oc-validity=0" 365 parameter in the response to further qualify the value in the "oc" 366 parameter. If the server is currently overloaded, it MUST follow the 367 procedures of Section 5.2. 369 A client that supports the rate-based overload control scheme 370 [I-D.ietf-soc-overload-rate-control] will consider "oc=0" as an 371 indication not to send any requests downstream at all. Thus, when 372 the server inserts "oc-validity=0" as well, it is indicating that 373 it does support overload control, but it is not under overload 374 mode right now (see Section 5.7). 376 5.2. Creating and updating the overload control parameters 378 A SIP server provides overload control feedback to its upstream 379 clients by providing a value for the "oc" parameter to the topmost 380 Via header field of a SIP response, that is, the Via header added by 381 the client before it sent the request to the server. 383 Since the topmost Via header of a response will be removed by an 384 upstream client after processing it, overload control feedback 385 contained in the "oc" parameter will not travel beyond the upstream 386 SIP client. A Via header parameter therefore provides hop-by-hop 387 semantics for overload control feedback (see [RFC6357]) even if the 388 next hop neighbor does not support this specification. 390 The "oc" parameter can be used in all response types, including 391 provisional, success and failure responses (please see Section 5.11 392 for special consideration on transporting overload control parameters 393 in a 100-Trying response). A SIP server MAY update the "oc" 394 parameter in all responses it is sending. A SIP server MUST update 395 the "oc" parameter to responses when the transmission of overload 396 control feedback is required by the overload control algorithm to 397 limit the traffic received by the server. I.e., a SIP server MUST 398 update the "oc" parameter when the overload control algorithm sets 399 the value of an "oc" parameter to a value different than the default 400 value. 402 A SIP server that has updated the "oc" parameter to Via header SHOULD 403 also add a "oc-validity" parameter to the same Via header. The "oc- 404 validity" parameter defines the time in milliseconds during which the 405 the overload control feedback specified in the "oc" parameter is 406 valid. The default value of the "oc-validity" parameter is 500 407 (millisecond). A SIP server SHOULD specify an "oc-validity" time 408 that prevents the "oc" value from timing out before the next response 409 is sent and allows clients to discard stale "oc" values if they have 410 not communicated with a server for some time. If the "oc-validity" 411 parameter is not present, its default value is used. The "oc- 412 validity" parameter MUST NOT be used in a Via header that did not 413 originally contain an "oc" parameter when received. 415 When a SIP server retransmits a response, it SHOULD use the "oc" 416 parameter value and "oc-validity" parameter value consistent with the 417 overload state at the time the retransmitted response is sent. This 418 implies that the values in the "oc" and "oc-validity" parameters may 419 be different then the ones used in previous retransmissions of the 420 response. Due to the fact that responses sent over UDP may be 421 subject to delays in the network and arrive out of order, the "oc- 422 seq" parameter aids in detecting a stale "oc" parameter value. 424 Implementations that are capable of updating the "oc" and "oc- 425 validity" parameter values for retransmissions MUST insert the "oc- 426 seq" parameter. The value of this parameter MUST be a set of numbers 427 drawn from an increasing sequence. 429 Implementations that are not capable of updating the "oc" and "oc- 430 validity" parameter values for retransmissions --- or implementations 431 that do not want to do so because they will have to regenerate the 432 message to be retransmitted --- MUST still insert a "oc-seq" 433 parameter in the first response associated with a transaction; 434 however, they do not have to update the value in subsequent 435 retransmissions. 437 The "oc-validity" and "oc-seq" Via header parameters are only defined 438 in SIP responses and MUST NOT be used in SIP requests. These 439 parameters are only useful to the upstream neighbor of a SIP server 440 (i.e., the entity that is sending requests to the SIP server) since 441 this is the entity that can offload traffic by redirecting/rejecting 442 new requests. If requests are forwarded in both directions between 443 two SIP servers (i.e., the roles of upstream/downstream neighbors 444 change), there are also responses flowing in both directions. Thus, 445 both SIP servers can exchange overload information. 447 Since overload control protects a SIP server from overload, it is 448 RECOMMENDED that a SIP server uses the mechanisms described in this 449 specification. However, if a SIP server wanted to limit its overload 450 control capability for privacy reasons, it MAY decide to perform 451 overload control only for requests that are received on a secure 452 transport channel, such as TLS. This enables a SIP server to protect 453 overload control information and ensure that it is only visible to 454 trusted parties. 456 5.3. Determining the 'oc' Parameter Value 458 The value of the "oc" parameter is determined by the overloaded 459 server using any pertinent information at its disposal. The only 460 constraint imposed by this document is that the server control 461 algorithm MUST produce a value for the "oc" parameter such that the 462 receiving clients can apply it to all downstream requests (dialogue 463 forming as well as in-dialogue). Beyond this stipulation, the 464 process by which an overloaded server determines the value of the 465 "oc" parameter is considered out of scope for this document. 467 Note that this stipulation is required so that both the and server 468 have an common view of which messages to include in the 469 calculation of the feedback. With this stipulation in place, the 470 client can prioritize messages as discussed in Section 5.10.1. 472 As an example, a value of "oc=10" when the loss-based algorithm is 473 uses implies that 10% of all requests (dialog forming as well as in- 474 dialogue) are subject to reduction at the client. Analogously, a 475 value of "oc=10" when the rate-based algorithm 476 [I-D.ietf-soc-overload-rate-control] is used indicates that the 477 client should send SIP requests at a rate no greater than or equal to 478 10 SIP requests per second. 480 5.4. Processing the Overload Control Parameters 482 A SIP client SHOULD remove "oc", "oc-validity" and "oc-seq" 483 parameters from all Via headers of a response received, except for 484 the topmost Via header. This prevents overload control parameters 485 that were accidentally or maliciously inserted into Via headers by a 486 downstream SIP server from traveling upstream. 488 The scope of overload control applies to unique combinations of IP 489 and port values. A SIP client maintains the "oc" parameter values 490 received along with the address and port number of the SIP servers 491 from which they were received for the duration specified in the "oc- 492 validity" parameter or the default duration. Each time a SIP client 493 receives a response with an "oc" parameter from a downstream SIP 494 server, it overwrites the "oc" value it has currently stored for this 495 server with the new value received. The SIP client restarts the 496 validity period of an "oc" parameter each time a response with an 497 "oc" parameter is received from this server. A stored "oc" parameter 498 value MUST be discarded once it has reached the end of its validity. 500 5.5. Using the Overload Control Parameter Values 502 A SIP client MUST honor overload control values it receives from 503 downstream neighbors. The SIP client MUST NOT forward more requests 504 to a SIP server than allowed by the current "oc" parameter value from 505 that particular downstream server. 507 When forwarding a SIP request, a SIP client uses the SIP procedures 508 of [RFC3263] to determine the next hop SIP server. The procedures of 509 [RFC3263] take as input a SIP URI, extract the domain portion of that 510 URI for use as a lookup key, and query the Domain Name Service (DNS) 511 to obtain an ordered set of one or more IP addresses with a port 512 number and transport corresponding to each IP address in this set 513 (the "Expected Output"). 515 After selecting a specific SIP server from the Expected Output, the 516 SIP client MUST determine if it already has overload control 517 parameter values for the server chosen from the Expected Output. If 518 the SIP client has a non-expired "oc" parameter value for the server 519 chosen from the Expected Output, then this chosen server is operating 520 in overload control mode. Thus, the SIP client MUST determine if it 521 can or cannot forward the current request to the SIP server depending 522 on the nature of the request and the prevailing overload conditions. 524 The particular algorithm used to determine whether or not to forward 525 a particular SIP request is a matter of local policy, and may take 526 into account a variety of prioritization factors. However, this 527 local policy SHOULD generate the same number of SIP requests as the 528 default algorithm defined by the overload control scheme being used. 530 5.6. Forwarding the overload control parameters 532 Overload control is defined in a hop-by-hop manner. Therefore, 533 forwarding the contents of the overload control parameters is 534 generally NOT RECOMMENDED and should only be performed if permitted 535 by the configuration of SIP servers. This means that a SIP proxy 536 SHOULD strip the overload control parameters inserted by the client 537 before proxying the request further downstream. 539 5.7. Terminating overload control 541 A SIP client removes overload control if one of the following events 542 occur: 544 1. The "oc-validity" period negotiated to put the server and client 545 in overload state expires; 546 2. The client is explicitly told by the server to stop performing 547 overload control using the "oc-validity=0" parameter. 549 A SIP server can decide to terminate overload control by explicitly 550 signaling the client. To do so, the SIP server MUST set the value of 551 the "oc-validity" parameter to 0. The SIP server MUST increment the 552 value of "oc-seq", and SHOULD set the value of the "oc" parameter to 553 0. 555 Note that the loss-based overload control scheme (Section 6) can 556 effectively stop overload control by setting the value of the "oc" 557 parameter to 0. However, the rate-based scheme 558 ([I-D.ietf-soc-overload-rate-control]) needs an additional piece 559 of information in the form of "oc-validity=0". 561 When the client receives a response with a higher "oc-seq" number 562 than the one it currently is processing, it checks the "oc-validity" 563 parameter. If the value of the "oc-validity" parameter is 0, the 564 client MUST stop performing overload control of messages destined to 565 the server and the traffic should flow without any reduction. 566 Furthermore, when the value of the "oc-validity" parameter is 0, the 567 client SHOULD disregard the value in the "oc" parameter. 569 5.8. Stabilizing overload algorithm selection 571 Realities of deployments of SIP necessitate that the overload control 572 algorithm be renegotiated upon a system reboot or a software upgrade. 573 However, frequent renegotiation of the overload control algorithm 574 MUST be avoided. A rapid renegotiation of the overload control 575 algorithm will not benefit the client or the server as such flapping 576 does not allow the chosen algorithm to measure and fine tune its 577 behavior over a period of time. Renegotiation, when desired, is 578 simply accomplished by the SIP server choosing a new algorithm from 579 the list in the "oc-algo" parameter and sending it back to the client 580 in a response. 582 The client associates a specific algorithm with each server it sends 583 traffic to such that when the server changes the algorithm, the 584 client must behave accordingly as well. 586 Once the client and server agree on an overload control algorithm, it 587 MUST remain in effect for at least 3600 seconds (1 hour) before 588 renegotiation occurs. 590 One way to accomplish this involves the server saving the time of 591 the last negotiation in a lookup table, indexed by the client's 592 network identifiers. Renegotiation is only done when the time of 593 the last negotiation has surpassed 3600 seconds. 595 5.9. Self-Limiting 597 In some cases, a SIP client may not receive a response from a server 598 after sending a request. RFC3261 [RFC3261] defines that when a 599 timeout error is received from the transaction layer, it MUST be 600 treated as if a 408 (Request Timeout) status code has been received. 601 If a fatal transport error is reported by the transport layer, it 602 MUST be treated as a 503 (Service Unavailable) status code. 604 In the event of repeated timeouts or fatal transport errors, the SIP 605 client MUST stop sending requests to this server. The SIP client 606 SHOULD periodically probe if the downstream server is alive using any 607 mechanism for this probe at its disposal. Once a SIP client has 608 successfully transmitted a request to the downstream server, the SIP 609 client can resume normal traffic rates. It should, of course, honor 610 any "oc" parameters it may receive subsequent to resuming normal 611 traffic rates. 613 5.10. Responding to an Overload Indication 615 A SIP client can receive overload control feedback indicating that it 616 needs to reduce the traffic it sends to its downstream server. The 617 client can accomplish this task by sending some of the requests that 618 would have gone to the overloaded element to a different destination. 619 It needs to ensure, however, that this destination is not in overload 620 and capable of processing the extra load. A client can also buffer 621 requests in the hope that the overload condition will resolve quickly 622 and the requests still can be forwarded in time. In many cases, 623 however, it will need to reject these requests. 625 5.10.1. Message prioritization at the hop before the overloaded server 627 During an overload condition, a SIP client needs to prioritize 628 requests and select those requests that need to be rejected or 629 redirected. While this selection is largely a matter of local 630 policy, certain heuristics can be suggested. One, during overload 631 control, the SIP client should preserve existing dialogs as much as 632 possible. This suggests that mid-dialog requests MAY be given 633 preferential treatment. Similarly, requests that result in releasing 634 resources (such as a BYE) MAY also be given preferential treatment. 636 A SIP client SHOULD honor the local policy for prioritizing SIP 637 requests such as policies based on the content of the Resource- 638 Priority header (RPH, RFC4412 [RFC4412]). Specific (namespace.value) 639 RPH contents may indicate high priority requests that should be 640 preserved as much as possible during overload. The RPH contents can 641 also indicate a low-priority request that is eligible to be dropped 642 during times of overload. Other indicators, such as the SOS URN 643 [RFC5031] indicating an emergency request, may also be used for 644 prioritization. 646 Local policy could also include giving precedence to mid-dialog SIP 647 requests (re-INVITEs, UPDATEs, BYEs etc.) in times of overload. A 648 local policy can be expected to combine both the SIP request type and 649 the prioritization markings, and SHOULD be honored when overload 650 conditions prevail. 652 A SIP client SHOULD honor user-level load control filters installed 653 by signaling neighbors [I-D.ietf-soc-load-control-event-package] by 654 sending the SIP messages that matched the filter downstream. 656 5.10.2. Rejecting requests at an overloaded server 658 If the upstream SIP client to the overloaded server does not support 659 overload control, it will continue to direct requests to the 660 overloaded server. Thus, the overloaded server must bear the cost of 661 rejecting some session requests as well as the cost of processing 662 other requests to completion. It would be fair to devote the same 663 amount of processing at the overloaded server to the combination of 664 rejection and processing as the overloaded server would devote to 665 processing requests from an upstream SIP client that supported 666 overload control. This is to ensure that SIP servers that do not 667 support this specification don't receive an unfair advantage over 668 those that do. 670 A SIP server that is under overload and has started to throttle 671 incoming traffic MUST reject this request with a "503 (Service 672 Unavailable)" response without Retry-After header to reject some 673 requests from upstream neighbors that do not support overload 674 control. 676 5.11. 100-Trying provisional response and overload control parameters 678 The overload control information sent from a SIP server to a client 679 is transported in the responses. While implementations can insert 680 overload control information in any response, special attention 681 should be accorded to overload control information transported in a 682 100-Trying response. 684 Traditionally, the 100-Trying response has been used in SIP to quench 685 retransmissions. In some implementations, the 100-Trying message may 686 not be generated by the transaction user (TU) nor consumed by the TU. 687 In these implementations, the 100-Trying response is generated at the 688 transaction layer and sent to the upstream SIP client. At the 689 receiving SIP client, the 100-Trying is consumed at the transaction 690 layer by inhibiting the retransmission of the corresponding request. 691 Consequently, implementations that insert overload control 692 information in the 100-Trying cannot assume that the upstream SIP 693 client passed the overload control information in the 100-Trying to 694 their corresponding TU. For this reason, implementations that insert 695 overload control information in the 100-Trying MUST re-insert the 696 same (or updated) overload control information in the first non-100 697 response being sent to the upstream SIP client. 699 6. The loss-based overload control scheme 701 A loss percentage enables a SIP server to ask an upstream neighbor to 702 reduce the number of requests it would normally forward to this 703 server by X%. For example, a SIP server can ask an upstream neighbor 704 to reduce the number of requests this neighbor would normally send by 705 10%. The upstream neighbor then redirects or rejects 10% of the 706 traffic that is destined for this server. 708 This section specifies the semantics of the overload control 709 parameters associated with the loss-based overload control scheme. 710 The general behaviour of SIP clients and servers is specified in 711 Section 5 and is applicable to SIP clients and servers that implement 712 loss-based overload control. 714 6.1. Special parameter values for loss-based overload control 716 The loss-based overload control scheme is identified using the token 717 "loss". This token MUST appear in the "oc-algo" parameter. 719 A SIP server, upon entering the overload state, will assign a value 720 to the "oc" parameter. This value MUST be restricted in the range of 721 [0, 100], inclusive. This value MUST be interpreted as a percentage, 722 and the SIP client MUST reduce the number of requests being forwarded 723 to the overloaded server by that amount. The SIP client may use any 724 algorithm that reduces the traffic arriving at the overloaded server 725 by the amount indicated. Such an algorithm SHOULD honor the message 726 prioritization discussion of Section 5.10.1. While a particular 727 algorithm is not subject to standardization, for completeness a 728 default algorithm for loss-based overload control is provided in 729 Section 6.3. 731 When a SIP server receives a request from a client with an "oc" 732 parameter but without a value, and the SIP server is not experiencing 733 overload, it MUST assign a value of 0 to the "oc" parameter in the 734 response. Assigning such a value lets the client know that the 735 server supports overload control and is not currently experiencing 736 overload. 738 When the "oc-validity" parameter is used to signify overload control 739 termination (Section 5.7), the server MUST insert a value of 0 in the 740 "oc-validity" parameter. The server MUST insert a value of 0 in the 741 "oc" parameter as well. When a client receives a response whose "oc- 742 validity" parameter contains a 0, it MUST treat any non-zero value in 743 the "oc" parameter as if it had received a value of 0 in that 744 parameter. 746 6.2. Example 748 Consider a SIP client, P1, which is sending requests to another 749 downstream SIP server, P2. The following snippets of SIP messages 750 demonstrate how the overload control parameters work. 752 INVITE sips:user@example.com SIP/2.0 753 Via: SIP/2.0/TLS p1.example.net; 754 branch=z9hG4bK2d4790.1;oc;oc-algo="loss,A" 755 ... 757 SIP/2.0 100 Trying 758 Via: SIP/2.0/TLS p1.example.net; 759 branch=z9hG4bK2d4790.1;received=192.0.2.111; 760 oc=0;oc-algo="loss";oc-validity=0 761 ... 763 In the messages above, the first line is sent by P1 to P2. This line 764 is a SIP request; because P1 supports overload control, it inserts 765 the "oc" parameter in the topmost Via header that it created. P1 766 supports two overload control algorithms: loss and some algorithm 767 called "A". 769 The second line --- a SIP response --- shows the topmost Via header 770 amended by P2 according to this specification and sent to P1. 771 Because P2 also supports overload control, it chooses the "loss" 772 based scheme and sends that back to P1 in the "oc-algo" parameter. 773 It also sets the value of "oc" parameter to 0. 775 Had P2 not supported overload control, it would have left the "oc" 776 and "oc-algo" parameters unchanged, thus allowing the client to know 777 that it did not support overload control. 779 At some later time, P2 starts to experience overload. It sends the 780 following SIP message indicating that P1 should decrease the messages 781 arriving to P2 by 20% for 1s. 783 SIP/2.0 180 Ringing 784 Via: SIP/2.0/TLS p1.example.net; 785 branch=z9hG4bK2d4790.3;received=192.0.2.111; 786 oc=20;oc-algo="loss";oc-validity=500; 787 oc-seq=1282321615.782 788 ... 790 After some time, the overload condition at P2 subsides. It then 791 sends out the message below to allow P1 to send all messages destined 792 to P2. 794 SIP/2.0 183 Queued 795 Via: SIP/2.0/TLS p1.example.net; 796 branch=z9hG4bK2d4790.4;received=192.0.2.111; 797 oc=0;oc-algo="loss";oc-validity=0;oc-seq=1282321892.439 798 ... 800 6.3. Default algorithm for loss-based overload control 802 This section describes a default algorithm that a SIP client can to 803 throttle SIP traffic going downstream by the percentage loss value 804 specified in the "oc" parameter. 806 The client maintains two categories of requests; the first category 807 will include requests that are candidates for reduction, and the 808 second category will include requests that are not subject to 809 reduction (except under extenuating circumstances when there aren't 810 any messages in the first category that can be reduced). Section 811 Section 5.10.1 contains normative directives on how to prioritize 812 messages for inclusion in the second category. The remaining 813 messages can be allocated to the first category. 815 The client determines the mix of requests falling into the first 816 category and those falling into the second category. For example, 817 40% of the requests may be eligible for reduction and 60% not 818 eligible (and therefore, must be sent downstream). 820 Under overload condition, the client converts the value of the "oc" 821 parameter to a value that it applies to requests in the first 822 category. As a simple example, if "oc=10" and 40% of the requests 823 should be included in the first category, then: 825 10 / 40 * 100 = 25 827 Or, 25% of the requests in the first category can be reduced to get 828 an overall reduction of 10%. The client uses random discard to 829 achieve the 25% reduction of messages in the first category. 830 Messages in the second category proceed downstream unscathed. To 831 affect the 25% reduction rate from the first category, the client 832 draws a random number between 1 and 100 for the request picked from 833 the first category. If the random number is less than or equal to 834 converted value of the "oc" parameter, the request is not forwarded; 835 otherwise the request is forwarded. 837 A reference algorithm is shown below. 839 cat1 := 80.0 // Category 1 --- subject to reduction 840 cat2 := 100.0 - cat1 // Category 2 --- Under normal operations 841 // only subject to reduction after category 1 is exhausted. 842 // Note that the above ratio is simply a reasonable default. 843 // The actual values will change through periodic sampling 844 // as the traffic mix changes over time. 846 while (true) { 847 // We're modeling message processing as a single work queue 848 // that contains both incoming and outgoing messages. 849 sip_msg := get_next_message_from_work_queue() 851 update_mix(cat1, cat2) // See Note below 853 switch (sip_msg.type) { 855 case outbound request: 856 destination := get_next_hop(sip_msg) 857 oc_context := get_oc_context(destination) 859 if (oc_context == null) { 860 send_to_network(sip_msg) // Process it normally by sending the 861 // request to the next hop since this particular destination 862 // is not subject to overload 863 } 864 else { 865 // Determine if server wants to enter in overload or is in 866 // overload 867 in_oc := extract_in_oc(oc_context) 869 oc_value := extract_oc(oc_context) 870 oc_validity := extract_oc_validity(oc_context) 872 if (in_oc == false or oc_validity is not in effect) { 873 send_to_network(sip_msg) // Process it normally by sending 874 // the request to the next hop since this particular 875 // destination is not subject to overload. Optionally, 876 // clear the oc context for this server (not shown). 877 } 878 else { // Begin perform overload control 879 r := random() 880 drop_msg := false 882 category := assign_msg_to_category(sip_msg) 884 pct_to_reduce_cat1 = oc_value / cat1 * 100 886 if (oc_value <= cat1) { // Reduce all messages from category 1 887 if (r <= pct_to_reduce_cat1 && category == cat1) { 888 drop_msg := true 889 } 890 } 891 else { // oc_value > category 1. Reduce 100% of messages from 892 // category 1 and remaining from category 2. 893 pct_to_reduce_cat2 = (oc_value - cat1) / cat2 * 100 894 if (category == cat1) { 895 drop_msg := true 896 } 897 else { 898 if (r <= pct_to_reduce_cat2) { 899 drop_msg := true; 900 } 901 } 902 } 904 if (drop_msg == false) { 905 send_to_network(sip_msg) // Process it normally by 906 // sending the request to the next hop 907 } 908 else { 909 // Do not send request downstream, handle locally by 910 // generating response (if a proxy) or treating as 911 // an error (if a user agent). 912 } 914 } // End perform overload control 915 } 917 end case // outbound request 919 case outbound response: 920 if (we are in overload) { 921 add_overload_parameters(sip_msg) 922 } 923 send_to_network(sip_msg) 925 end case // outbound response 927 case inbound response: 929 if (sip_msg has oc parameter values) { 930 create_or_update_oc_context() // For the specific server 931 // that sent the response, create or update the oc context; 932 // i.e., extract the values of the oc-related parameters 933 // and store them for later use. 934 } 935 process_msg(sip_msg) 937 end case // inbound response 938 case inbound request: 940 if (we are not in overload) { 941 process_msg(sip_msg) 942 } 943 else { // We are in overload 944 if (sip_msg has oc parameters) { // Upstream client supports 945 process_msg(sip_msg) // oc; only sends important requests 946 } 947 else { // Upstream client does not support oc 948 if (local_policy(sip_msg) says process message) { 949 process_msg(sip_msg) 950 } 951 else { 952 send_response(sip_msg, 503) 953 } 954 } 955 } 956 end case // inbound request 957 } 958 } 960 Note: A simple way to sample the traffic mix for category 1 and 961 category 2 is to associate a counter with each category of message. 963 Periodically (every 5-10s) get the value of the counters and calculate 964 the ratio of category 1 messages to category 2 messages since the 965 last calculation. 967 Example: In the last 5 seconds, a total of 500 requests arrived 968 at the queue. Assume that 450 out of 500 were messages subject 969 to reduction and 50 out of 500 were classified as requests not 970 subject to reduction. Based on this ratio, cat1 := 90 and 971 cat2 := 10, or a 90/10 mix will be used in overload calculations. 973 7. Relationship with other IETF SIP load control efforts 975 The overload control mechanism described in this document is reactive 976 in nature and apart from message prioritization directives listed in 977 Section 5.10.1 the mechanisms described in this draft will not 978 discriminate requests based on user identity, filtering action and 979 arrival time. SIP networks that require pro-active overload control 980 mechanisms can upload user-level load control filters as described in 981 [I-D.ietf-soc-load-control-event-package]. 983 8. Syntax 985 This specification extends the existing definition of the Via header 986 field parameters of [RFC3261] as follows: 988 via-params = via-ttl / via-maddr 989 / via-received / via-branch 990 / oc / oc-validity 991 / oc-seq / oc-algo / via-extension 993 oc = "oc" [EQUAL oc-num] 994 oc-num = 1*DIGIT 995 oc-validity = "oc-validity" [EQUAL delta-ms] 996 oc-seq = "oc-seq" EQUAL 1*12DIGIT "." 1*5DIGIT 997 oc-algo = "oc-algo" EQUAL DQUOTE algo-list *(COMMA algo-list) 998 DQUOTE 999 algo-list = "loss" / *(other-algo) 1000 other-algo = %x41-5A / %x61-7A / %x30-39 1001 delta-ms = 1*DIGIT 1003 9. Design Considerations 1005 This section discusses specific design considerations for the 1006 mechanism described in this document. General design considerations 1007 for SIP overload control can be found in [RFC6357]. 1009 9.1. SIP Mechanism 1011 A SIP mechanism is needed to convey overload feedback from the 1012 receiving to the sending SIP entity. A number of different 1013 alternatives exist to implement such a mechanism. 1015 9.1.1. SIP Response Header 1017 Overload control information can be transmitted using a new Via 1018 header field parameter for overload control. A SIP server can add 1019 this header parameter to the responses it is sending upstream to 1020 provide overload control feedback to its upstream neighbors. This 1021 approach has the following characteristics: 1023 o A Via header parameter is light-weight and creates very little 1024 overhead. It does not require the transmission of additional 1025 messages for overload control and does not increase traffic or 1026 processing burdens in an overload situation. 1027 o Overload control status can frequently be reported to upstream 1028 neighbors since it is a part of a SIP response. This enables the 1029 use of this mechanism in scenarios where the overload status needs 1030 to be adjusted frequently. It also enables the use of overload 1031 control mechanisms that use regular feedback such as window-based 1032 overload control. 1033 o With a Via header parameter, overload control status is inherent 1034 in SIP signaling and is automatically conveyed to all relevant 1035 upstream neighbors, i.e., neighbors that are currently 1036 contributing traffic. There is no need for a SIP server to 1037 specifically track and manage the set of current upstream or 1038 downstream neighbors with which it should exchange overload 1039 feedback. 1040 o Overload status is not conveyed to inactive senders. This avoids 1041 the transmission of overload feedback to inactive senders, which 1042 do not contribute traffic. If an inactive sender starts to 1043 transmit while the receiver is in overload it will receive 1044 overload feedback in the first response and can adjust the amount 1045 of traffic forwarded accordingly. 1046 o A SIP server can limit the distribution of overload control 1047 information by only inserting it into responses to known upstream 1048 neighbors. A SIP server can use transport level authentication 1049 (e.g., via TLS) with its upstream neighbors. 1051 9.1.2. SIP Event Package 1053 Overload control information can also be conveyed from a receiver to 1054 a sender using a new event package. Such an event package enables a 1055 sending entity to subscribe to the overload status of its downstream 1056 neighbors and receive notifications of overload control status 1057 changes in NOTIFY requests. This approach has the following 1058 characteristics: 1060 o Overload control information is conveyed decoupled from SIP 1061 signaling. It enables an overload control manager, which is a 1062 separate entity, to monitor the load on other servers and provide 1063 overload control feedback to all SIP servers that have set up 1064 subscriptions with the controller. 1065 o With an event package, a receiver can send updates to senders that 1066 are currently inactive. Inactive senders will receive a 1067 notification about the overload and can refrain from sending 1068 traffic to this neighbor until the overload condition is resolved. 1069 The receiver can also notify all potential senders once they are 1070 permitted to send traffic again. However, these notifications do 1071 generate additional traffic, which adds to the overall load. 1072 o A SIP entity needs to set up and maintain overload control 1073 subscriptions with all upstream and downstream neighbors. A new 1074 subscription needs to be set up before/while a request is 1075 transmitted to a new downstream neighbor. Servers can be 1076 configured to subscribe at boot time. However, this would require 1077 additional protection to avoid the avalanche restart problem for 1078 overload control. Subscriptions need to be terminated when they 1079 are not needed any more, which can be done, for example, using a 1080 timeout mechanism. 1081 o A receiver needs to send NOTIFY messages to all subscribed 1082 upstream neighbors in a timely manner when the control algorithm 1083 requires a change in the control variable (e.g., when a SIP server 1084 is in an overload condition). This includes active as well as 1085 inactive neighbors. These NOTIFYs add to the amount of traffic 1086 that needs to be processed. To ensure that these requests will 1087 not be dropped due to overload, a priority mechanism needs to be 1088 implemented in all servers these request will pass through. 1089 o As overload feedback is sent to all senders in separate messages, 1090 this mechanism is not suitable when frequent overload control 1091 feedback is needed. 1092 o A SIP server can limit the set of senders that can receive 1093 overload control information by authenticating subscriptions to 1094 this event package. 1095 o This approach requires each proxy to implement user agent 1096 functionality (UAS and UAC) to manage the subscriptions. 1098 9.2. Backwards Compatibility 1100 An new overload control mechanism needs to be backwards compatible so 1101 that it can be gradually introduced into a network and functions 1102 properly if only a fraction of the servers support it. 1104 Hop-by-hop overload control (see [RFC6357]) has the advantage that it 1105 does not require that all SIP entities in a network support it. It 1106 can be used effectively between two adjacent SIP servers if both 1107 servers support overload control and does not depend on the support 1108 from any other server or user agent. The more SIP servers in a 1109 network support hop-by-hop overload control, the better protected the 1110 network is against occurrences of overload. 1112 A SIP server may have multiple upstream neighbors from which only 1113 some may support overload control. If a server would simply use this 1114 overload control mechanism, only those that support it would reduce 1115 traffic. Others would keep sending at the full rate and benefit from 1116 the throttling by the servers that support overload control. In 1117 other words, upstream neighbors that do not support overload control 1118 would be better off than those that do. 1120 A SIP server should therefore follow the behaviour outlined in 1121 Section 5.10.2 to handle clients that do not support overload 1122 control. 1124 10. Security Considerations 1126 Overload control mechanisms can be used by an attacker to conduct a 1127 denial-of-service attack on a SIP entity if the attacker can pretend 1128 that the SIP entity is overloaded. When such a forged overload 1129 indication is received by an upstream SIP client, it will stop 1130 sending traffic to the victim. Thus, the victim is subject to a 1131 denial-of-service attack. 1133 An attacker can create forged overload feedback by inserting itself 1134 into the communication between the victim and its upstream neighbors. 1135 The attacker would need to add overload feedback indicating a high 1136 load to the responses passed from the victim to its upstream 1137 neighbor. Proxies can prevent this attack by communicating via TLS. 1138 Since overload feedback has no meaning beyond the next hop, there is 1139 no need to secure the communication over multiple hops. 1141 Another way to conduct an attack is to send a message containing a 1142 high overload feedback value through a proxy that does not support 1143 this extension. If this feedback is added to the second Via headers 1144 (or all Via headers), it will reach the next upstream proxy. If the 1145 attacker can make the recipient believe that the overload status was 1146 created by its direct downstream neighbor (and not by the attacker 1147 further downstream) the recipient stops sending traffic to the 1148 victim. A precondition for this attack is that the victim proxy does 1149 not support this extension since it would not pass through overload 1150 control feedback otherwise. 1152 A malicious SIP entity could gain an advantage by pretending to 1153 support this specification but never reducing the amount of traffic 1154 it forwards to the downstream neighbor. If its downstream neighbor 1155 receives traffic from multiple sources which correctly implement 1156 overload control, the malicious SIP entity would benefit since all 1157 other sources to its downstream neighbor would reduce load. 1159 The solution to this problem depends on the overload control 1160 method. For rate-based and window-based overload control, it is 1161 very easy for a downstream entity to monitor if the upstream 1162 neighbor throttles traffic forwarded as directed. For percentage 1163 throttling this is not always obvious since the load forwarded 1164 depends on the load received by the upstream neighbor. 1166 11. IANA Considerations 1168 This specification defines four new Via header parameters as detailed 1169 below in the "Header Field Parameter and Parameter Values" sub- 1170 registry as per the registry created by [RFC3968]. The required 1171 information is: 1173 Header Field Parameter Name Predefined Values Reference 1174 __________________________________________________________ 1175 Via oc Yes RFCXXXX 1176 Via oc-validity Yes RFCXXXX 1177 Via oc-seq Yes RFCXXXX 1178 Via oc-algo Yes RFCXXXX 1180 RFC XXXX [NOTE TO RFC-EDITOR: Please replace with final RFC 1181 number of this specification.] 1183 NOTE: Do we need to do anything special to register "loss" 1184 as a value for "oc-algo" parameter? 1186 12. References 1188 12.1. Normative References 1190 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1191 Requirement Levels", BCP 14, RFC 2119, March 1997. 1193 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1194 A., Peterson, J., Sparks, R., Handley, M., and E. 1195 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1196 June 2002. 1198 [RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation 1199 Protocol (SIP): Locating SIP Servers", RFC 3263, 1200 June 2002. 1202 [RFC3968] Camarillo, G., "The Internet Assigned Number Authority 1203 (IANA) Header Field Parameter Registry for the Session 1204 Initiation Protocol (SIP)", BCP 98, RFC 3968, 1205 December 2004. 1207 [RFC4412] Schulzrinne, H. and J. Polk, "Communications Resource 1208 Priority for the Session Initiation Protocol (SIP)", 1209 RFC 4412, February 2006. 1211 12.2. Informative References 1213 [I-D.ietf-soc-load-control-event-package] 1214 Shen, C., Schulzrinne, H., and A. Koike, "A Session 1215 Initiation Protocol (SIP) Load Control Event Package", 1216 draft-ietf-soc-load-control-event-package-04 (work in 1217 progress), July 2012. 1219 [I-D.ietf-soc-overload-rate-control] 1220 Noel, E. and P. Williams, "Session Initiation Protocol 1221 (SIP) Rate Control", 1222 draft-ietf-soc-overload-rate-control-03 (work in 1223 progress), October 2012. 1225 [RFC5031] Schulzrinne, H., "A Uniform Resource Name (URN) for 1226 Emergency and Other Well-Known Services", RFC 5031, 1227 January 2008. 1229 [RFC5390] Rosenberg, J., "Requirements for Management of Overload in 1230 the Session Initiation Protocol", RFC 5390, December 2008. 1232 [RFC6357] Hilt, V., Noel, E., Shen, C., and A. Abdelal, "Design 1233 Considerations for Session Initiation Protocol (SIP) 1234 Overload Control", RFC 6357, August 2011. 1236 Appendix A. Acknowledgements 1238 The authors acknowledge the contributions of Bruno Chatras, Keith 1239 Drage, Janet Gunn, Rich Terpstra, Daryl Malas, R. Parthasarathi, 1240 Antoine Roly, Jonathan Rosenberg, Charles Shen, Rahul Srivastava, 1241 Padma Valluri, Shaun Bharrat, Paul Kyzivat and Jeroen Van Bemmel to 1242 this document. 1244 Adam Roach and Eric McMurry helped flesh out the different cases for 1245 handling SIP messages described in the algorithm of Section 6.3. 1246 Janet Gunn reviewed the algorithm and suggested changes that lead to 1247 simpler processing for the case where "oc_value > cat1". 1249 Appendix B. RFC5390 requirements 1251 Table 1 provides a summary how this specification fulfills the 1252 requirements of [RFC5390]. A more detailed view on how each 1253 requirements is fulfilled is provided after the table. 1255 +-------------+-------------------+ 1256 | Requirement | Meets requirement | 1257 +-------------+-------------------+ 1258 | REQ 1 | Yes | 1259 | REQ 2 | Yes | 1260 | REQ 3 | Partially | 1261 | REQ 4 | Partially | 1262 | REQ 5 | Partially | 1263 | REQ 6 | Not applicable | 1264 | REQ 7 | Yes | 1265 | REQ 8 | Partially | 1266 | REQ 9 | Yes | 1267 | REQ 10 | Yes | 1268 | REQ 11 | Yes | 1269 | REQ 12 | Yes | 1270 | REQ 13 | Yes | 1271 | REQ 14 | Yes | 1272 | REQ 15 | Yes | 1273 | REQ 16 | Yes | 1274 | REQ 17 | Partially | 1275 | REQ 18 | Yes | 1276 | REQ 19 | Yes | 1277 | REQ 20 | Yes | 1278 | REQ 21 | Yes | 1279 | REQ 22 | Yes | 1280 | REQ 23 | Yes | 1281 +-------------+-------------------+ 1283 Summary of meeting requirements in RFC5390 1285 Table 1 1287 REQ 1: The overload mechanism shall strive to maintain the overall 1288 useful throughput (taking into consideration the quality-of-service 1289 needs of the using applications) of a SIP server at reasonable 1290 levels, even when the incoming load on the network is far in excess 1291 of its capacity. The overall throughput under load is the ultimate 1292 measure of the value of an overload control mechanism. 1294 Meeting REQ 1: Yes, the overload control mechanism allows an 1295 overloaded SIP server to maintain a reasonable level of throughput as 1296 it enters into congestion mode by requesting the upstream clients to 1297 reduce traffic destined downstream. 1299 REQ 2: When a single network element fails, goes into overload, or 1300 suffers from reduced processing capacity, the mechanism should strive 1301 to limit the impact of this on other elements in the network. This 1302 helps to prevent a small-scale failure from becoming a widespread 1303 outage. 1305 Meeting REQ 2: Yes. When a SIP server enters overload mode, it will 1306 request the upstream clients to throttle the traffic destined to it. 1307 As a consequence of this, the overloaded SIP server will itself 1308 generate proportionally less downstream traffic, thereby limiting the 1309 impact on other elements in the network. 1311 REQ 3: The mechanism should seek to minimize the amount of 1312 configuration required in order to work. For example, it is better 1313 to avoid needing to configure a server with its SIP message 1314 throughput, as these kinds of quantities are hard to determine. 1316 Meeting REQ 3: Partially. On the server side, the overload condition 1317 is determined monitoring S (c.f., Section 4 of [RFC6357]) and 1318 reporting a load feedback F as a value to the "oc" parameter. On the 1319 client side, a throttle T is applied to requests going downstream 1320 based on F. This specification does not prescribe any value for S, 1321 nor a particular value for F. The "oc-algo" parameter allows for 1322 automatic convergence to a particular class of overload control 1323 algorithm. There are suggested default values for the "oc-validity" 1324 parameter. 1326 REQ 4: The mechanism must be capable of dealing with elements that do 1327 not support it, so that a network can consist of a mix of elements 1328 that do and don't support it. In other words, the mechanism should 1329 not work only in environments where all elements support it. It is 1330 reasonable to assume that it works better in such environments, of 1331 course. Ideally, there should be incremental improvements in overall 1332 network throughput as increasing numbers of elements in the network 1333 support the mechanism. 1335 Meeting REQ 4: Partially. The mechanism is designed to reduce 1336 congestion when a pair of communicating entities support it. If a 1337 downstream overloaded SIP server does not respond to a request in 1338 time, a SIP client will attempt to reduce traffic destined towards 1339 the non-responsive server as outlined in Section 5.9. 1341 REQ 5: The mechanism should not assume that it will only be deployed 1342 in environments with completely trusted elements. It should seek to 1343 operate as effectively as possible in environments where other 1344 elements are malicious; this includes preventing malicious elements 1345 from obtaining more than a fair share of service. 1347 Meeting REQ 5: Partially. Since overload control information is 1348 shared between a pair of communicating entities, a confidential and 1349 authenticated channel can be used for this communication. However, 1350 if such a channel is not available, then the security ramifications 1351 outlined in Section 10 apply. 1353 REQ 6: When overload is signaled by means of a specific message, the 1354 message must clearly indicate that it is being sent because of 1355 overload, as opposed to other, non overload-based failure conditions. 1356 This requirement is meant to avoid some of the problems that have 1357 arisen from the reuse of the 503 response code for multiple purposes. 1358 Of course, overload is also signaled by lack of response to requests. 1359 This requirement applies only to explicit overload signals. 1361 Meeting REQ 6: Not applicable. Overload control information is 1362 signaled as part of the Via header and not in a new header. 1364 REQ 7: The mechanism shall provide a way for an element to throttle 1365 the amount of traffic it receives from an upstream element. This 1366 throttling shall be graded so that it is not all- or-nothing as with 1367 the current 503 mechanism. This recognizes the fact that "overload" 1368 is not a binary state and that there are degrees of overload. 1370 Meeting REQ 7: Yes, please see Section 5.5 and Section 5.10. 1372 REQ 8: The mechanism shall ensure that, when a request was not 1373 processed successfully due to overload (or failure) of a downstream 1374 element, the request will not be retried on another element that is 1375 also overloaded or whose status is unknown. This requirement derives 1376 from REQ 1. 1378 Meeting REQ 8: Partially. A SIP client that has overload information 1379 from multiple downstream servers will not retry the request on 1380 another element. However, if a SIP client does not know the overload 1381 status of a downstream server, it may send the request to that 1382 server. 1384 REQ 9: That a request has been rejected from an overloaded element 1385 shall not unduly restrict the ability of that request to be submitted 1386 to and processed by an element that is not overloaded. This 1387 requirement derives from REQ 1. 1389 Meeting REQ 9: Yes, a SIP client conformant to this specification 1390 will send the request to a different element. 1392 REQ 10: The mechanism should support servers that receive requests 1393 from a large number of different upstream elements, where the set of 1394 upstream elements is not enumerable. 1396 Meeting REQ 10: Yes, there are no constraints on the number of 1397 upstream clients. 1399 REQ 11: The mechanism should support servers that receive requests 1400 from a finite set of upstream elements, where the set of upstream 1401 elements is enumerable. 1403 Meeting REQ 11: Yes, there are no constraints on the number of 1404 upstream clients. 1406 REQ 12: The mechanism should work between servers in different 1407 domains. 1409 Meeting REQ 12: Yes, there are no inherent limitations on using 1410 overload control between domains. 1412 REQ 13: The mechanism must not dictate a specific algorithm for 1413 prioritizing the processing of work within a proxy during times of 1414 overload. It must permit a proxy to prioritize requests based on any 1415 local policy, so that certain ones (such as a call for emergency 1416 services or a call with a specific value of the Resource-Priority 1417 header field [RFC4412]) are given preferential treatment, such as not 1418 being dropped, being given additional retransmission, or being 1419 processed ahead of others. 1421 Meeting REQ 13: Yes, please see Section 5.10. 1423 REQ 14: REQ 14: The mechanism should provide unambiguous directions 1424 to clients on when they should retry a request and when they should 1425 not. This especially applies to TCP connection establishment and SIP 1426 registrations, in order to mitigate against avalanche restart. 1428 Meeting REQ 14: Yes, Section 5.9 provides normative behavior on when 1429 to retry a request after repeated timeouts and fatal transport errors 1430 resulting from communications with a non-responsive downstream SIP 1431 server. 1433 REQ 15: In cases where a network element fails, is so overloaded that 1434 it cannot process messages, or cannot communicate due to a network 1435 failure or network partition, it will not be able to provide explicit 1436 indications of the nature of the failure or its levels of congestion. 1438 The mechanism must properly function in these cases. 1440 Meeting REQ 15: Yes, Section 5.9 provides normative behavior on when 1441 to retry a request after repeated timeouts and fatal transport errors 1442 resulting from communications with a non-responsive downstream SIP 1443 server. 1445 REQ 16: The mechanism should attempt to minimize the overhead of the 1446 overload control messaging. 1448 Meeting REQ 16: Yes, overload control messages are sent in the 1449 topmost Via header, which is always processed by the SIP elements. 1451 REQ 17: The overload mechanism must not provide an avenue for 1452 malicious attack, including DoS and DDoS attacks. 1454 Meeting REQ 17: Partially. Since overload control information is 1455 shared between a pair of communicating entities, a confidential and 1456 authenticated channel can be used for this communication. However, 1457 if such a channel is not available, then the security ramifications 1458 outlined in Section 10 apply. 1460 REQ 18: The overload mechanism should be unambiguous about whether a 1461 load indication applies to a specific IP address, host, or URI, so 1462 that an upstream element can determine the load of the entity to 1463 which a request is to be sent. 1465 Meeting REQ 18: Yes, please see discussion in Section 5.5. 1467 REQ 19: The specification for the overload mechanism should give 1468 guidance on which message types might be desirable to process over 1469 others during times of overload, based on SIP-specific 1470 considerations. For example, it may be more beneficial to process a 1471 SUBSCRIBE refresh with Expires of zero than a SUBSCRIBE refresh with 1472 a non-zero expiration (since the former reduces the overall amount of 1473 load on the element), or to process re-INVITEs over new INVITEs. 1475 Meeting REQ 19: Yes, please see Section 5.10. 1477 REQ 20: In a mixed environment of elements that do and do not 1478 implement the overload mechanism, no disproportionate benefit shall 1479 accrue to the users or operators of the elements that do not 1480 implement the mechanism. 1482 Meeting REQ 20: Yes, an element that does not implement overload 1483 control does not receive any measure of extra benefit. 1485 REQ 21: The overload mechanism should ensure that the system remains 1486 stable. When the offered load drops from above the overall capacity 1487 of the network to below the overall capacity, the throughput should 1488 stabilize and become equal to the offered load. 1490 Meeting REQ 21: Yes, the overload control mechanism described in this 1491 draft ensures the stability of the system. 1493 REQ 22: It must be possible to disable the reporting of load 1494 information towards upstream targets based on the identity of those 1495 targets. This allows a domain administrator who considers the load 1496 of their elements to be sensitive information, to restrict access to 1497 that information. Of course, in such cases, there is no expectation 1498 that the overload mechanism itself will help prevent overload from 1499 that upstream target. 1501 Meeting REQ 22: Yes, an operator of a SIP server can configure the 1502 SIP server to only report overload control information for requests 1503 received over a confidential channel, for example. However, note 1504 that this requirement is in conflict with REQ 3, as it introduces a 1505 modicum of extra configuration. 1507 REQ 23: It must be possible for the overload mechanism to work in 1508 cases where there is a load balancer in front of a farm of proxies. 1510 Meeting REQ 23: Yes. Depending on the type of load balancer, this 1511 requirement is met. A load balancer fronting a farm of SIP proxies 1512 could be a SIP-aware load balancer or one that is not SIP-aware. If 1513 the load balancer is SIP-aware, it can make conscious decisions on 1514 throttling outgoing traffic towards the individual server in the farm 1515 based on the overload control parameters returned by the server. On 1516 the other hand, if the load balancer is not SIP-aware, then there are 1517 other strategies to perform overload control. Section 6 of [RFC6357] 1518 documents some of these strategies in more detail (see discussion 1519 related to Figure 3(a) in Section 6). 1521 Authors' Addresses 1523 Vijay K. Gurbani (editor) 1524 Bell Laboratories, Alcatel-Lucent 1525 1960 Lucent Lane, Rm 9C-533 1526 Naperville, IL 60563 1527 USA 1529 Email: vkg@bell-labs.com 1530 Volker Hilt 1531 Bell Laboratories, Alcatel-Lucent 1532 791 Holmdel-Keyport Rd 1533 Holmdel, NJ 07733 1534 USA 1536 Email: volkerh@bell-labs.com 1538 Henning Schulzrinne 1539 Columbia University/Department of Computer Science 1540 450 Computer Science Building 1541 New York, NY 10027 1542 USA 1544 Phone: +1 212 939 7004 1545 Email: hgs@cs.columbia.edu 1546 URI: http://www.cs.columbia.edu