idnits 2.17.1 draft-ietf-soc-overload-control-11.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 685 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 (November 21, 2012) is 4172 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 731 -- Looks like a reference, but probably isn't: '100' on line 731 == Outdated reference: A later version (-13) exists of draft-ietf-soc-load-control-event-package-05 == 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: May 25, 2013 H. Schulzrinne 6 Columbia University 7 November 21, 2012 9 Session Initiation Protocol (SIP) Overload Control 10 draft-ietf-soc-overload-control-11 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 May 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 . . 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 . . . . . 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 . . . . . . . . . . . . . . . . . . . . . . . . . 17 84 6.2. Example . . . . . . . . . . . . . . . . . . . . . . . . . 17 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 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 . . . . . . . . . . . . . . . . . . . 25 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. While this selection is largely a matter of local 647 policy, certain heuristics can be suggested. For instance, local 648 policy could include giving precedence to mid-dialog requests in 649 times of overload. 651 A SIP client SHOULD honor the local policy for prioritizing SIP 652 requests such as policies based on the content of the Resource- 653 Priority header (RPH, RFC4412 [RFC4412]). Specific (namespace.value) 654 RPH contents may indicate high priority requests that should be 655 preserved as much as possible during overload. The RPH contents can 656 also indicate a low-priority request that is eligible to be dropped 657 during times of overload. Other indicators, such as the SOS URN 658 [RFC5031] indicating an emergency request, may also be used for 659 prioritization. 661 A local policy can be expected to combine both the SIP request type 662 and the prioritization markings, and SHOULD be honored when overload 663 conditions prevail. 665 5.10.2. Rejecting requests at an overloaded server 667 If the upstream SIP client to the overloaded server does not support 668 overload control, it will continue to direct requests to the 669 overloaded server. Thus, for the non-participating client, the 670 overloaded server must bear the cost of rejecting some requests from 671 the client as well as the cost of processing the non-rejected 672 requests to completion. It would be fair to devote the same amount 673 of processing at the overloaded server to the combination of 674 rejection and processing from a non-participating client as the 675 overloaded server would devote to processing requests from a 676 participating client. This is to ensure that SIP clients that do not 677 support this specification don't receive an unfair advantage over 678 those that do. 680 A SIP server that is under overload and has started to throttle 681 incoming traffic MUST reject some requests from non-participating 682 clients with a "503 (Service Unavailable)" response without the 683 Retry-After header. 685 5.11. 100-Trying provisional response and overload control parameters 687 The overload control information sent from a SIP server to a client 688 is transported in the responses. While implementations can insert 689 overload control information in any response, special attention 690 should be accorded to overload control information transported in a 691 100-Trying response. 693 Traditionally, the 100-Trying response has been used in SIP to quench 694 retransmissions. In some implementations, the 100-Trying message may 695 not be generated by the transaction user (TU) nor consumed by the TU. 696 In these implementations, the 100-Trying response is generated at the 697 transaction layer and sent to the upstream SIP client. At the 698 receiving SIP client, the 100-Trying is consumed at the transaction 699 layer by inhibiting the retransmission of the corresponding request. 700 Consequently, implementations that insert overload control 701 information in the 100-Trying cannot assume that the upstream SIP 702 client passed the overload control information in the 100-Trying to 703 their corresponding TU. For this reason, implementations that insert 704 overload control information in the 100-Trying MUST re-insert the 705 same (or updated) overload control information in the first non-100 706 response being sent to the upstream SIP client. 708 6. The loss-based overload control scheme 710 Under a loss-based approach, a SIP server asks an upstream neighbor 711 to reduce the number of requests it would normally forward to this 712 server by a certain percentage. For example, a SIP server can ask an 713 upstream neighbor to reduce the number of requests this neighbor 714 would normally send by 10%. The upstream neighbor then redirects or 715 rejects 10% of the traffic originally destined for that server. 717 This section specifies the semantics of the overload control 718 parameters associated with the loss-based overload control scheme. 719 The general behaviour of SIP clients and servers is specified in 720 Section 5 and is applicable to SIP clients and servers that implement 721 loss-based overload control. 723 6.1. Special parameter values for loss-based overload control 725 The loss-based overload control scheme is identified using the token 726 "loss". This token MUST appear in the "oc-algo" parameter list sent 727 by the SIP client. 729 A SIP server that has selected the loss-based algorithm, upon 730 entering the overload state, will assign a value to the "oc" 731 parameter. This value MUST be in the range of [0, 100], inclusive. 732 This value MUST be interpreted by the client as a percentage, and the 733 SIP client MUST reduce the number of requests being forwarded to the 734 overloaded server by that percent. The SIP client may use any 735 algorithm that reduces the traffic it sends to the overloaded server 736 by the amount indicated. Such an algorithm SHOULD honor the message 737 prioritization discussion of Section 5.10.1. While a particular 738 algorithm is not subject to standardization, for completeness a 739 default algorithm for loss-based overload control is provided in 740 Section 6.3. 742 When a SIP server using the loss-based algorithm receives a request 743 from a client with an "oc" parameter but the SIP server is not 744 experiencing overload, it MUST assign a value of 0 to the "oc" 745 parameter in the response. Assigning such a value lets the client 746 know that the server supports overload control but is not currently 747 requesting any reduction in traffic. 749 When the "oc-validity" parameter is used to signify overload control 750 termination (Section 5.7), the server MUST insert a value of 0 in the 751 "oc-validity" parameter. The server MUST insert a value of 0 in the 752 "oc" parameter as well. When a client receives a response whose "oc- 753 validity" parameter contains a 0, it MUST treat any non-zero value in 754 the "oc" parameter as if it had received a value of 0 in that 755 parameter. 757 6.2. Example 759 Consider a SIP client, P1, which is sending requests to another 760 downstream SIP server, P2. The following snippets of SIP messages 761 demonstrate how the overload control parameters work. 763 INVITE sips:user@example.com SIP/2.0 764 Via: SIP/2.0/TLS p1.example.net; 765 branch=z9hG4bK2d4790.1;oc;oc-algo="loss,A" 766 ... 768 SIP/2.0 100 Trying 769 Via: SIP/2.0/TLS p1.example.net; 770 branch=z9hG4bK2d4790.1;received=192.0.2.111; 771 oc=0;oc-algo="loss";oc-validity=0 772 ... 774 In the messages above, the first line is sent by P1 to P2. This line 775 is a SIP request; because P1 supports overload control, it inserts 776 the "oc" parameter in the topmost Via header that it created. P1 777 supports two overload control algorithms: loss and some algorithm 778 called "A". 780 The second line --- a SIP response --- shows the topmost Via header 781 amended by P2 according to this specification and sent to P1. 782 Because P2 also supports overload control, and because it chooses the 783 "loss" based scheme, it sends "loss" back to P1 in the "oc-algo" 784 parameter. It also sets the value of "oc" and "oc-validity" 785 parameters to 0 because it is not currently requesting overload 786 control activation. 788 Had P2 not supported overload control, it would have left the "oc" 789 and "oc-algo" parameters unchanged, thus allowing the client to know 790 that it did not support overload control. 792 At some later time, P2 starts to experience overload. It sends the 793 following SIP message indicating that P1 should decrease the messages 794 arriving to P2 by 20% for 1s. 796 SIP/2.0 180 Ringing 797 Via: SIP/2.0/TLS p1.example.net; 798 branch=z9hG4bK2d4790.3;received=192.0.2.111; 799 oc=20;oc-algo="loss";oc-validity=500; 800 oc-seq=1282321615.782 801 ... 803 After some time, the overload condition at P2 subsides. It then 804 changes the parameter values in the response it sends to P1 to allow 805 P1 to send all messages destined to P2. 807 SIP/2.0 183 Queued 808 Via: SIP/2.0/TLS p1.example.net; 809 branch=z9hG4bK2d4790.4;received=192.0.2.111; 810 oc=0;oc-algo="loss";oc-validity=0;oc-seq=1282321892.439 812 ... 814 6.3. Default algorithm for loss-based overload control 816 This section describes a default algorithm that a SIP client can use 817 to throttle SIP traffic going downstream by the percentage loss value 818 specified in the "oc" parameter. 820 The client maintains two categories of requests; the first category 821 will include requests that are candidates for reduction, and the 822 second category will include requests that are not subject to 823 reduction except when all messages in the first category have been 824 rejected, and further reduction is still needed. Section 825 Section 5.10.1 contains directives on identifying messages for 826 inclusion in the second category. The remaining messages are 827 allocated to the first category. 829 Under overload condition, the client converts the value of the "oc" 830 parameter to a value that it applies to requests in the first 831 category. As a simple example, if "oc=10" and 40% of the requests 832 should be included in the first category, then: 834 10 / 40 * 100 = 25 836 Or, 25% of the requests in the first category can be reduced to get 837 an overall reduction of 10%. The client uses random discard to 838 achieve the 25% reduction of messages in the first category. 839 Messages in the second category proceed downstream unscathed. To 840 affect the 25% reduction rate from the first category, the client 841 draws a random number between 1 and 100 for the request picked from 842 the first category. If the random number is less than or equal to 843 converted value of the "oc" parameter, the request is not forwarded; 844 otherwise the request is forwarded. 846 A reference algorithm is shown below. 848 cat1 := 80.0 // Category 1 --- subject to reduction 849 cat2 := 100.0 - cat1 // Category 2 --- Under normal operations 850 // only subject to reduction after category 1 is exhausted. 851 // Note that the above ratio is simply a reasonable default. 852 // The actual values will change through periodic sampling 853 // as the traffic mix changes over time. 855 while (true) { 856 // We're modeling message processing as a single work queue 857 // that contains both incoming and outgoing messages. 858 sip_msg := get_next_message_from_work_queue() 859 update_mix(cat1, cat2) // See Note below 861 switch (sip_msg.type) { 863 case outbound request: 864 destination := get_next_hop(sip_msg) 865 oc_context := get_oc_context(destination) 867 if (oc_context == null) { 868 send_to_network(sip_msg) // Process it normally by sending the 869 // request to the next hop since this particular destination 870 // is not subject to overload 871 } 872 else { 873 // Determine if server wants to enter in overload or is in 874 // overload 875 in_oc := extract_in_oc(oc_context) 877 oc_value := extract_oc(oc_context) 878 oc_validity := extract_oc_validity(oc_context) 880 if (in_oc == false or oc_validity is not in effect) { 881 send_to_network(sip_msg) // Process it normally by sending 882 // the request to the next hop since this particular 883 // destination is not subject to overload. Optionally, 884 // clear the oc context for this server (not shown). 885 } 886 else { // Begin perform overload control 887 r := random() 888 drop_msg := false 890 category := assign_msg_to_category(sip_msg) 892 pct_to_reduce_cat1 = oc_value / cat1 * 100 894 if (oc_value <= cat1) { // Reduce all msgs from category 1 895 if (r <= pct_to_reduce_cat1 && category == cat1) { 896 drop_msg := true 897 } 898 } 899 else { // oc_value > category 1. Reduce 100% of msgs from 900 // category 1 and remaining from category 2. 901 pct_to_reduce_cat2 = (oc_value - cat1) / cat2 * 100 902 if (category == cat1) { 903 drop_msg := true 904 } 905 else { 906 if (r <= pct_to_reduce_cat2) { 907 drop_msg := true; 908 } 909 } 910 } 912 if (drop_msg == false) { 913 send_to_network(sip_msg) // Process it normally by 914 // sending the request to the next hop 915 } 916 else { 917 // Do not send request downstream, handle locally by 918 // generating response (if a proxy) or treating as 919 // an error (if a user agent). 920 } 922 } // End perform overload control 923 } 925 end case // outbound request 927 case outbound response: 928 if (we are in overload) { 929 add_overload_parameters(sip_msg) 930 } 931 send_to_network(sip_msg) 933 end case // outbound response 935 case inbound response: 937 if (sip_msg has oc parameter values) { 938 create_or_update_oc_context() // For the specific server 939 // that sent the response, create or update the oc context; 940 // i.e., extract the values of the oc-related parameters 941 // and store them for later use. 942 } 943 process_msg(sip_msg) 945 end case // inbound response 946 case inbound request: 948 if (we are not in overload) { 949 process_msg(sip_msg) 950 } 951 else { // We are in overload 952 if (sip_msg has oc parameters) { // Upstream client supports 953 process_msg(sip_msg) // oc; only sends important requests 954 } 955 else { // Upstream client does not support oc 956 if (local_policy(sip_msg) says process message) { 957 process_msg(sip_msg) 958 } 959 else { 960 send_response(sip_msg, 503) 961 } 962 } 963 } 964 end case // inbound request 965 } 966 } 968 Note: A simple way to sample the traffic mix for category 1 and 969 category 2 is to associate a counter with each category of message. 970 Periodically (every 5-10s) get the value of the counters and calculate 971 the ratio of category 1 messages to category 2 messages since the 972 last calculation. 974 Example: In the last 5 seconds, a total of 500 requests arrived 975 at the queue. 450 out of the 500 were messages subject 976 to reduction and 50 out of 500 were classified as requests not 977 subject to reduction. Based on this ratio, cat1 := 90 and 978 cat2 := 10, so a 90/10 mix will be used in overload calculations. 980 7. Relationship with other IETF SIP load control efforts 982 The overload control mechanism described in this document is reactive 983 in nature and apart from message prioritization directives listed in 984 Section 5.10.1 the mechanisms described in this draft will not 985 discriminate requests based on user identity, filtering action and 986 arrival time. SIP networks that require pro-active overload control 987 mechanisms can upload user-level load control filters as described in 988 [I-D.ietf-soc-load-control-event-package]. Local policy will also 989 dictate the precedence of different overload control mechanisms 990 applied to the traffic. Specifically, in a scenario where load 991 control filters are installed by signaling neighbours [I-D.ietf-soc- 992 load-control-event-package] and the same traffic can also be 993 throttled using the overload control mechanism, local policy will 994 dictate which of these schemes shall be given precedence. 995 Interactions between the two schemes are out of scope for this 996 document. 998 8. Syntax 1000 This specification extends the existing definition of the Via header 1001 field parameters of [RFC3261] as follows: 1003 via-params = via-ttl / via-maddr 1004 / via-received / via-branch 1005 / oc / oc-validity 1006 / oc-seq / oc-algo / via-extension 1008 oc = "oc" [EQUAL oc-num] 1009 oc-num = 1*DIGIT 1010 oc-validity = "oc-validity" [EQUAL delta-ms] 1011 oc-seq = "oc-seq" EQUAL 1*12DIGIT "." 1*5DIGIT 1012 oc-algo = "oc-algo" EQUAL DQUOTE algo-list *(COMMA algo-list) 1013 DQUOTE 1014 algo-list = "loss" / *(other-algo) 1015 other-algo = %x41-5A / %x61-7A / %x30-39 1016 delta-ms = 1*DIGIT 1018 9. Design Considerations 1020 This section discusses specific design considerations for the 1021 mechanism described in this document. General design considerations 1022 for SIP overload control can be found in [RFC6357]. 1024 9.1. SIP Mechanism 1026 A SIP mechanism is needed to convey overload feedback from the 1027 receiving to the sending SIP entity. A number of different 1028 alternatives exist to implement such a mechanism. 1030 9.1.1. SIP Response Header 1032 Overload control information can be transmitted using a new Via 1033 header field parameter for overload control. A SIP server can add 1034 this header parameter to the responses it is sending upstream to 1035 provide overload control feedback to its upstream neighbors. This 1036 approach has the following characteristics: 1038 o A Via header parameter is light-weight and creates very little 1039 overhead. It does not require the transmission of additional 1040 messages for overload control and does not increase traffic or 1041 processing burdens in an overload situation. 1042 o Overload control status can frequently be reported to upstream 1043 neighbors since it is a part of a SIP response. This enables the 1044 use of this mechanism in scenarios where the overload status needs 1045 to be adjusted frequently. It also enables the use of overload 1046 control mechanisms that use regular feedback such as window-based 1047 overload control. 1048 o With a Via header parameter, overload control status is inherent 1049 in SIP signaling and is automatically conveyed to all relevant 1050 upstream neighbors, i.e., neighbors that are currently 1051 contributing traffic. There is no need for a SIP server to 1052 specifically track and manage the set of current upstream or 1053 downstream neighbors with which it should exchange overload 1054 feedback. 1055 o Overload status is not conveyed to inactive senders. This avoids 1056 the transmission of overload feedback to inactive senders, which 1057 do not contribute traffic. If an inactive sender starts to 1058 transmit while the receiver is in overload it will receive 1059 overload feedback in the first response and can adjust the amount 1060 of traffic forwarded accordingly. 1061 o A SIP server can limit the distribution of overload control 1062 information by only inserting it into responses to known upstream 1063 neighbors. A SIP server can use transport level authentication 1064 (e.g., via TLS) with its upstream neighbors. 1066 9.1.2. SIP Event Package 1068 Overload control information can also be conveyed from a receiver to 1069 a sender using a new event package. Such an event package enables a 1070 sending entity to subscribe to the overload status of its downstream 1071 neighbors and receive notifications of overload control status 1072 changes in NOTIFY requests. This approach has the following 1073 characteristics: 1075 o Overload control information is conveyed decoupled from SIP 1076 signaling. It enables an overload control manager, which is a 1077 separate entity, to monitor the load on other servers and provide 1078 overload control feedback to all SIP servers that have set up 1079 subscriptions with the controller. 1080 o With an event package, a receiver can send updates to senders that 1081 are currently inactive. Inactive senders will receive a 1082 notification about the overload and can refrain from sending 1083 traffic to this neighbor until the overload condition is resolved. 1084 The receiver can also notify all potential senders once they are 1085 permitted to send traffic again. However, these notifications do 1086 generate additional traffic, which adds to the overall load. 1087 o A SIP entity needs to set up and maintain overload control 1088 subscriptions with all upstream and downstream neighbors. A new 1089 subscription needs to be set up before/while a request is 1090 transmitted to a new downstream neighbor. Servers can be 1091 configured to subscribe at boot time. However, this would require 1092 additional protection to avoid the avalanche restart problem for 1093 overload control. Subscriptions need to be terminated when they 1094 are not needed any more, which can be done, for example, using a 1095 timeout mechanism. 1096 o A receiver needs to send NOTIFY messages to all subscribed 1097 upstream neighbors in a timely manner when the control algorithm 1098 requires a change in the control variable (e.g., when a SIP server 1099 is in an overload condition). This includes active as well as 1100 inactive neighbors. These NOTIFYs add to the amount of traffic 1101 that needs to be processed. To ensure that these requests will 1102 not be dropped due to overload, a priority mechanism needs to be 1103 implemented in all servers these request will pass through. 1104 o As overload feedback is sent to all senders in separate messages, 1105 this mechanism is not suitable when frequent overload control 1106 feedback is needed. 1107 o A SIP server can limit the set of senders that can receive 1108 overload control information by authenticating subscriptions to 1109 this event package. 1110 o This approach requires each proxy to implement user agent 1111 functionality (UAS and UAC) to manage the subscriptions. 1113 9.2. Backwards Compatibility 1115 An new overload control mechanism needs to be backwards compatible so 1116 that it can be gradually introduced into a network and functions 1117 properly if only a fraction of the servers support it. 1119 Hop-by-hop overload control (see [RFC6357]) has the advantage that it 1120 does not require that all SIP entities in a network support it. It 1121 can be used effectively between two adjacent SIP servers if both 1122 servers support overload control and does not depend on the support 1123 from any other server or user agent. The more SIP servers in a 1124 network support hop-by-hop overload control, the better protected the 1125 network is against occurrences of overload. 1127 A SIP server may have multiple upstream neighbors from which only 1128 some may support overload control. If a server would simply use this 1129 overload control mechanism, only those that support it would reduce 1130 traffic. Others would keep sending at the full rate and benefit from 1131 the throttling by the servers that support overload control. In 1132 other words, upstream neighbors that do not support overload control 1133 would be better off than those that do. 1135 A SIP server should therefore follow the behaviour outlined in 1136 Section 5.10.2 to handle clients that do not support overload 1137 control. 1139 10. Security Considerations 1141 Overload control mechanisms can be used by an attacker to conduct a 1142 denial-of-service attack on a SIP entity if the attacker can pretend 1143 that the SIP entity is overloaded. When such a forged overload 1144 indication is received by an upstream SIP client, it will stop 1145 sending traffic to the victim. Thus, the victim is subject to a 1146 denial-of-service attack. 1148 An attacker can create forged overload feedback by inserting itself 1149 into the communication between the victim and its upstream neighbors. 1150 The attacker would need to add overload feedback indicating a high 1151 load to the responses passed from the victim to its upstream 1152 neighbor. Proxies can prevent this attack by communicating via TLS. 1153 Since overload feedback has no meaning beyond the next hop, there is 1154 no need to secure the communication over multiple hops. 1156 Another way to conduct an attack is to send a message containing a 1157 high overload feedback value through a proxy that does not support 1158 this extension. If this feedback is added to the second Via headers 1159 (or all Via headers), it will reach the next upstream proxy. If the 1160 attacker can make the recipient believe that the overload status was 1161 created by its direct downstream neighbor (and not by the attacker 1162 further downstream) the recipient stops sending traffic to the 1163 victim. A precondition for this attack is that the victim proxy does 1164 not support this extension since it would not pass through overload 1165 control feedback otherwise. 1167 A malicious SIP entity could gain an advantage by pretending to 1168 support this specification but never reducing the amount of traffic 1169 it forwards to the downstream neighbor. If its downstream neighbor 1170 receives traffic from multiple sources which correctly implement 1171 overload control, the malicious SIP entity would benefit since all 1172 other sources to its downstream neighbor would reduce load. 1174 The solution to this problem depends on the overload control 1175 method. For rate-based and window-based overload control, it is 1176 very easy for a downstream entity to monitor if the upstream 1177 neighbor throttles traffic forwarded as directed. For percentage 1178 throttling this is not always obvious since the load forwarded 1179 depends on the load received by the upstream neighbor. 1181 11. IANA Considerations 1183 This specification defines four new Via header parameters as detailed 1184 below in the "Header Field Parameter and Parameter Values" sub- 1185 registry as per the registry created by [RFC3968]. The required 1186 information is: 1188 Header Field Parameter Name Predefined Values Reference 1189 __________________________________________________________ 1190 Via oc Yes RFCXXXX 1191 Via oc-validity Yes RFCXXXX 1192 Via oc-seq Yes RFCXXXX 1193 Via oc-algo Yes RFCXXXX 1195 RFC XXXX [NOTE TO RFC-EDITOR: Please replace with final RFC 1196 number of this specification.] 1198 12. References 1200 12.1. Normative References 1202 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1203 Requirement Levels", BCP 14, RFC 2119, March 1997. 1205 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1206 A., Peterson, J., Sparks, R., Handley, M., and E. 1207 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1208 June 2002. 1210 [RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation 1211 Protocol (SIP): Locating SIP Servers", RFC 3263, 1212 June 2002. 1214 [RFC3968] Camarillo, G., "The Internet Assigned Number Authority 1215 (IANA) Header Field Parameter Registry for the Session 1216 Initiation Protocol (SIP)", BCP 98, RFC 3968, 1217 December 2004. 1219 [RFC4412] Schulzrinne, H. and J. Polk, "Communications Resource 1220 Priority for the Session Initiation Protocol (SIP)", 1221 RFC 4412, February 2006. 1223 12.2. Informative References 1225 [I-D.ietf-soc-load-control-event-package] 1226 Shen, C., Schulzrinne, H., and A. Koike, "A Session 1227 Initiation Protocol (SIP) Load Control Event Package", 1228 draft-ietf-soc-load-control-event-package-05 (work in 1229 progress), October 2012. 1231 [I-D.ietf-soc-overload-rate-control] 1232 Noel, E. and P. Williams, "Session Initiation Protocol 1233 (SIP) Rate Control", 1234 draft-ietf-soc-overload-rate-control-03 (work in 1235 progress), October 2012. 1237 [RFC5031] Schulzrinne, H., "A Uniform Resource Name (URN) for 1238 Emergency and Other Well-Known Services", RFC 5031, 1239 January 2008. 1241 [RFC5390] Rosenberg, J., "Requirements for Management of Overload in 1242 the Session Initiation Protocol", RFC 5390, December 2008. 1244 [RFC6357] Hilt, V., Noel, E., Shen, C., and A. Abdelal, "Design 1245 Considerations for Session Initiation Protocol (SIP) 1246 Overload Control", RFC 6357, August 2011. 1248 Appendix A. Acknowledgements 1250 The authors acknowledge the contributions of Bruno Chatras, Keith 1251 Drage, Janet Gunn, Rich Terpstra, Daryl Malas, R. Parthasarathi, 1252 Antoine Roly, Jonathan Rosenberg, Charles Shen, Rahul Srivastava, 1253 Padma Valluri, Shaun Bharrat, Paul Kyzivat and Jeroen Van Bemmel to 1254 this document. 1256 Adam Roach and Eric McMurry helped flesh out the different cases for 1257 handling SIP messages described in the algorithm of Section 6.3. 1258 Janet Gunn reviewed the algorithm and suggested changes that lead to 1259 simpler processing for the case where "oc_value > cat1". 1261 Appendix B. RFC5390 requirements 1263 Table 1 provides a summary how this specification fulfills the 1264 requirements of [RFC5390]. A more detailed view on how each 1265 requirements is fulfilled is provided after the table. 1267 +-------------+-------------------+ 1268 | Requirement | Meets requirement | 1269 +-------------+-------------------+ 1270 | REQ 1 | Yes | 1271 | REQ 2 | Yes | 1272 | REQ 3 | Partially | 1273 | REQ 4 | Partially | 1274 | REQ 5 | Partially | 1275 | REQ 6 | Not applicable | 1276 | REQ 7 | Yes | 1277 | REQ 8 | Partially | 1278 | REQ 9 | Yes | 1279 | REQ 10 | Yes | 1280 | REQ 11 | Yes | 1281 | REQ 12 | Yes | 1282 | REQ 13 | Yes | 1283 | REQ 14 | Yes | 1284 | REQ 15 | Yes | 1285 | REQ 16 | Yes | 1286 | REQ 17 | Partially | 1287 | REQ 18 | Yes | 1288 | REQ 19 | Yes | 1289 | REQ 20 | Yes | 1290 | REQ 21 | Yes | 1291 | REQ 22 | Yes | 1292 | REQ 23 | Yes | 1293 +-------------+-------------------+ 1295 Summary of meeting requirements in RFC5390 1297 Table 1 1299 REQ 1: The overload mechanism shall strive to maintain the overall 1300 useful throughput (taking into consideration the quality-of-service 1301 needs of the using applications) of a SIP server at reasonable 1302 levels, even when the incoming load on the network is far in excess 1303 of its capacity. The overall throughput under load is the ultimate 1304 measure of the value of an overload control mechanism. 1306 Meeting REQ 1: Yes, the overload control mechanism allows an 1307 overloaded SIP server to maintain a reasonable level of throughput as 1308 it enters into congestion mode by requesting the upstream clients to 1309 reduce traffic destined downstream. 1311 REQ 2: When a single network element fails, goes into overload, or 1312 suffers from reduced processing capacity, the mechanism should strive 1313 to limit the impact of this on other elements in the network. This 1314 helps to prevent a small-scale failure from becoming a widespread 1315 outage. 1317 Meeting REQ 2: Yes. When a SIP server enters overload mode, it will 1318 request the upstream clients to throttle the traffic destined to it. 1319 As a consequence of this, the overloaded SIP server will itself 1320 generate proportionally less downstream traffic, thereby limiting the 1321 impact on other elements in the network. 1323 REQ 3: The mechanism should seek to minimize the amount of 1324 configuration required in order to work. For example, it is better 1325 to avoid needing to configure a server with its SIP message 1326 throughput, as these kinds of quantities are hard to determine. 1328 Meeting REQ 3: Partially. On the server side, the overload condition 1329 is determined monitoring S (c.f., Section 4 of [RFC6357]) and 1330 reporting a load feedback F as a value to the "oc" parameter. On the 1331 client side, a throttle T is applied to requests going downstream 1332 based on F. This specification does not prescribe any value for S, 1333 nor a particular value for F. The "oc-algo" parameter allows for 1334 automatic convergence to a particular class of overload control 1335 algorithm. There are suggested default values for the "oc-validity" 1336 parameter. 1338 REQ 4: The mechanism must be capable of dealing with elements that do 1339 not support it, so that a network can consist of a mix of elements 1340 that do and don't support it. In other words, the mechanism should 1341 not work only in environments where all elements support it. It is 1342 reasonable to assume that it works better in such environments, of 1343 course. Ideally, there should be incremental improvements in overall 1344 network throughput as increasing numbers of elements in the network 1345 support the mechanism. 1347 Meeting REQ 4: Partially. The mechanism is designed to reduce 1348 congestion when a pair of communicating entities support it. If a 1349 downstream overloaded SIP server does not respond to a request in 1350 time, a SIP client will attempt to reduce traffic destined towards 1351 the non-responsive server as outlined in Section 5.9. 1353 REQ 5: The mechanism should not assume that it will only be deployed 1354 in environments with completely trusted elements. It should seek to 1355 operate as effectively as possible in environments where other 1356 elements are malicious; this includes preventing malicious elements 1357 from obtaining more than a fair share of service. 1359 Meeting REQ 5: Partially. Since overload control information is 1360 shared between a pair of communicating entities, a confidential and 1361 authenticated channel can be used for this communication. However, 1362 if such a channel is not available, then the security ramifications 1363 outlined in Section 10 apply. 1365 REQ 6: When overload is signaled by means of a specific message, the 1366 message must clearly indicate that it is being sent because of 1367 overload, as opposed to other, non overload-based failure conditions. 1368 This requirement is meant to avoid some of the problems that have 1369 arisen from the reuse of the 503 response code for multiple purposes. 1370 Of course, overload is also signaled by lack of response to requests. 1371 This requirement applies only to explicit overload signals. 1373 Meeting REQ 6: Not applicable. Overload control information is 1374 signaled as part of the Via header and not in a new header. 1376 REQ 7: The mechanism shall provide a way for an element to throttle 1377 the amount of traffic it receives from an upstream element. This 1378 throttling shall be graded so that it is not all- or-nothing as with 1379 the current 503 mechanism. This recognizes the fact that "overload" 1380 is not a binary state and that there are degrees of overload. 1382 Meeting REQ 7: Yes, please see Section 5.5 and Section 5.10. 1384 REQ 8: The mechanism shall ensure that, when a request was not 1385 processed successfully due to overload (or failure) of a downstream 1386 element, the request will not be retried on another element that is 1387 also overloaded or whose status is unknown. This requirement derives 1388 from REQ 1. 1390 Meeting REQ 8: Partially. A SIP client that has overload information 1391 from multiple downstream servers will not retry the request on 1392 another element. However, if a SIP client does not know the overload 1393 status of a downstream server, it may send the request to that 1394 server. 1396 REQ 9: That a request has been rejected from an overloaded element 1397 shall not unduly restrict the ability of that request to be submitted 1398 to and processed by an element that is not overloaded. This 1399 requirement derives from REQ 1. 1401 Meeting REQ 9: Yes, a SIP client conformant to this specification 1402 will send the request to a different element. 1404 REQ 10: The mechanism should support servers that receive requests 1405 from a large number of different upstream elements, where the set of 1406 upstream elements is not enumerable. 1408 Meeting REQ 10: Yes, there are no constraints on the number of 1409 upstream clients. 1411 REQ 11: The mechanism should support servers that receive requests 1412 from a finite set of upstream elements, where the set of upstream 1413 elements is enumerable. 1415 Meeting REQ 11: Yes, there are no constraints on the number of 1416 upstream clients. 1418 REQ 12: The mechanism should work between servers in different 1419 domains. 1421 Meeting REQ 12: Yes, there are no inherent limitations on using 1422 overload control between domains. 1424 REQ 13: The mechanism must not dictate a specific algorithm for 1425 prioritizing the processing of work within a proxy during times of 1426 overload. It must permit a proxy to prioritize requests based on any 1427 local policy, so that certain ones (such as a call for emergency 1428 services or a call with a specific value of the Resource-Priority 1429 header field [RFC4412]) are given preferential treatment, such as not 1430 being dropped, being given additional retransmission, or being 1431 processed ahead of others. 1433 Meeting REQ 13: Yes, please see Section 5.10. 1435 REQ 14: REQ 14: The mechanism should provide unambiguous directions 1436 to clients on when they should retry a request and when they should 1437 not. This especially applies to TCP connection establishment and SIP 1438 registrations, in order to mitigate against avalanche restart. 1440 Meeting REQ 14: 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 15: In cases where a network element fails, is so overloaded that 1446 it cannot process messages, or cannot communicate due to a network 1447 failure or network partition, it will not be able to provide explicit 1448 indications of the nature of the failure or its levels of congestion. 1449 The mechanism must properly function in these cases. 1451 Meeting REQ 15: 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 16: The mechanism should attempt to minimize the overhead of the 1457 overload control messaging. 1459 Meeting REQ 16: Yes, overload control messages are sent in the 1460 topmost Via header, which is always processed by the SIP elements. 1462 REQ 17: The overload mechanism must not provide an avenue for 1463 malicious attack, including DoS and DDoS attacks. 1465 Meeting REQ 17: Partially. Since overload control information is 1466 shared between a pair of communicating entities, a confidential and 1467 authenticated channel can be used for this communication. However, 1468 if such a channel is not available, then the security ramifications 1469 outlined in Section 10 apply. 1471 REQ 18: The overload mechanism should be unambiguous about whether a 1472 load indication applies to a specific IP address, host, or URI, so 1473 that an upstream element can determine the load of the entity to 1474 which a request is to be sent. 1476 Meeting REQ 18: Yes, please see discussion in Section 5.5. 1478 REQ 19: The specification for the overload mechanism should give 1479 guidance on which message types might be desirable to process over 1480 others during times of overload, based on SIP-specific 1481 considerations. For example, it may be more beneficial to process a 1482 SUBSCRIBE refresh with Expires of zero than a SUBSCRIBE refresh with 1483 a non-zero expiration (since the former reduces the overall amount of 1484 load on the element), or to process re-INVITEs over new INVITEs. 1486 Meeting REQ 19: Yes, please see Section 5.10. 1488 REQ 20: In a mixed environment of elements that do and do not 1489 implement the overload mechanism, no disproportionate benefit shall 1490 accrue to the users or operators of the elements that do not 1491 implement the mechanism. 1493 Meeting REQ 20: Yes, an element that does not implement overload 1494 control does not receive any measure of extra benefit. 1496 REQ 21: The overload mechanism should ensure that the system remains 1497 stable. When the offered load drops from above the overall capacity 1498 of the network to below the overall capacity, the throughput should 1499 stabilize and become equal to the offered load. 1501 Meeting REQ 21: Yes, the overload control mechanism described in this 1502 draft ensures the stability of the system. 1504 REQ 22: It must be possible to disable the reporting of load 1505 information towards upstream targets based on the identity of those 1506 targets. This allows a domain administrator who considers the load 1507 of their elements to be sensitive information, to restrict access to 1508 that information. Of course, in such cases, there is no expectation 1509 that the overload mechanism itself will help prevent overload from 1510 that upstream target. 1512 Meeting REQ 22: Yes, an operator of a SIP server can configure the 1513 SIP server to only report overload control information for requests 1514 received over a confidential channel, for example. However, note 1515 that this requirement is in conflict with REQ 3, as it introduces a 1516 modicum of extra configuration. 1518 REQ 23: It must be possible for the overload mechanism to work in 1519 cases where there is a load balancer in front of a farm of proxies. 1521 Meeting REQ 23: Yes. Depending on the type of load balancer, this 1522 requirement is met. A load balancer fronting a farm of SIP proxies 1523 could be a SIP-aware load balancer or one that is not SIP-aware. If 1524 the load balancer is SIP-aware, it can make conscious decisions on 1525 throttling outgoing traffic towards the individual server in the farm 1526 based on the overload control parameters returned by the server. On 1527 the other hand, if the load balancer is not SIP-aware, then there are 1528 other strategies to perform overload control. Section 6 of [RFC6357] 1529 documents some of these strategies in more detail (see discussion 1530 related to Figure 3(a) in Section 6). 1532 Authors' Addresses 1534 Vijay K. Gurbani (editor) 1535 Bell Laboratories, Alcatel-Lucent 1536 1960 Lucent Lane, Rm 9C-533 1537 Naperville, IL 60563 1538 USA 1540 Email: vkg@bell-labs.com 1542 Volker Hilt 1543 Bell Laboratories, Alcatel-Lucent 1544 791 Holmdel-Keyport Rd 1545 Holmdel, NJ 07733 1546 USA 1548 Email: volkerh@bell-labs.com 1549 Henning Schulzrinne 1550 Columbia University/Department of Computer Science 1551 450 Computer Science Building 1552 New York, NY 10027 1553 USA 1555 Phone: +1 212 939 7004 1556 Email: hgs@cs.columbia.edu 1557 URI: http://www.cs.columbia.edu