Network Working Group | Y. Nishida |
Internet-Draft | GE Global Research |
Intended status: Standards Track | P. Natarajan |
Expires: April 26, 2015 | Cisco Systems |
A. Caro | |
BBN Technologies | |
P. Amer | |
University of Delaware | |
K. Nielsen | |
Ericsson | |
October 23, 2014 |
Quick Failover Algorithm in SCTP
draft-ietf-tsvwg-sctp-failover-07.txt
One of the major advantages of SCTP is that it supports multi-homed communication. A multi-homed SCTP end-point has the ability to withstand network failures by migrating the traffic from an inactive network to an active one. However, if the [RFC4960] specified failover operation is followed there can be a significant delay in the migration to the active destination addresses, thus severely reducing the effectiveness of SCTP multi-homed operation.
The memo complements RFC4960 by the introduction of the Potentially Failed state and associated new Quick Failover operation to apply during network failure and specifies for SCTP senders to support this more performance optimal failover procedure as an add-on to the [RFC4960] failover operation. The memo in addition complements [RFC4960] by introduction of alternative switchover operation modes for the data transfer path management after a failover. These operation modes offer for more performance optimal operation in some network environments. From the perspective of this memo the implementation of the additional switchover operation modes is considered optional.
The procedures defined require only minimal modifications to the current specification. The procedures are sender-side only and do not impact the SCTP receiver.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
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."
This Internet-Draft will expire on April 26, 2015.
Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
The Stream Control Transmission Protocol (SCTP) as specified in [RFC4960] supports multihoming at the transport layer -- an SCTP association can bind to multiple IP addresses at each endpoint. SCTP's multihoming features include failure detection and failover procedures to provide network interface redundancy and improved end-to-end fault tolerance.
In SCTP's current failure detection procedure, the sender must experience Path.Max.Retrans (PMR) number of consecutive failed retransmissions on a destination before detecting a path failure. The sender fails over to an alternate active destination only after failure detection. Until detecting the failover, the sender continues to transmit data on the failed path, which degrades the SCTP performance. Concurrent Multipath Transfer (CMT) [IYENGAR06] is an extension to SCTP and allows the sender to transmit data on multiple paths simultaneously. Research [NATARAJAN09] shows that the current failure detection procedure worsens CMT performance during failover and can be significantly improved by employing a better failover algorithm.
This document specifies an alternative failure detection procedure for SCTP that improves the SCTP performance during a failover.
Also the operation after a failover impacts the performance of the protocol. With [RFC4960] procedures, SCTP will, after a failover from the primary path, switch back to use the primary path for data transfer as soon as this path becomes available. From a performance perspective, as confirmed in research [CARO02], such a switchback of the data transmission path is not optimal in general. As an optional alternative to the switchback operation of [RFC4960], this document specifies for SCTP to support the Permanent Failover switchover procedures proposed by [CARO02]. Additional discussions for alternative approach that does not require modifications to [RFC4960] and path bouncing effects that might be caused by frequent switchover are provided in Appendix.
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 [RFC2119].
This section describes issues in the current SCTP to be fixed by the approach described in this document.
SCTP can utilize multiple IP addresses for a single SCTP association. Each SCTP endpoint exchanges the list of its usable addresses during initial negotiation with its peer. Then the endpoints select one address from the peer's list and define this as the primary destination. During normal transmission, SCTP sends all user data to the primary destination. Also, it sends heartbeat packets to all idle destinations at a certain interval to check the reachability of the path. Idle destinations normally include all non-primary destinations.
If a sender has multiple active destination addresses, it can retransmit data to secondary destination address, when the transmission to the primary times out.
When a sender receives an acknowledgment for DATA or HEARTBEAT chunks sent to one of the destination addresses, it considers that destination to be active. If it fails to receive acknowledgments, the error count for the address is increased. If the error counter exceeds the protocol parameter 'Path.Max.Retrans', SCTP endpoint considers the address to be inactive.
The failover process of SCTP is initiated when the primary path becomes inactive (error counter for the primary path exceeds Path.Max.Retrans). If the primary path is marked inactive, SCTP chooses a new destination address from one of the active destinations and start using this address to send data to. If the primary path becomes active again, SCTP uses the primary destination for subsequent data transmissions and stop using non-primary one.
One issue with this failover process is that it usually takes significant amount of time before SCTP switches to the new destination. Let's say the primary path on a multi-homed host becomes unavailable and the RTO value for the primary path at that time is around 1 second, it usually takes over 60 seconds before SCTP starts to use the secondary path. This is because the recommended value for Path.Max.Retrans in the standard is 5, which requires 6 consecutive timeouts before failover takes place. Before SCTP switches to the secondary address, SCTP keeps trying to send packets to the primary and only retransmitted packets are sent to the secondary and can thus be reached at the receiver. This slow failover process can cause significant performance degradation and will not be acceptable in some situations.
Another issue is that once the primary path is active again, the traffic is switched back. This is not optimal in some situations. This is further discussed in Section 4.3.
To address the issues described in Section 3, this section updates SCTP path management scheme with the Potentially Failed state and associated Quick Failover operation. We use the term SCTP-PF to denote the resulting SCTP path management operation.
SCTP-PF as defined stems from the following two observations about SCTP's failure detection procedure:
From the above observations it is clear that tuning the PMR value involves the following tradeoff -- a lower value improves performance but increases the chances of spurious failure detection, whereas a higher value degrades performance and reduces spurious failure detection in a wide range of path conditions. Thus, tuning the association's PMR value is an incomplete solution to address performance impact during failure.
This new method introduces a new "Potentially-Failed" (PF) destination state in SCTP's path management procedure. The PF state was originally proposed to improve CMT performance [NATARAJAN09]. The PF state is an intermediate state between Active and Failed states. SCTP's failure detection procedure is modified to include the PF state. The new failure detection algorithm assumes that loss detected by a timeout implies either severe congestion or failure en-route. After a number of consecutive timeouts on a path, the sender is unsure, and marks the corresponding destination as PF. A PF destination is not used for data transmission except in special cases (discussed below). The new failure detection algorithm requires only sender-side changes.
SCTP PF operation is specified as follows:
In [RFC4960], an SCTP sender migrates the traffic back to the original primary destination once this destination becomes active again. As the CWND towards the original primary destination has to be rebuilt once data transfer resumes, the switch back to use the original primary path is not always optimal. Indeed [CARO02] shows that the switch back to the original primary may degrade SCTP performance compared to continuing data transmission on the same path, especially, but not only, in scenarios where this path's characteristics are better. In order to mitigate this performance degradation, Permanent Failover operation was proposed in [CARO02]. When SCTP changes the destination due to failover, Permanent Failover operation allows SCTP sender to continue data transmission on the new working path even if the old primary destination becomes active again. This is achieved by having SCTP perform a switch over of the primary path to the alternative working path rather than having SCTP switch back data transfer to the (previous) primary path.
The manner of switch over operation that is most optimal in a given scenario depends on the relative quality of a set primary path versus the quality of alternative paths available as well as it depends on the extent to which it is desired for the mode of operation to enforce traffic distribution over a number of network paths. I.e., load distribution of traffic from multiple SCTP associations may be sought to be enforced by distribution of the set primary paths with [RFC4960] switchback operation. However as [RFC4960] switchback behavior is suboptimal in certain situations, especially in scenarios where a number of equally good paths are available, it is recommended for SCTP to support also, as alternative behavior, the Permanent Failover switch over modes of operation.
The Permanent Failover operation requires only sender side changes. The details are:
This specifications RECOMMENDS a default configuration that uses standard RFC4960 switchback, i.e., switch back to the old primary destination once the destination becomes active again. However, to support optimal operation in a wider range of network scenarios, an implementation MAY implement Permanent Failover operation as detailed above and MAY enable it based on network configurations or users' requests.
This section describes how the socket API defined in [RFC6458] is extended to provide a way for the application to control and observe the quick failover behavior.
Please note that this section is informational only.
A socket API implementation based on [RFC6458] is, by means of the existing SCTP_PEER_ADDR_CHANGE event, extended to provide the event notification when a peer address enters or leaves the potentially failed state as well as the socket API implementation is extended to expose the potentially failed state of a peer address in the existing SCTP_GET_PEER_ADDR_INFO structure.
Furthermore, two new read/write socket options for the level IPPROTO_SCTP and the name SCTP_PEER_ADDR_THLDS and SCTP_EXPOSE_POTENTIALLY_FAILED_STATE are defined as described below. The first socket option is used to control the values of the PFMR and PSMR parameters described in Section 4. The second one controls the exposition of the potentially failed path state.
Support for the SCTP_PEER_ADDR_THLDS and SCTP_EXPOSE_POTENTIALLY_FAILED_STATE socket options need also to be added to the function sctp_opt_info().
As defined in [RFC6458], the SCTP_PEER_ADDR_CHANGE event is provided if the status of a peer address changes. In addition to the state changes described in [RFC6458], this event is also provided, if a peer address enters or leaves the potentially failed state. The notification as defined in [RFC6458] uses the following structure:
struct sctp_paddr_change { uint16_t spc_type; uint16_t spc_flags; uint32_t spc_length; struct sockaddr_storage spc_aaddr; uint32_t spc_state; uint32_t spc_error; sctp_assoc_t spc_assoc_id; }
[RFC6458] defines the constants SCTP_ADDR_AVAILABLE, SCTP_ADDR_UNREACHABLE, SCTP_ADDR_REMOVED, SCTP_ADDR_ADDED, and SCTP_ADDR_MADE_PRIM to be provided in the spc_state field. This document defines in addition to that the new constant SCTP_ADDR_POTENTIALLY_FAILED, which is reported if the affected address becomes potentially failed.
The SCTP_GET_PEER_ADDR_INFO socket option defined in [RFC6458] can be used to query the state of a peer address. It uses the following structure:
struct sctp_paddrinfo { sctp_assoc_t spinfo_assoc_id; struct sockaddr_storage spinfo_address; int32_t spinfo_state; uint32_t spinfo_cwnd; uint32_t spinfo_srtt; uint32_t spinfo_rto; uint32_t spinfo_mtu; };
[RFC6458] defines the constants SCTP_UNCONFIRMED, SCTP_ACTIVE, and SCTP_INACTIVE to be provided in the spinfo_state field. This document defines in addition to that the new constant SCTP_POTENTIALLY_FAILED, which is reported if the peer address is potentially failed.
Applications can control the quick failover behavior by getting or setting the number of consecutive timeouts before a peer address is considered potentially failed or unreachable and before the primary path is changed automatically. This socket option uses the level IPPROTO_SCTP and the name SCTP_PEER_ADDR_THLDS.
The following structure is used to access and modify the thresholds:
struct sctp_paddrthlds { sctp_assoc_t spt_assoc_id; struct sockaddr_storage spt_address; uint16_t spt_pathmaxrxt; uint16_t spt_pathpfthld; uint16_t spt_pathcpthld; };
Applications can control the exposure of the potentially failed path state in the SCTP_PEER_ADDR_CHANGE event and the SCTP_GET_PEER_ADDR_INFO as described in Section 5.1. The default value is implementation specific.
This socket option uses the level IPPROTO_SCTP and the name SCTP_EXPOSE_POTENTIALLY_FAILED_STATE.
The following structure is used to control the exposition of the potentially failed path state:
struct sctp_assoc_value { sctp_assoc_t assoc_id; uint32_t assoc_value; };
Security considerations for the use of SCTP and its APIs are discussed in [RFC4960] and [RFC6458]. There are no new security considerations introduced in this document.
This document does not create any new registries or modify the rules for any existing registries managed by IANA.
The initial status of this document was Experimental. However, because of its usefulness, simple design and the existence of multiple active implementations, it has been changed to PS by WG consensus.
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC4960] | Stewart, R., "Stream Control Transmission Protocol", RFC 4960, September 2007. |
This section lists alternative approaches for the issues desribed in this document. Although these approaches do not require to update RFC4960, we do not recommend them from the reasons described below.
Smaller values for Path.Max.Retrans shorten the failover duration. In fact, this is recommended in some research results [JUNGMAIER02] [GRINNEMO04] [FALLON08]. For example, if when Path.Max.Retrans=0, SCTP switches to another destination on a single timeout. This smaller value for Path.Max.Retrans can results in spurious failover, which might be a problem.
Unlike SCTP-PF, the interval for heartbeat packets is governed by 'HB.interval' even during failover process. 'HB.interval' is usually set in the order of seconds (recommended value is 30 seconds). When the primary path becomes inactive, the next HB can be transmitted only seconds later. Meanwhile, the primary path may have recovered. In such situations, post failover, an endpoint is forced to wait on the order of seconds before the endpoint can resume transmission on the primary path. However, using smaller value for 'HB.interval' might help this situation, but it will be the waste of bandwidth in most cases.
In addition, smaller Path.Max.Retrans values also affect 'Association.Max.Retrans' values. When the SCTP association's error count (sum of error counts on all ACTIVE paths) exceeds Association.Max.Retrans threshold, the SCTP sender considers the peer endpoint unreachable and terminates the association. Therefore, Section 8.2 in [RFC4960] recommends that Association.Max.Retrans value should not be larger than the summation of the Path.Max.Retrans of each of the destination addresses, else the SCTP sender considers its peer reachable even when all destinations are INACTIVE. To avoid such inconsistent behavior an SCTP implementation SHOULD reduce Association.Max.Retrans accordingly whenever it reduces Path.Max.Retrans. However, smaller Association.Max.Retrans value increases chances of association termination during minor congestion events.
As several research results indicate, we can also shorten the duration of failover process by adjusting RTO related parameters [JUNGMAIER02] [FALLON08]. During failover process, RTO keeps being doubled. However, if we can choose smaller value for RTO.max, we can stop the exponential growth of RTO at some point. Also, choosing smaller values for RTO.initial or RTO.min can contribute to keep RTO value small.
Similar to reducing Path.Max.Retrans, the advantage of this approach is that it requires no modification to the current specification, although it needs to ignore several recommendations described in the Section 15 of [RFC4960]. However, this approach requires to have enough knowledge about the network characteristics between end points. Otherwise, it can introduce adverse side-effects such as spurious timeouts.
The methods described in the document can accelerate the failover process. Hence, they might introduce the path bouncing effect where the sender keeps changing the data transmission path frequently. This sounds harmful to the data transfer, however several research results indicate that there is no serious problem with SCTP in terms of path bouncing effect [CARO04] [CARO05].
There are two main reasons for this. First, SCTP is basically designed for multipath communication, which means SCTP maintains all path related parameters (CWND, ssthresh, RTT, error count, etc) per each destination address. These parameters cannot be affected by path bouncing. In addition, when SCTP migrates the data transfer to another path, it starts with the minimal or the initial CWND. Hence, there is little chance for packet reordering or duplicating.
Second, even if all communication paths between the end-nodes share the same bottleneck, the quick failover results in a behavior already allowed by [RFC4960].