<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY % RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
]>
<?rfc rfcedstyle="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc toc="yes" ?>
<?rfc tocompact="yes"?>
<rfc category="std" docName="draft-vinapamula-flow-ha-00"
     ipr="trust200902">
  <front>
    <title abbrev="HA through PCP"> Flow high availability through PCP</title>

    <author fullname="Suresh Vinapamula" initials="S." surname="Vinapamula">
      <organization abbrev="Juniper Networks">Juniper Networks</organization>

      <address>
        <postal>
          <street>1194 North Mathilda Avenue</street>

          <city>Sunnyvale</city>

          <region>CA</region>

          <code>94089</code>

          <country>USA</country>
        </postal>

        <phone>+1 408 936 5441</phone>

        <email>sureshk@juniper.net</email>
      </address>
    </author>
    <author fullname="Senthil Sivakumar" initials="S." surname="Sivakumar">
      <organization abbrev="Cisco Systems">Cisco Systems</organization>

      <address>
        <postal>
          <street>7100-8 Kit Creek Road</street>

          <city>Research Triangle Park</city>

          <region>NC</region>

          <code>27760</code>

          <country>USA</country>
        </postal>

        <phone>+1 919 392 5158</phone>

        <email>ssenthil@cisco.com</email>
      </address>
    </author>


    <date year="2013" />

    <area>Internet</area>

    <abstract>
      <t>This document describes a mechanism for a host signal Network Address Translator's (NAT) 
         High Availability (HA) module to checkpoint interested connections.
         </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
    <t>Uninterrupted Internet service continuity is critical in service provider
       environment. To achieve this lots of service providers have active-backup
       systems. 
    </t>
    <t>
       For some of the services, a state would be created for every
       connection for processing subsequent packets of that connection. For service
       continuity of those connections on backup when active fail, that corresponding
       state had to be checkpointed on the backup.
    </t>
    <t>
       NAT is one such service, where, when the mapping between a private IP address
       port and public IP address port is dynamically established and torn down on per
       connection basis. In such a case, connection's state has to be checkpointed 
       to the backup, for uninterrupted service continuity even in case active fails.
    </t>
    <t>
      This document describes some of the existing issues in the way checkpointing is done today,
      and tries to address them.
    </t>

    </section>
    <section title="Terminology">
      <t>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 <xref
      target="RFC2119"></xref>.</t>
    </section>
    
    <section anchor="issues" title="Issues with the existing implementations">
    <t>
        In a high availability (HA) deployment, it is expensive in terms of memory and CPU and 
        other resources to checkpoint all of the connections state periodically. 
        Also checkpointing may not be required for all flows as all flows may not be critical.
        But, this leaves a challenge to identify what connections' to checkpoint.
    </t>
    <t>
       Typically, this is addressed by identifying long lived connections
       and checkpointing state of only those connections that lived long enough to the backup for service
       continuity.
    </t>
    <t>
       However, following are the issues with that approach: <list
          style="numbers">
       <t>
          A connection which could potentially
          be long-lived would face disruption in service on failure of active system, before it had not lived 
          long enough for it to be checkpointed.
      </t>

      <t>
          Also a connection may not be long lived but critical like shorter phone 
          conversations.
      </t>
      <t>
          Similarly not every long lived connection need to be critical, say a free service connections need not be checkpointed while 
          a paid service connection is checkpointed of a hosted service.
      </t>
      </list></t>

    </section>

    <section title="Proposed Solution">
      <t>
         An application or user is the best judge to decide which connection is critical.
      </t>
      <t>
         An application or user MUST indicate that one or more of its connections is critical
         and disruption is not desired. This will trigger checkpointing of state to the backup.
      </t>
      <t>
         An application/user may indicate the desire for checkpoint through PCP client, and 
         PCP client MUST mark bit zero of "Reserved" bits in the PCP request header as below.
         Here after in the document, this bit is referred as HA bit.
      </t>
      <t>   
         All other bits in the "Reserved" field MUST be marked zero on transmissions and 
         MUST be ignored on reception.
      </t>

      <figure>
        <preamble></preamble>

        <artwork><![CDATA[
	0                   1                   2                   3
	0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
	+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	|  Version = 2  |R|   Opcode    |         Reserved             1|
	+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	|                 Requested Lifetime (32 bits)                  |
	+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	|                                                               |
	|            PCP Client's IP Address (128 bits)                 |
	|                                                               |
	|                                                               |
	+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	:                                                               :
	:             (optional) Opcode-specific information            :
	:                                                               :
	+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	:                                                               :
	:             (optional) PCP Options                            :
	:                                                               :
	+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>
        <postamble>PCP request header with HA bit being the zero bit in the 
         "Reserved" field.</postamble>
      </figure>

      <t>
         PCP server MAY honor this request depending on whether resources are available for
         checkpointing. If there are no resources available for checkpointing, but there are 
         resources available to honor request say PCP MAP/PEER request, request is honored and 
         there is no error returned. 
      </t>
      <t>
         What information to checkpoint and how to checkpoint is out of scope of this document,
         and is left for implementation.
      </t>
      <t>
         However it is RECOMMENDED to checkpoint state on backup for honored requests before a
         response is sent to the PCP client.
      </t>
      <t>
         Communication between application/user and PCP client is implementation specific.
      </t>
    </section>
    <section title="Some Usage Examples">
    <t>
    <list style="numbers">
    <t>
       Disruption in a phone connection is not desired. Application
       that is initiating a phone connection MUST mark connection HA bit in the header, while initiating a PCP request
       for checkpointing.
    </t>

    <t>
       Similarly disruption in media streaming is not desired. A user hosting a media
       service, MUST mark HA bit in the header while initiating a mapping request, and MAY 
       mark connection associated with that mapping, depending on whether the connection is 
       from a paid subscriber or from a free subscriber. 
    </t>
    </list> </t>
    </section>
    <section anchor="sec-Oth-Serv" title="Signaling HA for other services">
       <t>
          In conjunction with NAT, if there are any other services, that maintain state for any connection,
          they MAY register to PCP server, and MAY be triggered for checkpointing of that state.
       </t>
    </section>
    <section anchor="sec-security" title="Security Considerations">
       <t>
          A NAT device can always 
          override the end user signalling if the administrator specified rules are not in 
          policy with the end user signaling. 
       </t>
       <t>
          There is a risk that every client may wish to checkpoint every connection,
          which can potentially load the system. Admin may restrict number of connections
          and the rate of checkpointing on per PCP client.
       </t>
    </section>

    <section anchor="sec-IANA" title="IANA Considerations">
      <t>This document does not require any action from IANA.</t>
    </section>
  </middle>

  <back>
    <references title="Normative references">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.6887'?>

    </references>

  </back>
</rfc>
