idnits 2.17.1 draft-ietf-avtcore-rtp-circuit-breakers-05.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 : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC3550, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC3550, updated by this document, for RFC5378 checks: 1998-04-07) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (February 14, 2014) is 3716 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) ** Obsolete normative reference: RFC 3448 (Obsoleted by RFC 5348) == Outdated reference: A later version (-12) exists of draft-ietf-avtcore-rtp-multi-stream-optimisation-01 Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 AVTCORE Working Group C. S. Perkins 3 Internet-Draft University of Glasgow 4 Updates: 3550 (if approved) V. Singh 5 Intended status: Standards Track Aalto University 6 Expires: August 18, 2014 February 14, 2014 8 Multimedia Congestion Control: Circuit Breakers for Unicast RTP Sessions 9 draft-ietf-avtcore-rtp-circuit-breakers-05 11 Abstract 13 The Real-time Transport Protocol (RTP) is widely used in telephony, 14 video conferencing, and telepresence applications. Such applications 15 are often run on best-effort UDP/IP networks. If congestion control 16 is not implemented in the applications, then network congestion will 17 deteriorate the user's multimedia experience. This document does not 18 propose a congestion control algorithm; instead, it defines a minimal 19 set of RTP "circuit-breakers". Circuit-breakers are conditions under 20 which an RTP sender needs to stop transmitting media data in order to 21 protect the network from excessive congestion. It is expected that, 22 in the absence of severe congestion, all RTP applications running on 23 best-effort IP networks will be able to run without triggering these 24 circuit breakers. Any future RTP congestion control specification 25 will be expected to operate within the constraints defined by these 26 circuit breakers. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at http://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on August 18, 2014. 45 Copyright Notice 47 Copyright (c) 2014 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (http://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 63 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 3. Background . . . . . . . . . . . . . . . . . . . . . . . . . 3 65 4. RTP Circuit Breakers for Systems Using the RTP/AVP Profile . 6 66 4.1. RTP/AVP Circuit Breaker #1: Media Timeout . . . . . . . . 7 67 4.2. RTP/AVP Circuit Breaker #2: RTCP Timeout . . . . . . . . 8 68 4.3. RTP/AVP Circuit Breaker #3: Congestion . . . . . . . . . 9 69 4.4. RTP/AVP Circuit Breaker #4: Media Usability . . . . . . . 12 70 4.5. Ceasing Transmission . . . . . . . . . . . . . . . . . . 13 71 5. RTP Circuit Breakers for Systems Using the RTP/AVPF Profile . 13 72 6. Impact of RTCP XR . . . . . . . . . . . . . . . . . . . . . . 14 73 7. Impact of RTCP Reporting Groups . . . . . . . . . . . . . . . 15 74 8. Impact of Explicit Congestion Notification (ECN) . . . . . . 15 75 9. Security Considerations . . . . . . . . . . . . . . . . . . . 15 76 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 77 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 16 78 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 79 12.1. Normative References . . . . . . . . . . . . . . . . . . 16 80 12.2. Informative References . . . . . . . . . . . . . . . . . 16 81 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 83 1. Introduction 85 The Real-time Transport Protocol (RTP) [RFC3550] is widely used in 86 voice-over-IP, video teleconferencing, and telepresence systems. 87 Many of these systems run over best-effort UDP/IP networks, and can 88 suffer from packet loss and increased latency if network congestion 89 occurs. Designing effective RTP congestion control algorithms, to 90 adapt the transmission of RTP-based media to match the available 91 network capacity, while also maintaining the user experience, is a 92 difficult but important problem. Many such congestion control and 93 media adaptation algorithms have been proposed, but to date there is 94 no consensus on the correct approach, or even that a single standard 95 algorithm is desirable. 97 This memo does not attempt to propose a new RTP congestion control 98 algorithm. Rather, it proposes a minimal set of "circuit breakers"; 99 conditions under which there is general agreement that an RTP flow is 100 causing serious congestion, and ought to cease transmission. It is 101 expected that future standards-track congestion control algorithms 102 for RTP will operate within the envelope defined by this memo. 104 2. Terminology 106 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 107 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 108 document are to be interpreted as described in RFC 2119 [RFC2119]. 109 This interpretation of these key words applies only when written in 110 ALL CAPS. Mixed- or lower-case uses of these key words are not to be 111 interpreted as carrying special significance in this memo. 113 3. Background 115 We consider congestion control for unicast RTP traffic flows. This 116 is the problem of adapting the transmission of an audio/visual data 117 flow, encapsulated within an RTP transport session, from one sender 118 to one receiver, so that it matches the available network bandwidth. 119 Such adaptation needs to be done in a way that limits the disruption 120 to the user experience caused by both packet loss and excessive rate 121 changes. Congestion control for multicast flows is outside the scope 122 of this memo. Multicast traffic needs different solutions, since the 123 available bandwidth estimator for a group of receivers will differ 124 from that for a single receiver, and because multicast congestion 125 control has to consider issues of fairness across groups of receivers 126 that do not apply to unicast flows. 128 Congestion control for unicast RTP traffic can be implemented in one 129 of two places in the protocol stack. One approach is to run the RTP 130 traffic over a congestion controlled transport protocol, for example 131 over TCP, and to adapt the media encoding to match the dictates of 132 the transport-layer congestion control algorithm. This is safe for 133 the network, but can be suboptimal for the media quality unless the 134 transport protocol is designed to support real-time media flows. We 135 do not consider this class of applications further in this memo, as 136 their network safety is guaranteed by the underlying transport. 138 Alternatively, RTP flows can be run over a non-congestion controlled 139 transport protocol, for example UDP, performing rate adaptation at 140 the application layer based on RTP Control Protocol (RTCP) feedback. 141 With a well-designed, network-aware, application, this allows highly 142 effective media quality adaptation, but there is potential to disrupt 143 the network's operation if the application does not adapt its sending 144 rate in a timely and effective manner. We consider this class of 145 applications in this memo. 147 Congestion control relies on monitoring the delivery of a media flow, 148 and responding to adapt the transmission of that flow when there are 149 signs that the network path is congested. Network congestion can be 150 detected in one of three ways: 1) a receiver can infer the onset of 151 congestion by observing an increase in one-way delay caused by queue 152 build-up within the network; 2) if Explicit Congestion Notification 153 (ECN) [RFC3168] is supported, the network can signal the presence of 154 congestion by marking packets using ECN Congestion Experienced (CE) 155 marks; or 3) in the extreme case, congestion will cause packet loss 156 that can be detected by observing a gap in the received RTP sequence 157 numbers. Once the onset of congestion is observed, the receiver has 158 to send feedback to the sender to indicate that the transmission rate 159 needs to be reduced. How the sender reduces the transmission rate is 160 highly dependent on the media codec being used, and is outside the 161 scope of this memo. 163 There are several ways in which a receiver can send feedback to a 164 media sender within the RTP framework: 166 o The base RTP specification [RFC3550] defines RTCP Reception Report 167 (RR) packets to convey reception quality feedback information, and 168 Sender Report (SR) packets to convey information about the media 169 transmission. RTCP SR packets contain data that can be used to 170 reconstruct media timing at a receiver, along with a count of the 171 total number of octets and packets sent. RTCP RR packets report 172 on the fraction of packets lost in the last reporting interval, 173 the cumulative number of packets lost, the highest sequence number 174 received, and the inter-arrival jitter. The RTCP RR packets also 175 contain timing information that allows the sender to estimate the 176 network round trip time (RTT) to the receivers. RTCP reports are 177 sent periodically, with the reporting interval being determined by 178 the number of SSRCs used in the session and a configured session 179 bandwidth estimate (the number of SSRCs used is usually two in a 180 unicast session, one for each participant, but can be greater if 181 the participants send multiple media streams). The interval 182 between reports sent from each receiver tends to be on the order 183 of a few seconds on average, and it is randomised to avoid 184 synchronisation of reports from multiple receivers. RTCP RR 185 packets allow a receiver to report ongoing network congestion to 186 the sender. However, if a receiver detects the onset of 187 congestion partway through a reporting interval, the base RTP 188 specification contains no provision for sending the RTCP RR packet 189 early, and the receiver has to wait until the next scheduled 190 reporting interval. 192 o The RTCP Extended Reports (XR) [RFC3611] allow reporting of more 193 complex and sophisticated reception quality metrics, but do not 194 change the RTCP timing rules. RTCP extended reports of potential 195 interest for congestion control purposes are the extended packet 196 loss, discard, and burst metrics [RFC3611], [RFC7002], [RFC7097], 197 [RFC7003], [RFC6958]; and the extended delay metrics [RFC6843], 198 [RFC6798]. Other RTCP Extended Reports that could be helpful for 199 congestion control purposes might be developed in future. 201 o Rapid feedback about the occurrence of congestion events can be 202 achieved using the Extended RTP Profile for RTCP-Based Feedback 203 (RTP/AVPF) [RFC4585] in place of the more common RTP/AVP profile 204 [RFC3551]. This modifies the RTCP timing rules to allow RTCP 205 reports to be sent early, in some cases immediately, provided the 206 average RTCP reporting interval remains unchanged. It also 207 defines new transport-layer feedback messages, including negative 208 acknowledgements (NACKs), that can be used to report on specific 209 congestion events. The use of the RTP/AVPF profile is dependent 210 on signalling, but is otherwise generally backwards compatible 211 with the RTP/AVP profile, as it keeps the same average RTCP 212 reporting interval as the base RTP specification. The RTP Codec 213 Control Messages [RFC5104] extend the RTP/AVPF profile with 214 additional feedback messages that can be used to influence that 215 way in which rate adaptation occurs. The dynamics of how rapidly 216 feedback can be sent are unchanged. 218 o Finally, Explicit Congestion Notification (ECN) for RTP over UDP 219 [RFC6679] can be used to provide feedback on the number of packets 220 that received an ECN Congestion Experienced (CE) mark. This RTCP 221 extension builds on the RTP/AVPF profile to allow rapid congestion 222 feedback when ECN is supported. 224 In addition to these mechanisms for providing feedback, the sender 225 can include an RTP header extension in each packet to record packet 226 transmission times. There are two methods: [RFC5450] represents the 227 transmission time in terms of a time-offset from the RTP timestamp of 228 the packet, while [RFC6051] includes an explicit NTP-format sending 229 timestamp (potentially more accurate, but a higher header overhead). 230 Accurate sending timestamps can be helpful for estimating queuing 231 delays, to get an early indication of the onset of congestion. 233 Taken together, these various mechanisms allow receivers to provide 234 feedback on the senders when congestion events occur, with varying 235 degrees of timeliness and accuracy. The key distinction is between 236 systems that use only the basic RTCP mechanisms, without RTP/AVPF 237 rapid feedback, and those that use the RTP/AVPF extensions to respond 238 to congestion more rapidly. 240 4. RTP Circuit Breakers for Systems Using the RTP/AVP Profile 242 The feedback mechanisms defined in [RFC3550] and available under the 243 RTP/AVP profile [RFC3551] are the minimum that can be assumed for a 244 baseline circuit breaker mechanism that is suitable for all unicast 245 applications of RTP. Accordingly, for an RTP circuit breaker to be 246 useful, it needs to be able to detect that an RTP flow is causing 247 excessive congestion using only basic RTCP features, without needing 248 RTCP XR feedback or the RTP/AVPF profile for rapid RTCP reports. 250 RTCP is a fundamental part of the RTP protocol, and the mechanisms 251 described here rely on the implementation of RTCP. Implementations 252 which claim to support RTP, but that do not implement RTCP, cannot 253 use the circuit breaker mechanisms described in this memo. Such 254 implementations SHOULD NOT be used on networks that might be subject 255 to congestion unless equivalent mechanisms are defined using some 256 non-RTCP feedback channel to report congestion and signal circuit 257 breaker conditions. 259 Three potential congestion signals are available from the basic RTCP 260 SR/RR packets and are reported for each synchronisation source (SSRC) 261 in the RTP session: 263 1. The sender can estimate the network round-trip time once per RTCP 264 reporting interval, based on the contents and timing of RTCP SR 265 and RR packets. 267 2. Receivers report a jitter estimate (the statistical variance of 268 the RTP data packet inter-arrival time) calculated over the RTCP 269 reporting interval. Due to the nature of the jitter calculation 270 ([RFC3550], section 6.4.4), the jitter is only meaningful for RTP 271 flows that send a single data packet for each RTP timestamp value 272 (i.e., audio flows, or video flows where each packet comprises 273 one video frame). 275 3. Receivers report the fraction of RTP data packets lost during the 276 RTCP reporting interval, and the cumulative number of RTP packets 277 lost over the entire RTP session. 279 These congestion signals limit the possible circuit breakers, since 280 they give only limited visibility into the behaviour of the network. 282 RTT estimates are widely used in congestion control algorithms, as a 283 proxy for queuing delay measures in delay-based congestion control or 284 to determine connection timeouts. RTT estimates derived from RTCP SR 285 and RR packets sent according to the RTP/AVP timing rules are far too 286 infrequent to be useful though, and don't give enough information to 287 distinguish a delay change due to routing updates from queuing delay 288 caused by congestion. Accordingly, we cannot use the RTT estimate 289 alone as an RTP circuit breaker. 291 Increased jitter can be a signal of transient network congestion, but 292 in the highly aggregated form reported in RTCP RR packets, it offers 293 insufficient information to estimate the extent or persistence of 294 congestion. Jitter reports are a useful early warning of potential 295 network congestion, but provide an insufficiently strong signal to be 296 used as a circuit breaker. 298 The remaining congestion signals are the packet loss fraction and the 299 cumulative number of packets lost. If considered carefully, these 300 can be effective indicators that congestion is occurring in networks 301 where packet loss is primarily due to queue overflows, although loss 302 caused by non-congestive packet corruption can distort the result in 303 some networks. TCP congestion control intentionally tries to fill 304 the router queues, and uses the resulting packet loss as congestion 305 feedback. An RTP flow competing with TCP traffic will therefore 306 expect to see a non-zero packet loss fraction that has to be related 307 to TCP dynamics to estimate available capacity. This behaviour of 308 TCP is reflected in the congestion circuit breaker below, and will 309 affect the design of any RTP congestion control protocol. 311 Two packet loss regimes can be observed: 1) RTCP RR packets show a 312 non-zero packet loss fraction, while the extended highest sequence 313 number received continues to increment; and 2) RR packets show a loss 314 fraction of zero, but the extended highest sequence number received 315 does not increment even though the sender has been transmitting RTP 316 data packets. The former corresponds to the TCP congestion avoidance 317 state, and indicates a congested path that is still delivering data; 318 the latter corresponds to a TCP timeout, and is most likely due to a 319 path failure. A third condition is that data is being sent but no 320 RTCP feedback is received at all, corresponding to a failure of the 321 reverse path. We derive circuit breaker conditions for these loss 322 regimes in the following. 324 4.1. RTP/AVP Circuit Breaker #1: Media Timeout 326 If RTP data packets are being sent, but the RTCP SR or RR packets 327 reporting on that SSRC indicate a non-increasing extended highest 328 sequence number received, this is an indication that those RTP data 329 packets are not reaching the receiver. This could be a short-term 330 issue affecting only a few packets, perhaps caused by a slow-to-open 331 firewall or a transient connectivity problem, but if the issue 332 persists, it is a sign of a more ongoing and significant problem. 333 Accordingly, if a sender of RTP data packets receives two or more 334 consecutive RTCP SR or RR packets from the same receiver, and those 335 packets correspond to its transmission and have a non-increasing 336 extended highest sequence number received field (i.e., the sender 337 receivers at least three RTCP SR or RR packets that report the same 338 value in the extended highest sequence number received field for an 339 SSRC, but the sender has sent RTP data packets for that SSRC that 340 would have caused an increase in the reported value of the extended 341 highest sequence number received if they had reached the receiver), 342 then that sender SHOULD cease transmission (see Section 4.5). 344 The reason for waiting for two or more consecutive RTCP packets with 345 a non-increasing extended highest sequence number is to give enough 346 time for transient reception problems to resolve themselves, but to 347 stop problem flows quickly enough to avoid causing serious ongoing 348 network congestion. A single RTCP report showing no reception could 349 be caused by a transient fault, and so will not cease transmission. 350 Waiting for more than two consecutive RTCP reports before stopping a 351 flow might avoid some false positives, but could lead to problematic 352 flows running for a long time period (potentially tens of seconds, 353 depending on the RTCP reporting interval) before being cut off. 355 4.2. RTP/AVP Circuit Breaker #2: RTCP Timeout 357 In addition to media timeouts, as were discussed in Section 4.1, an 358 RTP session has the possibility of an RTCP timeout. This can occur 359 when RTP data packets are being sent, but there are no RTCP reports 360 returned from the receiver. This is either due to a failure of the 361 receiver to send RTCP reports, or a failure of the return path that 362 is preventing those RTCP reporting from being delivered. In either 363 case, it is not safe to continue transmission, since the sender has 364 no way of knowing if it is causing congestion. Accordingly, an RTP 365 sender that has not received any RTCP SR or RTCP RR packets reporting 366 on the SSRC it is using for three or more RTCP reporting intervals 367 SHOULD cease transmission (see Section 4.5). When calculating the 368 timeout, the fixed minimum RTCP reporting interval SHOULD be used 369 (based on the rationale in Section 6.2 of RFC 3550 [RFC3550]). 371 The choice of three RTCP reporting intervals as the timeout is made 372 following Section 6.3.5 of RFC 3550 [RFC3550]. This specifies that 373 participants in an RTP session will timeout and remove an RTP sender 374 from the list of active RTP senders if no RTP data packets have been 375 received from that RTP sender within the last two RTCP reporting 376 intervals. Using a timeout of three RTCP reporting intervals is 377 therefore large enough that the other participants will have timed 378 out the sender if a network problem stops the data packets it is 379 sending from reaching the receivers, even allowing for loss of some 380 RTCP packets. 382 If a sender is transmitting a large number of RTP media streams, such 383 that the corresponding RTCP SR or RR packets are too large to fit 384 into the network MTU, this will force the receiver to generate RTCP 385 SR or RR packets in a round-robin manner. In this case, the sender 386 MAY treat receipt of an RTCP SR or RR packet corresponding to an SSRC 387 it sent using the same 5-tuple of source and destination IP address, 388 port, and protocol, as an indication that the receiver and return 389 path are working to prevent the RTCP timeout circuit breaker from 390 triggering. 392 4.3. RTP/AVP Circuit Breaker #3: Congestion 394 If RTP data packets are being sent, and the corresponding RTCP SR or 395 RR packets show non-zero packet loss fraction and increasing extended 396 highest sequence number received, then those RTP data packets are 397 arriving at the receiver, but some degree of congestion is occurring. 398 The RTP/AVP profile [RFC3551] states that: 400 If best-effort service is being used, RTP receivers SHOULD monitor 401 packet loss to ensure that the packet loss rate is within 402 acceptable parameters. Packet loss is considered acceptable if a 403 TCP flow across the same network path and experiencing the same 404 network conditions would achieve an average throughput, measured 405 on a reasonable time scale, that is not less than the RTP flow is 406 achieving. This condition can be satisfied by implementing 407 congestion control mechanisms to adapt the transmission rate (or 408 the number of layers subscribed for a layered multicast session), 409 or by arranging for a receiver to leave the session if the loss 410 rate is unacceptably high. 412 The comparison to TCP cannot be specified exactly, but is intended 413 as an "order-of-magnitude" comparison in time scale and 414 throughput. The time scale on which TCP throughput is measured is 415 the round-trip time of the connection. In essence, this 416 requirement states that it is not acceptable to deploy an 417 application (using RTP or any other transport protocol) on the 418 best-effort Internet which consumes bandwidth arbitrarily and does 419 not compete fairly with TCP within an order of magnitude. 421 The phase "order of magnitude" in the above means within a factor of 422 ten, approximately. In order to implement this, it is necessary to 423 estimate the throughput a TCP connection would achieve over the path. 424 For a long-lived TCP Reno connection, it has been shown that the TCP 425 throughput can be estimated using the following equation [Padhye]: 427 s 428 X = -------------------------------------------------------------- 429 R*sqrt(2*b*p/3) + (t_RTO * (3*sqrt(3*b*p/8) * p * (1+32*p^2))) 431 where: 433 X is the transmit rate in bytes/second. 435 s is the packet size in bytes. If data packets vary in size, then 436 the average size is to be used. 438 R is the round trip time in seconds. 440 p is the loss event rate, between 0 and 1.0, of the number of loss 441 events as a fraction of the number of packets transmitted. 443 t_RTO is the TCP retransmission timeout value in seconds, generally 444 approximated by setting t_RTO = 4*R. 446 b is the number of packets that are acknowledged by a single TCP 447 acknowledgement; [RFC3448] recommends the use of b=1 since many 448 TCP implementations do not use delayed acknowledgements. 450 This is the same approach to estimated TCP throughput that is used in 451 [RFC3448]. Under conditions of low packet loss, this formula can be 452 approximated as follows with reasonable accuracy [Mathis]: 454 s 455 X = --------------- 456 R * sqrt(p*2/3) 458 It is RECOMMENDED that this simplified throughout equation be used, 459 since the reduction in accuracy is small, and it is much simpler to 460 calculate than the full equation. Measurements have shown that the 461 simplified TCP throughput equation is effective as an RTP circuit 462 breaker for multimedia flows sent to hosts on residential networks 463 using ADSL and cable modem links [Singh]. The data shows that the 464 full TCP throughput equation tends to be more sensitive to packet 465 loss and triggers the RTP circuit breaker earlier than the simplified 466 equation. Implementations that desire this extra sensitivity MAY use 467 the full TCP throughput equation in the RTP circuit breaker. Initial 468 measurements in LTE networks have shown that the extra sensitivity is 469 helpful in that environment, with the full TCP throughput equation 470 giving a more balanced circuit breaker response than the simplified 471 TCP equation [Sarker]; other networks might see similar behaviour. 473 No matter what TCP throughput equation is chosen, two parameters need 474 to be estimated and reported to the sender in order to calculate the 475 throughput: the round trip time, R, and the loss event rate, p (the 476 packet size, s, is known to the sender). The round trip time can be 477 estimated from RTCP SR and RR packets. This is done too infrequently 478 for accurate statistics, but is the best that can be done with the 479 standard RTCP mechanisms. 481 Report blocks in RTCP SR or RR packets contain the packet loss 482 fraction, rather than the loss event rate, so p cannot be reported 483 (TCP typically treats the loss of multiple packets within a single 484 RTT as one loss event, but RTCP RR packets report the overall 485 fraction of packets lost, not caring about when the losses occurred). 486 Using the loss fraction in place of the loss event rate can 487 overestimate the loss. We believe that this overestimate will not be 488 significant, given that we are only interested in order of magnitude 489 comparison ([Floyd] section 3.2.1 shows that the difference is small 490 for steady-state conditions and random loss, but using the loss 491 fraction is more conservative in the case of bursty loss). 493 The congestion circuit breaker is therefore: when a sender receives 494 an RTCP SR or RR packet that contains a report block for an SSRC it 495 is using, that sender has to check the fraction lost field in that 496 report block to determine if there is a non-zero packet loss rate. 497 If the fraction lost field is zero, then continue sending as normal. 498 If the fraction lost is greater than zero, then estimate the TCP 499 throughput using the simplified equation above, and the measured R, p 500 (approximated by the fraction lost), and s. Compare this with the 501 actual sending rate. If the actual sending rate is more than ten 502 times the estimated sending rate derived from the TCP throughput 503 equation for two consecutive RTCP reporting intervals, the sender 504 SHOULD cease transmission (see Section 4.5). Systems that usually 505 send at a high data rate, but that can reduce their data rate 506 significantly (i.e., by at least a factor of ten), MAY first reduce 507 their sending rate to this lower value to see if this resolves the 508 congestion, but MUST then cease transmission if the problem does not 509 resolve itself within a further two RTCP reporting intervals (see 510 Section 4.5). An example of this might be a video conferencing 511 system that backs off to sending audio only, before completely 512 dropping the call. If such a reduction in sending rate resolves the 513 congestion problem, the sender MAY gradually increase the rate at 514 which it sends data after a reasonable amount of time has passed, 515 provided it takes care not to cause the problem to recur 516 ("reasonable" is intentionally not defined here). 518 If the incoming RTCP SR or RR packets are using a reduced minimum 519 RTCP reporting interval (as specified in Section 6.2 of RFC 3550 520 [RFC3550] or the RTP/AVPF profile [RFC4585]), then that reduced RTCP 521 reporting interval is used when determining if the circuit breaker is 522 triggered. The RTCP reporting interval of the media sender does not 523 affect how quickly congestion circuit breaker can trigger. The 524 timing is based on the RTCP reporting interval of the receiver that 525 matters (note that RTCP requires all participants in a session to 526 have similar reporting intervals, else the participant timeout rules 527 in [RFC3550] will not work). 529 As in Section 4.1, we use two reporting intervals to avoid triggering 530 the circuit breaker on transient failures. This circuit breaker is a 531 worst-case condition, and congestion control needs to be performed to 532 keep well within this bound. It is expected that the circuit breaker 533 will only be triggered if the usual congestion control fails for some 534 reason. 536 If there are more media streams that can be reported in a single RTCP 537 SR or RR packet, or if the size of a complete RTCP SR or RR packet 538 exceeds the network MTU, then the receiver will report on a subset of 539 sources in each reporting interval, with the subsets selected round- 540 robin across multiple intervals so that all sources are eventually 541 reported [RFC3550]. When generating such round-robin RTCP reports, 542 priority SHOULD be given to reports on sources that have high packet 543 loss rates, to ensure that senders are aware of network congestion 544 they are causing (this is an update to [RFC3550]). 546 4.4. RTP/AVP Circuit Breaker #4: Media Usability 548 Applications that use RTP are generally tolerant to some amount of 549 packet loss. How much packet loss can be tolerated will depend on 550 the application, media codec, and the amount of error correction and 551 packet loss concealment that is applied. There is an upper bound on 552 the amount of loss can be corrected, however, beyond which the media 553 becomes unusable. Similarly, many applications have some upper bound 554 on the media capture to play-out latency that can be tolerated before 555 the application becomes unusable. The latency bound will depend on 556 the application, but typical values can range from the order of a few 557 hundred milliseconds for voice telephony and interactive conferencing 558 applications, up to several seconds for some video-on-demand systems. 560 As a final circuit breaker, applications SHOULD monitor the reported 561 packet loss and delay to estimate whether the media is suitable for 562 the intended purpose. If the packet loss rate and/or latency is such 563 that the media has become unusable for the application, and has 564 remained unusable for a significant time period, then the application 565 SHOULD cease transmission. This memo intentionally does not define a 566 bound on the packet loss rate or latency that will result in unusable 567 media, nor does it specify what time period is deemed significant, as 568 these are highly application dependent. 570 Sending media that suffers from such high packet loss or latency that 571 it is unusable at the receiver is both wasteful of resources, and of 572 no benefit to the user of the application. It also is highly likely 573 to be congesting the network, and disrupting other applications. As 574 such, the congestion circuit breaker will almost certainly trigger to 575 stop flows where the media would be unusable due to high packet loss 576 or latency. However, in pathological scenarios where the congestion 577 circuit breaker does not stop the flow, it is desirable that the RTP 578 application cease sending useless traffic. The role of the media 579 usability circuit breaker is to protect the network in such cases. 581 4.5. Ceasing Transmission 583 What it means to cease transmission depends on the application, but 584 the intention is that the application will stop sending RTP data 585 packets to a particular destination 3-tuple (transport protocol, 586 destination port, IP address), until the user makes an explicit 587 attempt to restart the call. It is important that a human user is 588 involved in the decision to try to restart the call, since that user 589 will eventually give up if the calls repeatedly trigger the circuit 590 breaker. This will help avoid problems with automatic redial systems 591 from congesting the network. Accordingly, RTP flows halted by the 592 circuit breaker SHOULD NOT be restarted automatically unless the 593 sender has received information that the congestion has dissipated. 595 It is recognised that the RTP implementation in some systems might 596 not be able to determine if a call set-up request was initiated by a 597 human user, or automatically by some scripted higher-level component 598 of the system. These implementations SHOULD rate limit attempts to 599 restart a call to the same destination 3-tuple as used by a previous 600 call that was recently halted by the circuit breaker. The chosen 601 rate limit ought to not exceed the rate at which an annoyed human 602 caller might redial a misbehaving phone. 604 5. RTP Circuit Breakers for Systems Using the RTP/AVPF Profile 606 Use of the Extended RTP Profile for RTCP-based Feedback (RTP/AVPF) 607 [RFC4585] allows receivers to send early RTCP reports in some cases, 608 to inform the sender about particular events in the media stream. 609 There are several use cases for such early RTCP reports, including 610 providing rapid feedback to a sender about the onset of congestion. 612 Receiving rapid feedback about congestion events potentially allows 613 congestion control algorithms to be more responsive, and to better 614 adapt the media transmission to the limitations of the network. It 615 is expected that many RTP congestion control algorithms will adopt 616 the RTP/AVPF profile for this reason, defining new transport layer 617 feedback reports that suit their requirements. Since these reports 618 are not yet defined, and likely very specific to the details of the 619 congestion control algorithm chosen, they cannot be used as part of 620 the generic RTP circuit breaker. 622 If the extension for Reduced-Size RTCP [RFC5506] is not used, early 623 RTCP feedback packets sent according to the RTP/AVPF profile will be 624 compound RTCP packets that include an RTCP SR/RR packet. That RTCP 625 SR/RR packet MUST be processed as if it were sent as a regular RTCP 626 report and counted towards the circuit breaker conditions specified 627 in Section 4 of this memo. This will potentially make the RTP 628 circuit breaker fire earlier than it would if the RTP/AVPF profile 629 was not used. 631 Reduced-size RTCP reports sent under the RTP/AVPF early feedback 632 rules that do not contain an RTCP SR or RR packet MUST be ignored by 633 the RTP circuit breaker (they do not contain the information used by 634 the circuit breaker algorithm). Reduced-size RTCP reports sent under 635 the RTP/AVPF early feedback rules that contain RTCP SR or RR packets 636 MUST be processed as if they were sent as regular RTCP reports, and 637 counted towards the circuit breaker conditions specified in Section 4 638 of this memo. This will potentially make the RTP circuit breaker 639 fire earlier than it would if the RTP/AVPF profile was not used. 641 When using ECN with RTP (see Section 8), early RTCP feedback packets 642 can contain ECN feedback reports. The count of ECN-CE marked packets 643 contained in those ECN feedback reports is counted towards the number 644 of lost packets reported if the ECN Feedback Report report is sent in 645 an compound RTCP packet along with an RTCP SR/RR report packet. 646 Reports of ECN-CE packets sent as reduced-size RTCP ECN feedback 647 packets without an RTCP SR/RR packet MUST be ignored. 649 These rules are intended to allow the use of low-overhead early RTP/ 650 AVPF feedback for generic NACK messages without triggering the RTP 651 circuit breaker. This is expected to make such feedback suitable for 652 RTP congestion control algorithms that need to quickly report loss 653 events in between regular RTCP reports. The reaction to reduced-size 654 RTCP SR/RR packets is to allow such algorithms to send feedback that 655 can trigger the circuit breaker, when desired. 657 6. Impact of RTCP XR 659 RTCP Extended Report (XR) blocks provide additional reception quality 660 metrics, but do not change the RTCP timing rules. Some of the RTCP 661 XR blocks provide information that might be useful for congestion 662 control purposes, others provided non-congestion-related metrics. 663 With the exception of RTCP XR ECN Summary Reports (see Section 8), 664 the presence of RTCP XR blocks in a compound RTCP packet does not 665 affect the RTP circuit breaker algorithm. For consistency and ease 666 of implementation, only the reception report blocks contained in RTCP 667 SR packets, RTCP RR packets, or RTCP XR ECN Summary Report packets, 668 are used by the RTP circuit breaker algorithm. 670 7. Impact of RTCP Reporting Groups 672 An optimisation for grouping RTCP reception statistics and other 673 feedback in RTP sessions with large numbers of participants is given 674 in [I-D.ietf-avtcore-rtp-multi-stream-optimisation]. This allows one 675 SSRC to act as a representative that sends reports on behalf of other 676 SSRCs that are co-located in the same endpoint and see identical 677 reception quality. When running the circuit breaker algorithms, an 678 endpoint MUST treat a reception report from the representative of the 679 reporting group as if a reception report was received from all 680 members of that group. 682 8. Impact of Explicit Congestion Notification (ECN) 684 The use of ECN for RTP flows does not affect the media timeout RTP 685 circuit breaker (Section 4.1) or the RTCP timeout circuit breaker 686 (Section 4.2), since these are both connectivity checks that simply 687 determinate if any packets are being received. 689 ECN-CE marked packets SHOULD be treated as if it were lost for the 690 purposes of congestion control, when determining the optimal media 691 sending rate for an RTP flow. If an RTP sender has negotiated ECN 692 support for an RTP session, and has successfully initiated ECN use on 693 the path to the receiver [RFC6679], then ECN-CE marked packets SHOULD 694 be treated as if they were lost when calculating if the congestion- 695 based RTP circuit breaker (Section 4.3) has been met. The count of 696 ECN-CE marked RTP packets is returned in RTCP XR ECN summary report 697 packets if support for ECN has been initiated for an RTP session. 699 9. Security Considerations 701 The security considerations of [RFC3550] apply. 703 If the RTP/AVPF profile is used to provide rapid RTCP feedback, the 704 security considerations of [RFC4585] apply. If ECN feedback for RTP 705 over UDP/IP is used, the security considerations of [RFC6679] apply. 707 If non-authenticated RTCP reports are used, an on-path attacker can 708 trivially generate fake RTCP packets that indicate high packet loss 709 rates, causing the circuit breaker to trigger and disrupting an RTP 710 session. This is somewhat more difficult for an off-path attacker, 711 due to the need to guess the randomly chosen RTP SSRC value and the 712 RTP sequence number. This attack can be avoided if RTCP packets are 713 authenticated, for example using the Secure RTP profile [RFC3711]. 715 10. IANA Considerations 717 There are no actions for IANA. 719 11. Acknowledgements 721 The authors would like to thank Bernard Aboba, Harald Alvestrand, 722 Kevin Gross, Cullen Jennings, Randell Jesup, Jonathan Lennox, Matt 723 Mathis, Stephen McQuistin, Eric Rescorla, and Abheek Saha for their 724 valuable feedback. 726 12. References 728 12.1. Normative References 730 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 731 Requirement Levels", BCP 14, RFC 2119, March 1997. 733 [RFC3448] Handley, M., Floyd, S., Padhye, J., and J. Widmer, "TCP 734 Friendly Rate Control (TFRC): Protocol Specification", RFC 735 3448, January 2003. 737 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 738 Jacobson, "RTP: A Transport Protocol for Real-Time 739 Applications", STD 64, RFC 3550, July 2003. 741 [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and 742 Video Conferences with Minimal Control", STD 65, RFC 3551, 743 July 2003. 745 [RFC3611] Friedman, T., Caceres, R., and A. Clark, "RTP Control 746 Protocol Extended Reports (RTCP XR)", RFC 3611, November 747 2003. 749 [RFC4585] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey, 750 "Extended RTP Profile for Real-time Transport Control 751 Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, July 752 2006. 754 12.2. Informative References 756 [Floyd] Floyd, S., Handley, M., Padhye, J., and J. Widmer, 757 "Equation-Based Congestion Control for Unicast 758 Applications", Proceedings of the ACM SIGCOMM conference, 759 2000, DOI 10.1145/347059.347397, August 2000. 761 [I-D.ietf-avtcore-rtp-multi-stream-optimisation] 762 Lennox, J., Westerlund, M., Wu, W., and C. Perkins, 763 "Sending Multiple Media Streams in a Single RTP Session: 764 Grouping RTCP Reception Statistics and Other Feedback", 765 draft-ietf-avtcore-rtp-multi-stream-optimisation-01 (work 766 in progress), January 2014. 768 [Mathis] Mathis, M., Semke, J., Mahdavi, J., and T. Ott, "The 769 macroscopic behavior of the TCP congestion avoidance 770 algorithm", ACM SIGCOMM Computer Communication Review 771 27(3), DOI 10.1145/263932.264023, July 1997. 773 [Padhye] Padhye, J., Firoiu, V., Towsley, D., and J. Kurose, 774 "Modeling TCP Throughput: A Simple Model and its Empirical 775 Validation", Proceedings of the ACM SIGCOMM conference, 776 1998, DOI 10.1145/285237.285291, August 1998. 778 [RFC3168] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition 779 of Explicit Congestion Notification (ECN) to IP", RFC 780 3168, September 2001. 782 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 783 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 784 RFC 3711, March 2004. 786 [RFC5104] Wenger, S., Chandra, U., Westerlund, M., and B. Burman, 787 "Codec Control Messages in the RTP Audio-Visual Profile 788 with Feedback (AVPF)", RFC 5104, February 2008. 790 [RFC5450] Singer, D. and H. Desineni, "Transmission Time Offsets in 791 RTP Streams", RFC 5450, March 2009. 793 [RFC5506] Johansson, I. and M. Westerlund, "Support for Reduced-Size 794 Real-Time Transport Control Protocol (RTCP): Opportunities 795 and Consequences", RFC 5506, April 2009. 797 [RFC6051] Perkins, C. and T. Schierl, "Rapid Synchronisation of RTP 798 Flows", RFC 6051, November 2010. 800 [RFC6679] Westerlund, M., Johansson, I., Perkins, C., O'Hanlon, P., 801 and K. Carlberg, "Explicit Congestion Notification (ECN) 802 for RTP over UDP", RFC 6679, August 2012. 804 [RFC6798] Clark, A. and Q. Wu, "RTP Control Protocol (RTCP) Extended 805 Report (XR) Block for Packet Delay Variation Metric 806 Reporting", RFC 6798, November 2012. 808 [RFC6843] Clark, A., Gross, K., and Q. Wu, "RTP Control Protocol 809 (RTCP) Extended Report (XR) Block for Delay Metric 810 Reporting", RFC 6843, January 2013. 812 [RFC6958] Clark, A., Zhang, S., Zhao, J., and Q. Wu, "RTP Control 813 Protocol (RTCP) Extended Report (XR) Block for Burst/Gap 814 Loss Metric Reporting", RFC 6958, May 2013. 816 [RFC7002] Clark, A., Zorn, G., and Q. Wu, "RTP Control Protocol 817 (RTCP) Extended Report (XR) Block for Discard Count Metric 818 Reporting", RFC 7002, September 2013. 820 [RFC7003] Clark, A., Huang, R., and Q. Wu, "RTP Control Protocol 821 (RTCP) Extended Report (XR) Block for Burst/Gap Discard 822 Metric Reporting", RFC 7003, September 2013. 824 [RFC7097] Ott, J., Singh, V., and I. Curcio, "RTP Control Protocol 825 (RTCP) Extended Report (XR) for RLE of Discarded Packets", 826 RFC 7097, January 2014. 828 [Sarker] Sarker, Z., Singh, V., and C.S. Perkins, "An Evaluation of 829 RTP Circuit Breaker Performance on LTE Networks", 830 Proceedings of the IEEE Infocom workshop on Communication 831 and Networking Techniques for Contemporary Video, 2014, 832 April 2014. 834 [Singh] Singh, V., McQuistin, S., Ellis, M., and C.S. Perkins, 835 "Circuit Breakers for Multimedia Congestion Control", 836 Proceedings of the International Packet Video Workshop, 837 2013, DOI 10.1109/PV.2013.6691439, December 2013. 839 Authors' Addresses 841 Colin Perkins 842 University of Glasgow 843 School of Computing Science 844 Glasgow G12 8QQ 845 United Kingdom 847 Email: csp@csperkins.org 848 Varun Singh 849 Aalto University 850 School of Electrical Engineering 851 Otakaari 5 A 852 Espoo, FIN 02150 853 Finland 855 Email: varun@comnet.tkk.fi 856 URI: http://www.netlab.tkk.fi/~varun/