idnits 2.17.1 draft-ietf-soc-overload-control-09.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 670 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 (July 6, 2012) is 4305 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 715 -- Looks like a reference, but probably isn't: '100' on line 715 == Outdated reference: A later version (-13) exists of draft-ietf-soc-load-control-event-package-03 == Outdated reference: A later version (-10) exists of draft-ietf-soc-overload-rate-control-02 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: January 7, 2013 H. Schulzrinne 6 Columbia University 7 July 6, 2012 9 Session Initiation Protocol (SIP) Overload Control 10 draft-ietf-soc-overload-control-09 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 January 7, 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. Handshake to determine 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 . . . . . . . . 11 70 5.5. Using the Overload Control Parameter Values . . . . . . . 12 71 5.6. Forwarding the overload control parameters . . . . . . . . 12 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 . . . . . . . . . . . . . . . . . . 14 78 5.10.2. Rejecting requests at an overloaded server . . . . . 15 79 5.11. 100-Trying provisional response and overload control 80 parameters . . . . . . . . . . . . . . . . . . . . . . . . 15 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 . . . . . . . . . . . . . . . . . . . . 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 best performed hop-by-hop, the Via 189 parameter is attractive since it allows two adjacent SIP entities to 190 indicate support for, and exchange information associated with 191 overload 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 the 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. Inclusion of a value to the parameter 228 represents two things: one, upon an initial handshake (see 229 Section 5.1), addition of a value by the server to this parameter 230 indicates (to the client) that the downstream server supports 231 overload control as defined in this document. Second, if overload 232 control is active, then it indicates the level of control to be 233 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 the SIP request with a default value of 248 "loss". 250 This parameter contains one or more overload control algorithms. A 251 SIP client MUST support the loss-based overload control scheme and 252 MUST insert the token "loss" as the "oc-algo" parameter value. In 253 addition, the SIP client MAY insert other tokens, separated by a 254 comma, in the "oc-algo" parameter if it supports other overload 255 control schemes such as a rate-based scheme 256 ([I-D.ietf-soc-overload-rate-control]). Each element in the comma- 257 separated list corresponds to the class of overload control 258 algorithms supported by the SIP client. When more than one class of 259 overload control algorithms is present in the "oc-algo" parameter, 260 the client may indicate algorithm preference by ordering the list in 261 a decreasing order of preference. However, the client must not 262 assume that the server will pick the most preferred algorithm. 264 When a downstream SIP server receives a request with multiple 265 overload control algorithms specified in the "oc-algo" parameter 266 (optionally sorted by decreasing order of preference), it MUST choose 267 one algorithm from the list and MUST pare the list down to include 268 the one chosen algorithm. The pared down list consisting of the 269 chosen algorithm MUST be returned to the upstream SIP client in the 270 response. 272 Once a SIP client and a SIP server have converged to a mutually 273 agreeable class of overload control algorithm, the agreed upon class 274 stays in effect for a non-trivial duration of time to allow the 275 overload control algorithm to stabilize its behaviour (see 276 Section 5.8). Furthermore, the client MUST continue to include all 277 supported algorithms in subsequent requests; the server MUST respond 278 with the agreed to algorithm until such time that the algorithm is 279 changed by the server (see Section 5.8). 281 4.3. The oc-validity parameter 283 This parameter is inserted by the SIP server. 285 This parameter contains a value that indicates an interval of time 286 (measured in milliseconds) that the load reduction specified value of 287 the "oc" parameter should be in effect. The default value of the 288 "oc-validity" parameter is 500 (millisecond). 290 A value of 0 in the "oc-validity" parameter is reserved to denote the 291 event that the server wishes to stop overload control (see 292 Section 5.7 for more information). 294 A non-zero value for the "oc-validity" parameter MUST only be present 295 in conjunction with an "oc" parameter. A SIP client MUST discard a 296 non-zero value of the "oc-validity" parameter if the client receives 297 it in a response without the corresponding "oc" parameter being 298 present as well. 300 When the period during which the load reduction is in effect expires, 301 the SIP client MUST NOT accord any special meaning to the value of 302 "oc", "oc-seq" and "oc-algo" parameters. 304 4.4. The oc-seq parameter 306 This parameter is inserted by the SIP server. 308 This parameter contains a value that indicates the sequence number 309 associated with the "oc" parameter. This sequence number is used to 310 differentiate two "oc" parameter values generated by an overload 311 control algorithm at two different instants in time. "oc" parameter 312 values generated by an overload control algorithm at time t and t+1 313 MUST have an increasing value in the "oc-seq" parameter. This allows 314 the upstream SIP client to properly collate out-of-order responses. 316 A timestamp can be used as a value of the "oc-seq" parameter. 318 If the value contained in "oc-seq" parameter overflows during the 319 period in which the load reduction is in effect, then the "oc-seq" 320 parameter MUST be reset to the current timestamp or an appropriate 321 base value. 323 5. General behaviour 325 When forwarding a SIP request, a SIP client uses the SIP procedures 326 of [RFC3263] to determine the next hop SIP server. The procedures of 327 [RFC3263] take as input a SIP URI, extract the domain portion of that 328 URI for use as a lookup key, and query the Domain Name Service (DNS) 329 to obtain an ordered set of one or more IP addresses with a port 330 number and transport corresponding to each IP address in this set 331 (the "Expected Output"). 333 After selecting a specific SIP server from the Expected Output, a SIP 334 client MUST determine if it is operating under overload control mode 335 with the server (see Section 5.5) or if this is the initial contact 336 with the server. 338 If the client determines that this is the initial contact with the 339 server, it follows the steps outlined in the first paragraph of 340 Section 5.1. Otherwise, the client has conversed with this server 341 before and any overload control parameters established during the 342 previous exchange remain in effect. 344 5.1. Handshake to determine support for overload control 346 If a client determines that this is the initial contact with the 347 server, the client MUST insert the "oc" parameter without any value, 348 and MUST insert the "oc-algo" parameter with a list of algorithms it 349 supports. This list MUST include "loss" and MAY include other 350 algorithm names approved by IANA and described in corresponding 351 documents. The client transmits the request to the chosen server. 353 A server that supports overload control MUST choose one algorithm 354 from the list of algorithms in the "oc-algo" parameter. It MUST put 355 the chosen algorithm as the sole parameter value in the "oc-algo" 356 parameter of the response it sends to the client. In addition, if 357 the server is currently not in an overload condition, it MUST set the 358 value of the "oc" parameter to be 0 and MAY insert an "oc-validity=0" 359 parameter in the response to further qualify the value in the "oc" 360 parameter. If the server is currently overloaded, it MUST follow the 361 procedures of Section 5.2. 363 A client that supports the rate-based overload control scheme 364 [I-D.ietf-soc-overload-rate-control] will consider "oc=0" as an 365 indication not to send any requests downstream at all. Thus, when 366 the server inserts "oc-validity=0" as well, it is indicating that 367 it does support overload control, but it is not under overload 368 mode right now (see Section 5.7). 370 5.2. Creating and updating the overload control parameters 372 A SIP server provides overload control feedback to its upstream 373 clients by providing a value for the "oc" parameter to the topmost 374 Via header field of a SIP response, that is, the Via header added by 375 the client before it sent the request to the server. 377 Since the topmost Via header of a response will be removed by an 378 upstream client after processing it, overload control feedback 379 contained in the "oc" parameter will not travel beyond the upstream 380 SIP client. A Via header parameter therefore provides hop-by-hop 381 semantics for overload control feedback (see [RFC6357]) even if the 382 next hop neighbor does not support this specification. 384 The "oc" parameter can be used in all response types, including 385 provisional, success and failure responses (please see Section 5.11 386 for special consideration on transporting overload control parameters 387 in a 100-Trying response). A SIP server MAY update the "oc" 388 parameter in all responses it is sending. A SIP server MUST update 389 the "oc" parameter to responses when the transmission of overload 390 control feedback is required by the overload control algorithm to 391 limit the traffic received by the server. I.e., a SIP server MUST 392 update the "oc" parameter when the overload control algorithm sets 393 the value of an "oc" parameter to a value different than the default 394 value. 396 A SIP server that has updated the "oc" parameter to Via header SHOULD 397 also add a "oc-validity" parameter to the same Via header. The "oc- 398 validity" parameter defines the time in milliseconds during which the 399 the overload control feedback specified in the "oc" parameter is 400 valid. The default value of the "oc-validity" parameter is 500 401 (millisecond). A SIP server SHOULD specify an "oc-validity" time 402 that prevents the "oc" value from timing out before the next response 403 is sent and allows clients to discard stale "oc" values if they have 404 not communicated with a server for some time. If the "oc-validity" 405 parameter is not present, its default value is used. The "oc- 406 validity" parameter MUST NOT be used in a Via header that did not 407 originally contain an "oc" parameter when received. 409 When a SIP server retransmits a response, it SHOULD use the "oc" 410 parameter value and "oc-validity" parameter value consistent with the 411 overload state at the time the retransmitted response is sent. This 412 implies that the values in the "oc" and "oc-validity" parameters may 413 be different then the ones used in previous retransmissions of the 414 response. Due to the fact that responses sent over UDP may be 415 subject to delays in the network and arrive out of order, the "oc- 416 seq" parameter aids in detecting a stale "oc" parameter value. 418 Implementations that are capable of updating the "oc" and "oc- 419 validity" parameter values for retransmissions MUST insert the "oc- 420 seq" parameter. The value of this parameter MUST be a set of numbers 421 drawn from an increasing sequence. 423 Implementations that are not capable of updating the "oc" and "oc- 424 validity" parameter values for retransmissions --- or implementations 425 that do not want to do so because they will have to regenerate the 426 message to be retransmitted --- MUST still insert a "oc-seq" 427 parameter in the first response associated with a transaction; 428 however, they do not have to update the value in subsequent 429 retransmissions. 431 The "oc-validity" and "oc-seq" Via header parameters are only defined 432 in SIP responses and MUST NOT be used in SIP requests. These 433 parameters are only useful to the upstream neighbor of a SIP server 434 (i.e., the entity that is sending requests to the SIP server) since 435 this is the entity that can offload traffic by redirecting/rejecting 436 new requests. If requests are forwarded in both directions between 437 two SIP servers (i.e., the roles of upstream/downstream neighbors 438 change), there are also responses flowing in both directions. Thus, 439 both SIP servers can exchange overload information. 441 Since overload control protects a SIP server from overload, it is 442 RECOMMENDED that a SIP server uses the mechanisms described in this 443 specification. However, if a SIP server wanted to limit its overload 444 control capability for privacy reasons, it MAY decide to perform 445 overload control only for requests that are received on a secure 446 transport channel, such as TLS. This enables a SIP server to protect 447 overload control information and ensure that it is only visible to 448 trusted parties. 450 5.3. Determining the 'oc' Parameter Value 452 The value of the "oc" parameter is determined by the overloaded 453 server using any pertinent information at its disposal. The only 454 constraint imposed by this document is that the server control 455 algorithm MUST produce a value for the "oc" parameter such that the 456 receiving clients can apply it to all downstream requests (dialogue 457 forming as well as in-dialogue). Beyond this stipulation, the 458 process by which an overloaded server determines the value of the 459 "oc" parameter is considered out of scope for this document. 461 Note that this stipulation is required so that both the and server 462 have an common view of which messages to include in the 463 calculation of the feedback. With this stipulation in place, the 464 client can prioritize messages as discussed in Section 5.10.1. 466 As an example, a value of "oc=10" when the loss-based algorithm is 467 uses implies that 10% of all requests (dialog forming as well as in- 468 dialogue) are subject to reduction at the client. Analogously, a 469 value of "oc=10" when the rate-based algorithm 470 [I-D.ietf-soc-overload-rate-control] is used indicates that the 471 client should send SIP requests at a rate no greater than or equal to 472 10 SIP requests per second. 474 5.4. Processing the Overload Control Parameters 476 A SIP client SHOULD remove "oc", "oc-validity" and "oc-seq" 477 parameters from all Via headers of a response received, except for 478 the topmost Via header. This prevents overload control parameters 479 that were accidentally or maliciously inserted into Via headers by a 480 downstream SIP server from traveling upstream. 482 The scope of overload control applies to unique combinations of IP 483 and port values. A SIP client maintains the "oc" parameter values 484 received along with the address and port number of the SIP servers 485 from which they were received for the duration specified in the "oc- 486 validity" parameter or the default duration. Each time a SIP client 487 receives a response with an "oc" parameter from a downstream SIP 488 server, it overwrites the "oc" value it has currently stored for this 489 server with the new value received. The SIP client restarts the 490 validity period of an "oc" parameter each time a response with an 491 "oc" parameter is received from this server. A stored "oc" parameter 492 value MUST be discarded once it has reached the end of its validity. 494 5.5. Using the Overload Control Parameter Values 496 A SIP client MUST honor overload control values it receives from 497 downstream neighbors. The SIP client MUST NOT forward more requests 498 to a SIP server than allowed by the current "oc" parameter value from 499 that particular downstream server. 501 When forwarding a SIP request, a SIP client uses the SIP procedures 502 of [RFC3263] to determine the next hop SIP server. The procedures of 503 [RFC3263] take as input a SIP URI, extract the domain portion of that 504 URI for use as a lookup key, and query the Domain Name Service (DNS) 505 to obtain an ordered set of one or more IP addresses with a port 506 number and transport corresponding to each IP address in this set 507 (the "Expected Output"). 509 After selecting a specific SIP server from the Expected Output, the 510 SIP client MUST determine if it already has overload control 511 parameter values for the server chosen from the Expected Output. If 512 the SIP client has a non-expired "oc" parameter value for the server 513 chosen from the Expected Output, then this chosen server is operating 514 in overload control mode. Thus, the SIP client MUST determine if it 515 can or cannot forward the current request to the SIP server depending 516 on the nature of the request and the prevailing overload conditions. 518 The particular algorithm used to determine whether or not to forward 519 a particular SIP request is a matter of local policy, and may take 520 into account a variety of prioritization factors. However, this 521 local policy SHOULD generate the same number of SIP requests as the 522 default algorithm defined by the overload control scheme being used. 524 5.6. Forwarding the overload control parameters 526 Overload control is defined in a hop-by-hop manner. Therefore, 527 forwarding the contents of the overload control parameters is 528 generally NOT RECOMMENDED and should only be performed if permitted 529 by the configuration of SIP servers. This means that a SIP proxy 530 SHOULD strip the overload control parameters inserted by the client 531 before proxying the request further downstream. 533 5.7. Terminating overload control 535 A SIP client removes overload control if one of the following events 536 occur: 538 1. The "oc-validity" period negotiated to put the server and client 539 in overload state expires; 540 2. The client is explicitly told by the server to stop performing 541 overload control using the "oc-validity=0" parameter. 543 A SIP server can decide to terminate overload control by explicitly 544 signaling the client. To do so, the SIP server MUST set the value of 545 the "oc-validity" parameter to 0. The SIP server MUST increment the 546 value of "oc-seq", and SHOULD set the value of the "oc" parameter to 547 0. 549 Note that the loss-based overload control scheme (Section 6) can 550 effectively stop overload control by setting the value of the "oc" 551 parameter to 0. However, the rate-based scheme 552 ([I-D.ietf-soc-overload-rate-control]) needs an additional piece 553 of information in the form of "oc-validity=0". 555 When the client receives a response with a higher "oc-seq" number 556 than the one it currently is processing, it checks the "oc-validity" 557 parameter. If the value of the "oc-validity" parameter is 0, the 558 client MUST stop performing overload control of messages destined to 559 the server and the traffic should flow without any reduction. 560 Furthermore, when the value of the "oc-validity" parameter is 0, the 561 client SHOULD disregard the value in the "oc" parameter. 563 5.8. Stabilizing overload algorithm selection 565 Realities of deployments of SIP necessitate that the overload control 566 algorithm be renegotiated upon a system reboot or a software upgrade. 567 However, frequent renegotiation of the overload control algorithm 568 MUST be avoided. A rapid renegotiation of the overload control 569 algorithm will not benefit the client or the server as such flapping 570 does not allow the chosen algorithm to measure and fine tune its 571 behavior over a period of time. Renegotiation, when desired, is 572 simply accomplished by the SIP server choosing a new algorithm from 573 the list in the "oc-algo" parameter and sending it back to the client 574 in a response. 576 The client associates a specific algorithm with each server it sends 577 traffic to such that when the server changes the algorithm, the 578 client must behave accordingly as well. 580 Once the client and server agree on an overload control algorithm, it 581 MUST remain in effect for at least 3600 seconds (1 hour) before 582 renegotiation occurs. 584 One way to accomplish this involves the server saving the time of 585 the last negotiation in a lookup table, indexed by the client's 586 network identifiers. Renegotiation is only done when the time of 587 the last negotiation has surpassed 3600 seconds. 589 5.9. Self-Limiting 591 In some cases, a SIP client may not receive a response from a server 592 after sending a request. RFC3261 [RFC3261] defines that when a 593 timeout error is received from the transaction layer, it MUST be 594 treated as if a 408 (Request Timeout) status code has been received. 595 If a fatal transport error is reported by the transport layer, it 596 MUST be treated as a 503 (Service Unavailable) status code. 598 In the event of repeated timeouts or fatal transport errors, the SIP 599 client MUST stop sending requests to this server. The SIP client 600 SHOULD periodically probe if the downstream server is alive using any 601 mechanism for this probe at its disposal. Once a SIP client has 602 successfully transmitted a request to the downstream server, the SIP 603 client can resume normal traffic rates. It should, of course, honor 604 any "oc" parameters it may receive subsequent to resuming normal 605 traffic rates. 607 5.10. Responding to an Overload Indication 609 A SIP client can receive overload control feedback indicating that it 610 needs to reduce the traffic it sends to its downstream server. The 611 client can accomplish this task by sending some of the requests that 612 would have gone to the overloaded element to a different destination. 613 It needs to ensure, however, that this destination is not in overload 614 and capable of processing the extra load. A client can also buffer 615 requests in the hope that the overload condition will resolve quickly 616 and the requests still can be forwarded in time. In many cases, 617 however, it will need to reject these requests. 619 5.10.1. Message prioritization at the hop before the overloaded server 621 During an overload condition, a SIP client needs to prioritize 622 requests and select those requests that need to be rejected or 623 redirected. While this selection is largely a matter of local 624 policy, certain heuristics can be suggested. One, during overload 625 control, the SIP client should preserve existing dialogs as much as 626 possible. This suggests that mid-dialog requests MAY be given 627 preferential treatment. Similarly, requests that result in releasing 628 resources (such as a BYE) MAY also be given preferential treatment. 630 A SIP client SHOULD honor the local policy for prioritizing SIP 631 requests such as policies based on the content of the Resource- 632 Priority header (RPH, RFC4412 [RFC4412]). Specific (namespace.value) 633 RPH contents may indicate high priority requests that should be 634 preserved as much as possible during overload. The RPH contents can 635 also indicate a low-priority request that is eligible to be dropped 636 during times of overload. Other indicators, such as the SOS URN 637 [RFC5031] indicating an emergency request, may also be used for 638 prioritization. 640 Local policy could also include giving precedence to mid-dialog SIP 641 requests (re-INVITEs, UPDATEs, BYEs etc.) in times of overload. A 642 local policy can be expected to combine both the SIP request type and 643 the prioritization markings, and SHOULD be honored when overload 644 conditions prevail. 646 A SIP client SHOULD honor user-level load control filters installed 647 by signaling neighbors [I-D.ietf-soc-load-control-event-package] by 648 sending the SIP messages that matched the filter downstream. 650 5.10.2. Rejecting requests at an overloaded server 652 If the upstream SIP client to the overloaded server does not support 653 overload control, it will continue to direct requests to the 654 overloaded server. Thus, the overloaded server must bear the cost of 655 rejecting some session requests as well as the cost of processing 656 other requests to completion. It would be fair to devote the same 657 amount of processing at the overloaded server to the combination of 658 rejection and processing as the overloaded server would devote to 659 processing requests from an upstream SIP client that supported 660 overload control. This is to ensure that SIP servers that do not 661 support this specification don't receive an unfair advantage over 662 those that do. 664 A SIP server that is under overload and has started to throttle 665 incoming traffic MUST reject this request with a "503 (Service 666 Unavailable)" response without Retry-After header to reject some 667 requests from upstream neighbors that do not support overload 668 control. 670 5.11. 100-Trying provisional response and overload control parameters 672 The overload control information sent from a SIP server to a client 673 is transported in the responses. While implementations can insert 674 overload control information in any response, special attention 675 should be accorded to overload control information transported in a 676 100-Trying response. 678 Traditionally, the 100-Trying response has been used in SIP to quench 679 retransmissions. In some implementations, the 100-Trying message may 680 not be generated by the transaction user (TU) nor consumed by the TU. 681 In these implementations, the 100-Trying response is generated at the 682 transaction layer and sent to the upstream SIP client. At the 683 receiving SIP client, the 100-Trying is consumed at the transaction 684 layer by inhibiting the retransmission of the corresponding request. 685 Consequently, implementations that insert overload control 686 information in the 100-Trying cannot assume that the upstream SIP 687 client passed the overload control information in the 100-Trying to 688 their corresponding TU. For this reason, implementations that insert 689 overload control information in the 100-Trying MUST re-insert the 690 same (or updated) overload control information in the first non-100 691 response being sent to the upstream SIP client. 693 6. The loss-based overload control scheme 695 A loss percentage enables a SIP server to ask an upstream neighbor to 696 reduce the number of requests it would normally forward to this 697 server by X%. For example, a SIP server can ask an upstream neighbor 698 to reduce the number of requests this neighbor would normally send by 699 10%. The upstream neighbor then redirects or rejects 10% of the 700 traffic that is destined for this server. 702 This section specifies the semantics of the overload control 703 parameters associated with the loss-based overload control scheme. 704 The general behaviour of SIP clients and servers is specified in 705 Section 5 and is applicable to SIP clients and servers that implement 706 loss-based overload control. 708 6.1. Special parameter values for loss-based overload control 710 The loss-based overload control scheme is identified using the token 711 "loss". This token MUST appear in the "oc-algo" parameter. 713 A SIP server, upon entering the overload state, will assign a value 714 to the "oc" parameter. This value MUST be restricted in the range of 715 [0, 100], inclusive. This value MUST be interpreted as a percentage, 716 and the SIP client MUST reduce the number of requests being forwarded 717 to the overloaded server by that amount. The SIP client may use any 718 algorithm that reduces the traffic arriving at the overloaded server 719 by the amount indicated. Such an algorithm SHOULD honor the message 720 prioritization discussion of Section 5.10.1. While a particular 721 algorithm is not subject to standardization, for completeness a 722 default algorithm for loss-based overload control is provided in 723 Section 6.3. 725 When a SIP server receives a request from a client with an "oc" 726 parameter but without a value, and the SIP server is not experiencing 727 overload, it MUST assign a value of 0 to the "oc" parameter in the 728 response. Assigning such a value lets the client know that the 729 server supports overload control and is not currently experiencing 730 overload. 732 When the "oc-validity" parameter is used to signify overload control 733 termination (Section 5.7), the server MUST insert a value of 0 in the 734 "oc-validity" parameter. The server MUST insert a value of 0 in the 735 "oc" parameter as well. When a client receives a response whose "oc- 736 validity" parameter contains a 0, it MUST treat any non-zero value in 737 the "oc" parameter as if it had received a value of 0 in that 738 parameter. 740 6.2. Example 742 Consider a SIP client, P1, which is sending requests to another 743 downstream SIP server, P2. The following snippets of SIP messages 744 demonstrate how the overload control parameters work. 746 INVITE sips:user@example.com SIP/2.0 747 Via: SIP/2.0/TLS p1.example.net; 748 branch=z9hG4bK2d4790.1;oc;oc-algo="loss,A" 749 ... 751 SIP/2.0 100 Trying 752 Via: SIP/2.0/TLS p1.example.net; 753 branch=z9hG4bK2d4790.1;received=192.0.2.111; 754 oc=0;oc-algo="loss";oc-validity=0 755 ... 757 In the messages above, the first line is sent by P1 to P2. This line 758 is a SIP request; because P1 supports overload control, it inserts 759 the "oc" parameter in the topmost Via header that it created. P1 760 supports two overload control algorithms: loss and some algorithm 761 called "A". 763 The second line --- a SIP response --- shows the topmost Via header 764 amended by P2 according to this specification and sent to P1. 765 Because P2 also supports overload control, it chooses the "loss" 766 based scheme and sends that back to P1 in the "oc-algo" parameter. 767 It also sets the value of "oc" parameter to 0. 769 Had P2 not supported overload control, it would have left the "oc" 770 and "oc-algo" parameters unchanged, thus allowing the client to know 771 that it did not support overload control. 773 At some later time, P2 starts to experience overload. It sends the 774 following SIP message indicating that P1 should decrease the messages 775 arriving to P2 by 20% for 1s. 777 SIP/2.0 180 Ringing 778 Via: SIP/2.0/TLS p1.example.net; 779 branch=z9hG4bK2d4790.3;received=192.0.2.111; 780 oc=20;oc-algo="loss";oc-validity=500; 781 oc-seq=1282321615.782 782 ... 784 After some time, the overload condition at P2 subsides. It then 785 sends out the message below to allow P1 to send all messages destined 786 to P2. 788 SIP/2.0 183 Queued 789 Via: SIP/2.0/TLS p1.example.net; 790 branch=z9hG4bK2d4790.4;received=192.0.2.111; 791 oc=0;oc-algo="loss";oc-validity=0;oc-seq=1282321892.439 792 ... 794 6.3. Default algorithm for loss-based overload control 796 This section describes a default algorithm that a SIP client can to 797 throttle SIP traffic going downstream by the percentage loss value 798 specified in the "oc" parameter. 800 The client maintains two categories of requests; the first category 801 will include requests that are candidates for reduction, and the 802 second category will include requests that are not subject to 803 reduction (except under extenuating circumstances when there aren't 804 any messages in the first category that can be reduced). Section 805 Section 5.10.1 contains normative directives on how to prioritize 806 messages for inclusion in the second category. The remaining 807 messages can be allocated to the first category. 809 The client determines the mix of requests falling into the first 810 category and those falling into the second category. For example, 811 40% of the requests may be eligible for reduction and 60% not 812 eligible (and therefore, must be sent downstream). 814 Under overload condition, the client converts the value of the "oc" 815 parameter to a value that it applies to requests in the first 816 category. As a simple example, if "oc=10" and 40% of the requests 817 should be included in the first category, then: 819 10 / 40 * 100 = 25 821 Or, 25% of the requests in the first category can be reduced to get 822 an overall reduction of 10%. The client uses random discard to 823 achieve the 25% reduction of messages in the first category. 824 Messages in the second category proceed downstream unscathed. To 825 affect the 25% reduction rate from the first category, the client 826 draws a random number between 1 and 100 for the request picked from 827 the first category. If the random number is less than or equal to 828 converted value of the "oc" parameter, the request is not forwarded; 829 otherwise the request is forwarded. 831 A reference algorithm is shown below. 833 cat1 := 80.0 // Category 1 --- subject to reduction 834 cat2 := 100.0 - cat1 // Category 2 --- Under normal operations 835 // only subject to reduction after category 1 is exhausted. 836 // Note that the above ratio is simply a reasonable default. 837 // The actual values will change through periodic sampling 838 // as the traffic mix changes over time. 840 while (true) { 841 // We're modeling message processing as a single work queue 842 // that contains both incoming and outgoing messages. 843 sip_msg := get_next_message_from_work_queue() 845 update_mix(cat1, cat2) // See Note below 847 switch (sip_msg.type) { 849 case outbound request: 850 destination := get_next_hop(sip_msg) 851 oc_context := get_oc_context(destination) 853 if (oc_context == null) { 854 send_to_network(sip_msg) // Process it normally by sending the 855 // request to the next hop since this particular destination 856 // is not subject to overload 857 } 858 else { 859 // Determine if server wants to enter in overload or is in 860 // overload 861 in_oc := extract_in_oc(oc_context) 863 oc_value := extract_oc(oc_context) 864 oc_validity := extract_oc_validity(oc_context) 865 if (in_oc == false or oc_validity is not in effect) { 866 send_to_network(sip_msg) // Process it normally by sending 867 // the request to the next hop since this particular 868 // destination is not subject to overload. Optionally, 869 // clear the oc context for this server (not shown). 870 } 871 else { // Begin perform overload control 872 r := random() 873 drop_msg := false 875 if (cat1 >= cat2) { 876 category := assign_msg_to_category(sip_msg) 877 pct_to_reduce_cat2 := 0 878 pct_to_reduce_cat1 := oc_value / cat1 * 100 879 if (pct_to_reduce_cat1 > 100) { 880 // Get remaining messages from category 2 881 pct_to_reduce_cat2 := 100 - pct_to_reduce_cat1 882 pct_to_reduce_cat1 := 100 883 } 885 if (category == cat1) { 886 if (r <= pct_to_reduce_cat1) { 887 drop_msg := true 888 } 889 } 890 else { // Message from category 2 891 if (r <= pct_to_reduce_cat2) { 892 drop_msg := true 893 } 894 } 895 } 896 else { // More category 2 messages than category 1; 897 // indicative of an emergency situation. Since 898 // there are more category 2 messages, don't bother 899 // distinguishing between category 1 or 2 --- treat 900 // them equal (for simplicity). 901 if (r <= oc_value) 902 drop_msg := true 903 } 905 if (drop_msg == false) { 906 send_to_network(sip_msg) // Process it normally by 907 // sending the request to the next hop 908 } 909 else { 910 // Do not send request downstream, handle locally by 911 // generating response (if a proxy) or treating as 912 // an error (if a user agent). 914 } 915 } // End perform overload control 916 } 918 end case // outbound request 920 case outbound response: 921 if (we are in overload) { 922 add_overload_parameters(sip_msg) 923 } 924 send_to_network(sip_msg) 926 end case // outbound response 928 case inbound response: 930 if (sip_msg has oc parameter values) { 931 create_or_update_oc_context() // For the specific server 932 // that sent the response, create or update the oc context; 933 // i.e., extract the values of the oc-related parameters 934 // and store them for later use. 935 } 936 process_msg(sip_msg) 938 end case // inbound response 939 case inbound request: 941 if (we are not in overload) { 942 process_msg(sip_msg) 943 } 944 else { // We are in overload 945 if (sip_msg has oc parameters) { // Upstream client supports 946 process_msg(sip_msg) // oc; only sends important requests 947 } 948 else { // Upstream client does not support oc 949 if (local_policy(sip_msg) says process message) { 950 process_msg(sip_msg) 951 } 952 else { 953 send_response(sip_msg, 503) 954 } 955 } 956 } 957 end case // inbound request 958 } 959 } 961 Note: A simple way to sample the traffic mix for category 1 and 962 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 1187 12.1. Normative References 1189 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1190 Requirement Levels", BCP 14, RFC 2119, March 1997. 1192 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1193 A., Peterson, J., Sparks, R., Handley, M., and E. 1194 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1195 June 2002. 1197 [RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation 1198 Protocol (SIP): Locating SIP Servers", RFC 3263, 1199 June 2002. 1201 [RFC3968] Camarillo, G., "The Internet Assigned Number Authority 1202 (IANA) Header Field Parameter Registry for the Session 1203 Initiation Protocol (SIP)", BCP 98, RFC 3968, 1204 December 2004. 1206 [RFC4412] Schulzrinne, H. and J. Polk, "Communications Resource 1207 Priority for the Session Initiation Protocol (SIP)", 1208 RFC 4412, February 2006. 1210 12.2. Informative References 1212 [I-D.ietf-soc-load-control-event-package] 1213 Shen, C., Schulzrinne, H., and A. Koike, "A Session 1214 Initiation Protocol (SIP) Load Control Event Package", 1215 draft-ietf-soc-load-control-event-package-03 (work in 1216 progress), March 2012. 1218 [I-D.ietf-soc-overload-rate-control] 1219 Noel, E. and P. Williams, "Session Initiation Protocol 1220 (SIP) Rate Control", 1221 draft-ietf-soc-overload-rate-control-02 (work in 1222 progress), June 2012. 1224 [RFC5031] Schulzrinne, H., "A Uniform Resource Name (URN) for 1225 Emergency and Other Well-Known Services", RFC 5031, 1226 January 2008. 1228 [RFC5390] Rosenberg, J., "Requirements for Management of Overload in 1229 the Session Initiation Protocol", RFC 5390, December 2008. 1231 [RFC6357] Hilt, V., Noel, E., Shen, C., and A. Abdelal, "Design 1232 Considerations for Session Initiation Protocol (SIP) 1233 Overload Control", RFC 6357, August 2011. 1235 Appendix A. Acknowledgements 1237 Many thanks to Bruno Chatras, Keith Drage, Janet Gunn, Rich Terpstra, 1238 Daryl Malas, R. Parthasarathi, Antoine Roly, Jonathan Rosenberg, 1239 Charles Shen, Rahul Srivastava, Padma Valluri, Shaun Bharrat, Paul 1240 Kyzivat and Jeroen Van Bemmel for their contributions to this 1241 specification. 1243 Adam Roach and Eric McMurry helped flesh out the different cases for 1244 handling SIP messages described in the algorithm of Section 6.3. 1246 Appendix B. RFC5390 requirements 1248 Table 1 provides a summary how this specification fulfills the 1249 requirements of [RFC5390]. A more detailed view on how each 1250 requirements is fulfilled is provided after the table. 1252 +-------------+-------------------+ 1253 | Requirement | Meets requirement | 1254 +-------------+-------------------+ 1255 | REQ 1 | Yes | 1256 | REQ 2 | Yes | 1257 | REQ 3 | Partially | 1258 | REQ 4 | Partially | 1259 | REQ 5 | Partially | 1260 | REQ 6 | Not applicable | 1261 | REQ 7 | Yes | 1262 | REQ 8 | Partially | 1263 | REQ 9 | Yes | 1264 | REQ 10 | Yes | 1265 | REQ 11 | Yes | 1266 | REQ 12 | Yes | 1267 | REQ 13 | Yes | 1268 | REQ 14 | Yes | 1269 | REQ 15 | Yes | 1270 | REQ 16 | Yes | 1271 | REQ 17 | Partially | 1272 | REQ 18 | Yes | 1273 | REQ 19 | Yes | 1274 | REQ 20 | Yes | 1275 | REQ 21 | Yes | 1276 | REQ 22 | Yes | 1277 | REQ 23 | Yes | 1278 +-------------+-------------------+ 1280 Summary of meeting requirements in RFC5390 1282 Table 1 1284 REQ 1: The overload mechanism shall strive to maintain the overall 1285 useful throughput (taking into consideration the quality-of-service 1286 needs of the using applications) of a SIP server at reasonable 1287 levels, even when the incoming load on the network is far in excess 1288 of its capacity. The overall throughput under load is the ultimate 1289 measure of the value of an overload control mechanism. 1291 Meeting REQ 1: Yes, the overload control mechanism allows an 1292 overloaded SIP server to maintain a reasonable level of throughput as 1293 it enters into congestion mode by requesting the upstream clients to 1294 reduce traffic destined downstream. 1296 REQ 2: When a single network element fails, goes into overload, or 1297 suffers from reduced processing capacity, the mechanism should strive 1298 to limit the impact of this on other elements in the network. This 1299 helps to prevent a small-scale failure from becoming a widespread 1300 outage. 1302 Meeting REQ 2: Yes. When a SIP server enters overload mode, it will 1303 request the upstream clients to throttle the traffic destined to it. 1304 As a consequence of this, the overloaded SIP server will itself 1305 generate proportionally less downstream traffic, thereby limiting the 1306 impact on other elements in the network. 1308 REQ 3: The mechanism should seek to minimize the amount of 1309 configuration required in order to work. For example, it is better 1310 to avoid needing to configure a server with its SIP message 1311 throughput, as these kinds of quantities are hard to determine. 1313 Meeting REQ 3: Partially. On the server side, the overload condition 1314 is determined monitoring S (c.f., Section 4 of [RFC6357]) and 1315 reporting a load feedback F as a value to the "oc" parameter. On the 1316 client side, a throttle T is applied to requests going downstream 1317 based on F. This specification does not prescribe any value for S, 1318 nor a particular value for F. The "oc-algo" parameter allows for 1319 automatic convergence to a particular class of overload control 1320 algorithm. There are suggested default values for the "oc-validity" 1321 parameter. 1323 REQ 4: The mechanism must be capable of dealing with elements that do 1324 not support it, so that a network can consist of a mix of elements 1325 that do and don't support it. In other words, the mechanism should 1326 not work only in environments where all elements support it. It is 1327 reasonable to assume that it works better in such environments, of 1328 course. Ideally, there should be incremental improvements in overall 1329 network throughput as increasing numbers of elements in the network 1330 support the mechanism. 1332 Meeting REQ 4: Partially. The mechanism is designed to reduce 1333 congestion when a pair of communicating entities support it. If a 1334 downstream overloaded SIP server does not respond to a request in 1335 time, a SIP client will attempt to reduce traffic destined towards 1336 the non-responsive server as outlined in Section 5.9. 1338 REQ 5: The mechanism should not assume that it will only be deployed 1339 in environments with completely trusted elements. It should seek to 1340 operate as effectively as possible in environments where other 1341 elements are malicious; this includes preventing malicious elements 1342 from obtaining more than a fair share of service. 1344 Meeting REQ 5: Partially. Since overload control information is 1345 shared between a pair of communicating entities, a confidential and 1346 authenticated channel can be used for this communication. However, 1347 if such a channel is not available, then the security ramifications 1348 outlined in Section 10 apply. 1350 REQ 6: When overload is signaled by means of a specific message, the 1351 message must clearly indicate that it is being sent because of 1352 overload, as opposed to other, non overload-based failure conditions. 1353 This requirement is meant to avoid some of the problems that have 1354 arisen from the reuse of the 503 response code for multiple purposes. 1355 Of course, overload is also signaled by lack of response to requests. 1356 This requirement applies only to explicit overload signals. 1358 Meeting REQ 6: Not applicable. Overload control information is 1359 signaled as part of the Via header and not in a new header. 1361 REQ 7: The mechanism shall provide a way for an element to throttle 1362 the amount of traffic it receives from an upstream element. This 1363 throttling shall be graded so that it is not all- or-nothing as with 1364 the current 503 mechanism. This recognizes the fact that "overload" 1365 is not a binary state and that there are degrees of overload. 1367 Meeting REQ 7: Yes, please see Section 5.5 and Section 5.10. 1369 REQ 8: The mechanism shall ensure that, when a request was not 1370 processed successfully due to overload (or failure) of a downstream 1371 element, the request will not be retried on another element that is 1372 also overloaded or whose status is unknown. This requirement derives 1373 from REQ 1. 1375 Meeting REQ 8: Partially. A SIP client that has overload information 1376 from multiple downstream servers will not retry the request on 1377 another element. However, if a SIP client does not know the overload 1378 status of a downstream server, it may send the request to that 1379 server. 1381 REQ 9: That a request has been rejected from an overloaded element 1382 shall not unduly restrict the ability of that request to be submitted 1383 to and processed by an element that is not overloaded. This 1384 requirement derives from REQ 1. 1386 Meeting REQ 9: Yes, a SIP client conformant to this specification 1387 will send the request to a different element. 1389 REQ 10: The mechanism should support servers that receive requests 1390 from a large number of different upstream elements, where the set of 1391 upstream elements is not enumerable. 1393 Meeting REQ 10: Yes, there are no constraints on the number of 1394 upstream clients. 1396 REQ 11: The mechanism should support servers that receive requests 1397 from a finite set of upstream elements, where the set of upstream 1398 elements is enumerable. 1400 Meeting REQ 11: Yes, there are no constraints on the number of 1401 upstream clients. 1403 REQ 12: The mechanism should work between servers in different 1404 domains. 1406 Meeting REQ 12: Yes, there are no inherent limitations on using 1407 overload control between domains. 1409 REQ 13: The mechanism must not dictate a specific algorithm for 1410 prioritizing the processing of work within a proxy during times of 1411 overload. It must permit a proxy to prioritize requests based on any 1412 local policy, so that certain ones (such as a call for emergency 1413 services or a call with a specific value of the Resource-Priority 1414 header field [RFC4412]) are given preferential treatment, such as not 1415 being dropped, being given additional retransmission, or being 1416 processed ahead of others. 1418 Meeting REQ 13: Yes, please see Section 5.10. 1420 REQ 14: REQ 14: The mechanism should provide unambiguous directions 1421 to clients on when they should retry a request and when they should 1422 not. This especially applies to TCP connection establishment and SIP 1423 registrations, in order to mitigate against avalanche restart. 1425 Meeting REQ 14: Yes, Section 5.9 provides normative behavior on when 1426 to retry a request after repeated timeouts and fatal transport errors 1427 resulting from communications with a non-responsive downstream SIP 1428 server. 1430 REQ 15: In cases where a network element fails, is so overloaded that 1431 it cannot process messages, or cannot communicate due to a network 1432 failure or network partition, it will not be able to provide explicit 1433 indications of the nature of the failure or its levels of congestion. 1434 The mechanism must properly function in these cases. 1436 Meeting REQ 15: Yes, Section 5.9 provides normative behavior on when 1437 to retry a request after repeated timeouts and fatal transport errors 1438 resulting from communications with a non-responsive downstream SIP 1439 server. 1441 REQ 16: The mechanism should attempt to minimize the overhead of the 1442 overload control messaging. 1444 Meeting REQ 16: Yes, overload control messages are sent in the 1445 topmost Via header, which is always processed by the SIP elements. 1447 REQ 17: The overload mechanism must not provide an avenue for 1448 malicious attack, including DoS and DDoS attacks. 1450 Meeting REQ 17: Partially. Since overload control information is 1451 shared between a pair of communicating entities, a confidential and 1452 authenticated channel can be used for this communication. However, 1453 if such a channel is not available, then the security ramifications 1454 outlined in Section 10 apply. 1456 REQ 18: The overload mechanism should be unambiguous about whether a 1457 load indication applies to a specific IP address, host, or URI, so 1458 that an upstream element can determine the load of the entity to 1459 which a request is to be sent. 1461 Meeting REQ 18: Yes, please see discussion in Section 5.5. 1463 REQ 19: The specification for the overload mechanism should give 1464 guidance on which message types might be desirable to process over 1465 others during times of overload, based on SIP-specific 1466 considerations. For example, it may be more beneficial to process a 1467 SUBSCRIBE refresh with Expires of zero than a SUBSCRIBE refresh with 1468 a non-zero expiration (since the former reduces the overall amount of 1469 load on the element), or to process re-INVITEs over new INVITEs. 1471 Meeting REQ 19: Yes, please see Section 5.10. 1473 REQ 20: In a mixed environment of elements that do and do not 1474 implement the overload mechanism, no disproportionate benefit shall 1475 accrue to the users or operators of the elements that do not 1476 implement the mechanism. 1478 Meeting REQ 20: Yes, an element that does not implement overload 1479 control does not receive any measure of extra benefit. 1481 REQ 21: The overload mechanism should ensure that the system remains 1482 stable. When the offered load drops from above the overall capacity 1483 of the network to below the overall capacity, the throughput should 1484 stabilize and become equal to the offered load. 1486 Meeting REQ 21: Yes, the overload control mechanism described in this 1487 draft ensures the stability of the system. 1489 REQ 22: It must be possible to disable the reporting of load 1490 information towards upstream targets based on the identity of those 1491 targets. This allows a domain administrator who considers the load 1492 of their elements to be sensitive information, to restrict access to 1493 that information. Of course, in such cases, there is no expectation 1494 that the overload mechanism itself will help prevent overload from 1495 that upstream target. 1497 Meeting REQ 22: Yes, an operator of a SIP server can configure the 1498 SIP server to only report overload control information for requests 1499 received over a confidential channel, for example. However, note 1500 that this requirement is in conflict with REQ 3, as it introduces a 1501 modicum of extra configuration. 1503 REQ 23: It must be possible for the overload mechanism to work in 1504 cases where there is a load balancer in front of a farm of proxies. 1506 Meeting REQ 23: Yes. Depending on the type of load balancer, this 1507 requirement is met. A load balancer fronting a farm of SIP proxies 1508 could be a SIP-aware load balancer or one that is not SIP-aware. If 1509 the load balancer is SIP-aware, it can make conscious decisions on 1510 throttling outgoing traffic towards the individual server in the farm 1511 based on the overload control parameters returned by the server. On 1512 the other hand, if the load balancer is not SIP-aware, then there are 1513 other strategies to perform overload control. Section 6 of [RFC6357] 1514 documents some of these strategies in more detail (see discussion 1515 related to Figure 3(a) in Section 6). 1517 Authors' Addresses 1519 Vijay K. Gurbani (editor) 1520 Bell Laboratories, Alcatel-Lucent 1521 1960 Lucent Lane, Rm 9C-533 1522 Naperville, IL 60563 1523 USA 1525 Email: vkg@bell-labs.com 1527 Volker Hilt 1528 Bell Laboratories, Alcatel-Lucent 1529 791 Holmdel-Keyport Rd 1530 Holmdel, NJ 07733 1531 USA 1533 Email: volkerh@bell-labs.com 1534 Henning Schulzrinne 1535 Columbia University/Department of Computer Science 1536 450 Computer Science Building 1537 New York, NY 10027 1538 USA 1540 Phone: +1 212 939 7004 1541 Email: hgs@cs.columbia.edu 1542 URI: http://www.cs.columbia.edu