Network Working Group A. Niemi Internet-Draft Nokia Research Center Expires: August 25, 2005 February 21, 2005 Session Initiation Protocol (SIP) Event Notification Throttle Mechanism draft-niemi-sipping-event-throttle-02 Status of this Memo This document is an Internet-Draft and is subject to all provisions of Section 3 of RFC 3667. By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she become aware will be disclosed, in accordance with RFC 3668. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on August 25, 2005. Copyright Notice Copyright (C) The Internet Society (2005). Abstract This memo specifies a throttle mechanism for limiting the rate of Session Initiation Protocol (SIP) event notifications. This mechanism can be applied in subscriptions to all SIP event packages. Niemi Expires August 25, 2005 [Page 1] Internet-Draft Event Throttle February 2005 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Definitions and Document Conventions . . . . . . . . . . . . . 3 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1 Use Case . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1.1 Pre-conditions . . . . . . . . . . . . . . . . . . . . 4 3.1.2 Normal Flow . . . . . . . . . . . . . . . . . . . . . 4 3.1.3 Alternative Flow I . . . . . . . . . . . . . . . . . . 4 3.1.4 ALternative Flow II . . . . . . . . . . . . . . . . . 5 3.1.5 Post-conditions . . . . . . . . . . . . . . . . . . . 5 3.2 Requirements . . . . . . . . . . . . . . . . . . . . . . . 6 3.3 Event Throttle Model . . . . . . . . . . . . . . . . . . . 7 3.4 Basic Operation . . . . . . . . . . . . . . . . . . . . . 8 4. Operation of Event Throttles . . . . . . . . . . . . . . . . . 8 4.1 Negotiating the Use of Throttle . . . . . . . . . . . . . 8 4.2 Setting the Throttle . . . . . . . . . . . . . . . . . . . 9 4.2.1 Subscriber Behavior . . . . . . . . . . . . . . . . . 9 4.2.2 Notifier Behavior . . . . . . . . . . . . . . . . . . 9 4.3 Selecting the Throttle Interval . . . . . . . . . . . . . 10 4.4 Buffer Policy Description . . . . . . . . . . . . . . . . 10 4.4.1 Partial State Notifications . . . . . . . . . . . . . 10 4.4.2 Full State Notifications . . . . . . . . . . . . . . . 11 4.5 Estimated Bandwidth Savings . . . . . . . . . . . . . . . 11 5. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5.1 "event-throttle" SIP Option-tag . . . . . . . . . . . . . 12 5.2 "throttle" Header Field Parameter . . . . . . . . . . . . 12 5.3 Augmented BNF Definitions . . . . . . . . . . . . . . . . 12 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 7. Security Considerations . . . . . . . . . . . . . . . . . . . 13 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 13 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 13 9.1 Normative References . . . . . . . . . . . . . . . . . . . 13 9.2 Informative References . . . . . . . . . . . . . . . . . . 13 Author's Address . . . . . . . . . . . . . . . . . . . . . . . 14 Intellectual Property and Copyright Statements . . . . . . . . 15 Niemi Expires August 25, 2005 [Page 2] Internet-Draft Event Throttle February 2005 1. Introduction The SIP events framework [1] defines a generic framework for subscriptions to and notifications of events related to SIP systems. This framework defines the methods SUBSCRIBE and NOTIFY, and introduces the concept of an event package, which is a concrete application of the SIP events framework to a particular class of events. One of the things the SIP events framework mandates is that each event package specification defines an absolute maximum on the rate at which notifications are allowed to be generated by a single notifier. Such a limit is provided in order to reduce network congestion. All of the existing event package specifications include a maximum notification rate recommendation, ranging from once in every five seconds [5], [6], [7] to once per second [8]. Per the SIP events framework, each event package specification is also allowed to define additional throttle mechanisms which allow the subscriber to further limit the rate of event notification. So far none of the event package specifications have defined such a mechanism. This document defines an extension to the SIP events framework that allows a subscriber to set a throttle to event notifications generated by the notifier. The requirements and model for generic event throttles are further discussed in Section 3. A throttle is simply a timer value that indicates the minimum time period allowed between two notifications. As a result of this throttle, a compliant notifier will limit the rate at which it generates notifications. 2. Definitions and Document Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [2] and indicate requirement levels for compliant implementations. Indented passages such as this one are used in this document to provide additional information and clarifying text. They do not contain normative protocol behavior. 3. Overview Niemi Expires August 25, 2005 [Page 3] Internet-Draft Event Throttle February 2005 3.1 Use Case There are many applications that potentially would make use of a throttle mechanism. This chapter only illustrates one possible use case, in which a mobile device uses the event throttling mechanism to limit the amount of traffic it may expect to receive. 3.1.1 Pre-conditions A presence application in Lisa's mobile device contains a list of 100 buddies or presentities. In order to decrease the processing and network load of watching 100 presentities, Lisa's presence application has included an event throttle to each of the subscriptions, limiting the maximum rate at which notifications are to be generated to once per 20 seconds. Heikki is one of the presentities Lisa is watching. Heikki's presence agent conforms to the throttling policy requested by Lisa's presence application. The event package includes only full-state notifications. 3.1.2 Normal Flow o Heikki publishes a presence status of "red", which results in a presence notification to be sent to Lisa. o In 10 seconds, Heikki publishes a presence status of "blue". As the throttling policy set by Lisa only allows the presence agent to generate notifications at a maximum of once per 20 seconds, the notification is put on hold. o After another 10 seconds, the notification is allowed to be sent to Lisa. o Lisa receives a presence update conforming to the set throttling policy. 3.1.3 Alternative Flow I o Heikki publishes a presence status of "red", which results in a presence notification to be sent to Lisa. o In 10 seconds, Heikki publishes a presence status of "blue". As the throttling policy set by Lisa only allows the presence agent to generate notifications at a maximum rate of once per 20 seconds, the notification is put on hold. Niemi Expires August 25, 2005 [Page 4] Internet-Draft Event Throttle February 2005 o After another 5 seconds, Heikki publishes a presence status of "green". The resulting notification is not conformant to the throttling policy set by Lisa and is therefore put on hold, replacing the earlier queued notification (the one containing the status of "blue"). o Lisa receives a presence update conforming to the set throttling policy and containing the "green" status. 3.1.4 ALternative Flow II Instead of full state, the notifications now contain partial state. o Heikki publishes a presence status of "red", which results in a presence notification to be sent to Lisa. o In 10 seconds, Heikki publishes a changed presence status of "blue". As the throttling policy set by Lisa only allows the presence agent to generate notifications at a maximum rate of once per 20 seconds, the notification is put on hold. o After another 5 seconds, Heikki publishes an additional presence status of "bitter". The resulting notification is not conformant to the throttling policy set by Lisa and is therefore put on hold. Since there already exists a queued notification (that of the "blue" status), the notifier merges the two notifications into a single notification (containing both "blue" and "bitter" statuses). o Lisa receives a presence update conforming to the set throttling policy and containing the "blue" and "bitter" status. 3.1.5 Post-conditions Lisa receives notifications of Heikki's presence at a maximum of once per 20 seconds. Only newest notifications containing full-state are ever sent to Lisa. With partial-notifications, the notifier merges the states of all notifications generated within a single 20 second period. Given a default maximum notification rate of once per 5 seconds, and the average notification header size of X and payload size of Y bytes, the total maximum bandwidth consumption for full state notifications during a single 60 minute subscription is: 100 * (X + Y) * 1 / 5 s * 3600 s = 72000 (X + Y) Niemi Expires August 25, 2005 [Page 5] Internet-Draft Event Throttle February 2005 The total maximum bandwidth consumption using a throttle value of 20 seconds: 100 * (X + Y) * 1 / 20 s * 3600 = 18000 (X + Y) Yielding a total bandwidth savings of 75%. With partial notifications, using a worst-case scenario of totally non-overlapping partial updates, the total maximum bandwidth consumption for partial state notifications with an average payload size of Y' within a 60 minute subscription is: 100 * (X + Y') * 1 / 5 s * 3600 = 72000 (X + Y') And with throttled partial state notifications using a 20 second throttle interval, the maximum bandwidth consumption within a 60 minute subscription is: (100 * X * 1 / 20 s * 3600) + (100 * Y' * 1 / 5 s * 3600) = 18000 X + 72000 Y' Yielding the same 75% bandwidth savings but only in terms of header size. These can still be regarded as considerable savings, depending of course on what the exact average sizes of partial notifications and their headers are. 3.2 Requirements REQ1: The subscriber must be able to set using a throttle mechanism the minimum time period between two notifications in a specific subscription. REQ2: The subscriber must be able to indicate that it requires the notifier to comply with the suggested throttling policy in a specific subscription. REQ3: The notifier must be able to indicate that it does not support the use of a throttle mechanism in the subscription. REQ4: It must be possible to use the throttle mechanism in subscriptions to all events. REQ5: It must be possible to use the throttle mechanism together with any event filtering mechanism. REQ6: The notifier must be allowed to use a throttling policy in which the minimum time period between two notifications is longer than the one given by the subscriber. Niemi Expires August 25, 2005 [Page 6] Internet-Draft Event Throttle February 2005 For example, due to congestion reasons, local policy at the notifier could temporarily dictate a throttling policy that in effect increases the subscriber-configured minimum time period between two notifications. REQ7: The throttle mechanism must provide a reasonable resolution for setting the minimum period between two notifications. At a minimum, the throttling mechanism must include discussion of the situation resulting from a minimum time period which exceeds the subscription duration, and should provide mechanisms for avoiding this situation. REQ8: A throttle mechanism must allow for the application of authentication and integrity protection mechanisms to subscriptions invoking that mechanism. Note that Section 7 contains further discussion on the security implications of the throttle mechanism. 3.3 Event Throttle Model The notifier is responsible for sending out event notifications upon state changes of the subscribed resource. We can model the notifier as consisting of three components: the event state source S, the packetizer P and the output buffer Bo, as shown in Figure 5. ,-. ,' `. Bo +-----+ ; : +-+-+-+ | S |----->| P |---->| | | | +-----+ : ; +-+-+-+ `. ,' `-' Figure 5: Model for the notifier In short, the notifier reads event state changes from the event state source, packages them into event notifications, and submits them into the output buffer. The rate at which this output buffer drains is controlled by the subscriber via the event throttle mechanism. In theory, there are many buffer policies that the notifier could implement. However, we only concentrate on two practical buffer policies in this specification, leaving additional ones for further study and out of the scope of this work. These two buffer policies depend on the mode in which the notifier is operating: Niemi Expires August 25, 2005 [Page 7] Internet-Draft Event Throttle February 2005 Full-state: Last notification in is sent out, and all others in the buffer are discarded. This policy applies to those event packages that carry full-state notifications. Partial-state: The states of buffered notifications are merged, and the resulting notification is sent out. This policy applies to those event packages that carry partial-state notifications. 3.4 Basic Operation A subscriber that wants to limit the rate of event notification in a specific subscription does so by suggesting a throttle as part of the SUBSCRIBE message. The throttle indicating the minimum time allowed between transmission of two consecutive notifications in a subscription is given as an Event header parameter in the SUBSCRIBE request. Note that the witnessed time between two consecutive received notifications may not conform to the set throttle for a number of reasons. For example, network jitter and retransmissions may result in the subscriber receiving the notifications in lesser intervals than what the throttle allows for. The subscriber also indicates that it requires the throttle to be applied to the subscription. This is done using the SIP option-tag mechanism, by insisting that the notifier applies the event throttle extension when processing the request. A notifier that does not support the event throttle extension will reject the subscription. A notifier that supports the throttle mechanism will comply with value given in the throttle, and adjust its rate of notification accordingly. Throttled notifications will have exactly the same properties as the un-throttled ones, with the exception that they will not be generated more frequent than what the throttle allows. 4. Operation of Event Throttles 4.1 Negotiating the Use of Throttle This specification uses the SIP option-tag mechanism for negotiating use of the throttle mechanism. Use of the "Require" header field and the 420 (Bad Extension) response are according to SIP [3]. A subscriber that wishes to apply a throttle to notifications in a subscription contsructs a SUBSCRIBE request such that it includes a Niemi Expires August 25, 2005 [Page 8] Internet-Draft Event Throttle February 2005 Require header field containing an "event-throttle" option-tag. A notifier that does not understand the event-throttle extension, will respond with a 420 (Bad Extension) response. Otherwise, the throttle is processed by the notifier, and the notification rate is adjusted accordingly. 4.2 Setting the Throttle 4.2.1 Subscriber Behavior In general, the way in which a subscriber generates SUBSCRIBE requests and processes NOTIFY requests is according to RFC 3265 [1]. A subscriber that wishes to throttle the notifications in a subscription includes a "throttle" Event header parameter in the SUBSCRIBE request, indicating in seconds the desired throttle value. The value of this parameter is an integral number of seconds in decimal. In case the notifier does not support the "event-throttle" extension, the subscriber SHOULD retry the subscription without that throttle extension present, unless doing so would overly burden the subscriber. In this case the subscriber can resort to other means of limiting the notification rate. For example, instead of a subscription, it can fetch or poll the event state. There are two main consequencies for the subscriber when applying the throttle mechanism: state transitions may be lost, and event notifications may be delayed. If either of these side effects constitute a problem to the application that is to utilize event throttles, developers are instructed not to use the mechanism. 4.2.2 Notifier Behavior In general, the way in which a notifier processes SUBSCRIBE requests and generates NOTIFY requests is according to RFC 3265 [1]. A notifier that supports the "event-throttle" extension extracts the value of the "throttle" Event header parameter, and uses it as the minimum time allowed between two notifications. A compliant notifier MUST NOT generate notifications more frequent than what the throttle allows for, except when generating the notification either upon receipt of a SUBSCRIBE request (the first notification) or upon termination of the subscription (the last Niemi Expires August 25, 2005 [Page 9] Internet-Draft Event Throttle February 2005 notification). Such notifications reset the throttle timer, even though they do not need to abide by it. Retransmissions of NOTIFY requests are not affected by the throttle, i.e., the throttle only applies to the generation of new transactions. In other words, the throttle is reset only after the previous transaction has completed. As specified in RFC 3261 [3] a notifier that supports event throttles SHOULD advertise its support by including the "event-throttle" option-tag in the Supported header field of a response to an OPTIONS request. 4.3 Selecting the Throttle Interval Special care needs to be taken when selecting the throttle value. Using the throttle syntax it is possible to insist both very short and very long throttles to be applied to the subscription. For example, a throttle could potentially set a minimum time value between notifications that exceeds the subscription expiration value. Such a configuration would effectively quench the notifier, resulting in exactly two notifications to be generated. The notifier is responsible for adjusting the proposed throttle value based on its local policy. The notifier MAY lower the throttle value, e.g., because of lowering the subscription expiration. The notifier MUST include the adjusted throttle value in the Subscription-State header field's "throttle" parameter in each of the NOTIFY requests. In addition, different event packages MAY define additional constraints to the allowed throttle intervals. Such constraints are out of the scope of this specification. 4.4 Buffer Policy Description 4.4.1 Partial State Notifications With partial notifications, the notifier will always need to keep both a copy of the current full state of the resource F, as well as the last successfully communicated full state view F' of the resource in a specific subscription. The construction of a partial notification then involves creating a diff of the two states, and generating a notification that contains that diff. When a throttle is applied to the subscription, it is important that F' is replaced with F only when the throttle is reset. Additionally, the notifier implementation SHOULD check to see that the size of an accumulated partial state notification is smaller than the full state, and if not, the notifier SHOULD send the full state Niemi Expires August 25, 2005 [Page 10] Internet-Draft Event Throttle February 2005 notification instead. 4.4.2 Full State Notifications With full state notifications, the notifier only needs to keep the full state of the resource, and when that changes, send the resulting notification over to the subscriber. When a throttle is applied in the subscription, the notifier receives the state changes of the resource, and generates a notification. If there is a pending notification, the notifier simply replaces that notification with the new notification, discarding the older state. 4.5 Estimated Bandwidth Savings As can already be seen from Section 3.1.5, it is difficult to estimate the total bandwidth savings accrued by using the throttle mechanism over a subscription, since such estimates will vary depending on the useage scenarios. However, it is easy to see that given a subscription where several full state notification would have normally been sent in any given throttle interval, a throttled subscription would only send a single notification during the same interval, yielding bandwidth savings of several times the notification size. With partial-state notifications, drawing estimates is further complicated by the fact that the states of consequtive updates may or may not overlap. However, even in the worst case scenario, where each partial update is to a different part of the full state, a throttled notification merging all of these n partial states together is at a maximum the size of a full-state update. In this case, the bandwidth savings are approximately n times the size of the NOTIFY header. It is also true that there are several compression shcemes available that have been designed to save bandwidth in SIP, e.g., SigComp [9] and TLS compression [10]. However, such comression schemes are complementary rather than competing mechanisms to the throttle mechanism. After all, they can both be applied simultaniously, and in such a way that the compound savings are as good as the sum of applying each one alone. 5. Syntax This section describes the syntax extensions required for the throttle mechanism. Niemi Expires August 25, 2005 [Page 11] Internet-Draft Event Throttle February 2005 5.1 "event-throttle" SIP Option-tag The "event-throttle" option-tag is added to the rule definition of the SIP option-tag in the SIP [3] grammar. Usage of this option-tag is defined in Section 4.1. 5.2 "throttle" Header Field Parameter The "throttle" parameter is added to the rule definitions of the Event header field and the Subscription-State header field in the SIP Events [1] grammar. Usage of this parameter is described in section Section 4.2. 5.3 Augmented BNF Definitions This section describes the Augmented BNF [4] definitions for the new syntax elements. Note that we derive here from the ruleset present in both SIP Events [1] and SIP [3], adding additional alternatives to the alternative sets of "event-param", "subexp-params" and "option-tag" defined therein. event-param =/ throttle-param subexp-params =/ throttle-param option-tag =/ throttle-tag throttle-param = "throttle" EQUAL delta-seconds throttle-tag = "event-throttle" 6. IANA Considerations This specification registers a new SIP option tag, defined by the following information which is to be added to the Option Tags sub-registry under http://www.iana.org/assignments/sip-parameters. Name: event-throttle Description: This option tag indicates support for the Session Initiation Protocol event notification throttle mechanism. Its use with the Supported header field indicates support for the throttle mechanism, and its use with the Require header field indicates that the user agent client requires the use of the throttle mechanism in its subscription. This specification also registers a new SIP header field parameter, defined by the following information which is to be added to the Header Field Parameters and Parameter Values sub-registry under http://www.iana.org/assignments/sip-parameters. Niemi Expires August 25, 2005 [Page 12] Internet-Draft Event Throttle February 2005 Header Field Parameter Name Values Reference -------------------- --------------- --------- --------- Event throttle No [RFCxxxx] Subscription-State throttle No [RFCxxxx] (Note to the RFC Editor: please replace "xxxx" with the RFC number of this specification, when assigned.) 7. Security Considerations Naturally, the security considerations listed in SIP events [1], which the throttle mechanism extends, apply in entirety. In particular, authentication and message integrity SHOULD be applied to subscriptions with the event-throttle extension. 8. Acknowledgements Thanks to Pekka Pessi, Dean Willis, Eric Burger, Alex Audu, Alexander Milinski, Jonathan Rosenberg, Cullen Jennings and Adam Roach for support and/or review of this work. 9. References 9.1 Normative References [1] Roach, A., "Session Initiation Protocol (SIP)-Specific Event Notification", RFC 3265, June 2002. [2] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [3] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M. and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002. [4] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. 9.2 Informative References [5] Rosenberg, J., "A Presence Event Package for the Session Initiation Protocol (SIP)", RFC 3856, August 2004. [6] Rosenberg, J., "A Session Initiation Protocol (SIP) Event Package for Registrations", RFC 3680, March 2004. [7] Rosenberg, J., "A Watcher Information Event Template-Package for the Session Initiation Protocol (SIP)", RFC 3857, August Niemi Expires August 25, 2005 [Page 13] Internet-Draft Event Throttle February 2005 2004. [8] Mahy, R., "A Message Summary and Message Waiting Indication Event Package for the Session Initiation Protocol (SIP)", RFC 3842, August 2004. [9] Price, R., Bormann, C., Christoffersson, J., Hannu, H., Liu, Z. and J. Rosenberg, "Signaling Compression (SigComp)", RFC 3320, January 2003. [10] Friend, R., "Transport Layer Security (TLS) Protocol Compression Using Lempel-Ziv-Stac (LZS)", RFC 3943, November 2004. Author's Address Aki Niemi Nokia Research Center P.O. Box 407 NOKIA GROUP, FIN 00045 Finland Phone: +358 50 389 1644 Email: aki.niemi@nokia.com Niemi Expires August 25, 2005 [Page 14] Internet-Draft Event Throttle February 2005 Intellectual Property Statement The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Disclaimer of Validity This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Copyright Statement Copyright (C) The Internet Society (2005). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society. Niemi Expires August 25, 2005 [Page 15]