<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC1122 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1122.xml">
<!ENTITY RFC2018 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2018.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3042 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3042.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC4166 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4166.xml">
<!ENTITY RFC4653 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4653.xml">
<!ENTITY RFC4960 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4960.xml">
<!ENTITY RFC5681 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5681.xml">
<!ENTITY RFC5827 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5827.xml">
<!ENTITY RFC6298 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6298.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="3"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<rfc category="info" 
	 docName="draft-petlund-latency-transport-services-00" 
	 ipr="trust200902">
	<!--	noModificationTrust200902 noDerivativesTrust200902 pre5378Trust200902">-->
	<!-- updates="6298"> -->
	<!-- ipr="full3978"> -->
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->
  
  <front>
      <!-- The abbreviated title is used in the page header - it is only necessary if the
       full title is longer than 39 characters -->
      
     <!-- <title abbrev="Abbreviated Title">Transport Services and low latency</title>-->
      <title>Transport Services and low latency</title>
      
      <!-- add 'role="editor"' below for the editors if appropriate -->
      
      <!-- Another author who claims to be an editor -->
      
      <author fullname="Andreas Petlund" initials="A.P." surname="Petlund">
          <organization>Simula Research Laboratory</organization>
          <address>
              <postal>
                  <street>Rolfsbukta 4 B,</street>
                  <!-- Reorder these if your country does things differently -->
                  <code>1364</code>
                  <city>Fornebu</city>
                  <region></region>
                  <country>Norway</country>
              </postal>
              <phone>+47 99 27 36 22</phone>
              <email>apetlund@simula.no</email>
              <!-- uri and facsimile elements may also be added -->
          </address>
      </author>
     
     <!-- 
      <author fullname="David Ros" initials="D.R." surname="Ros">
          <organization>Simula Research Laboratory</organization>
          <address>
              <postal>
                  <street>Rolfsbukta 4 B,</street>
                  <code>1364</code>
                  <city>Fornebu</city>
                  <region></region>
                  <country>Norway</country>
              </postal>
              <phone></phone>
              <email>dros@simula.no</email>
          </address>
      </author>
      -->
      
      <date month="February" year="2014" />
      
      <!-- If the month and year are both specified and are the current ones, xml2rfc will fill
       in the current day for you. If only the current year is specified, xml2rfc will fill
       in the current day and month for you. If the year is not the current one, it is
       necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
       purpose of calculating the expiry date).  With drafts it is normally sufficient to
       specify just the year. -->
      
      <!-- Meta-data Declarations -->
      
      <area>General</area>
      
      <workgroup>Transport-Services</workgroup>
      
      <!-- WG name at the upperleft corner of the doc,
       IETF is fine for individual submissions.
       If this element is not present, the default is "Network Working Group",
       which is used by the RFC Editor as a nod to the history of the IETF. -->
      
      <keyword>transport services, latency</keyword>
      
      <!-- Keywords will be incorporated into HTML output
       files in a meta tag but they have no effect on text or nroff
       output. If you submit your draft to the RFC Editor, the
       keywords will be used for the search engine. -->
      
      <abstract>
          <t>
              This document categorises different classes of network latency,
              discusses possible metrics for determining the characteristics of 
              latency-sensitive flows and addresses the use of transport services
              as a means for achieving transport latency reduction.
          </t>
      </abstract>
      
  </front>

  <middle>
  
    <section title="Introduction">
	    <t>Modern operating systems provide a myriad of different protocols and
	    options to tweak the network performance. Even for veterans within
	    the field of transport protocols it is hard to stay fully up to date on all
	    possibilities and combinations of options that may help reduce latency for
	    a networked application. Also, care needs to be taken so that the transport
	    protocols and options chosen will not be disruptive to other services or to
	    an application if it changes network behaviour. For application developers
	    in general to be able to select the best possible subset of mechanisms and
	    protocols to support their time-dependent networked application, a measure of 
	    abstraction is required.
	    This document discusses different classes of network latency with examples 
	    of how to reduce the delay for each class. It also makes suggestions for how
	    an application can specify its intended behaviour to the transport services
	    as a foundation for optimising the underlying services with regard to latency.
	    </t>

      <section title="Requirements Language">
        <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">RFC 2119</xref>.</t>
      </section>
    </section>

	<section title="Time-dependent applications">
	<t>While completion time for bulk data transfer is deemed important, 
	the focus of industry and research has lately shifted towards understanding 
	the diversity of Internet traffic today. Many flows are in some way 
	application limited,
	that is, their sending pattern is not exclusively determined by congestion control,
	but also by the timing of data received from the application. 
	Such applications are in 
	many cases time-dependent, since the events driving the data production 
	is triggered by real-life interaction or events <xref target="AP09"></xref>.</t>
	
<t>While downloading applications dominated the Internet for a long time,
overprovisioning in backbone networks has allowed interactive
applications to succeed. Audio and video conferences
that previously required leased lines are conducted over the
Internet. Multiplayer games that are played over the Internet are also prevalent. 
Even Web applications generate increasingly interactive Internet traffic as more
web pages are generated dynamically and contain interactively updated elements. The
flows of such time-dependent applications now represent a large proportion of the 
total number of flows in the Internet. 
These flows have to tackle a large variety of access network technologies, all
with different characteristics. Depending on the type of application,
"low latency" may carry several meanings from a transport viewpoint. The next 
section elaborates on different classes of latency.</t>
    <section title="On the characteristics of latency-sensitive traffic">
	    <t>The scenarios described in this section are derived from a set of 
	    known latency-creating factors from which networked applications suffer. 
	    These categories are not exclusive, an application may suffer from
	    more than one of them. They are, however, distinguishable at the transport
	    layer and may require different avoidance techniques. The main categories of
	    application latency that have been identified so far are:
 <list style="format (%d)">
    <t>Real-time interaction for applications with a lasting duration:
        <list style="format (%c)">
            <t> Per-packet latency: applications that have signalling-like
            communication driven by actions or events. Each small message is equally
            important and congestion-control is not applied as there is never a queue
            building on the sender side. Examples include sensors triggered by events 
            or online gaming traffic.</t>
	    	<t>Per-burst latency: interactive elements are sent in bursts over a
            persistent connection. Collapsing the congestion window (cwnd) between
            bursts will reduce the per-burst completion time and increase the delivery
            latency for a burst while keeping the cwnd open may cause overestimation of the
            available bandwidth. Examples include video streaming over persistent 
            connections and financial applications synchronised by trading
            synchronisation barriers.</t>
            <t>Per-burst latency with multiple reconnects: is the above scenario,
            but where the streams makes new connections with regular intervals. This
            behaviour aggravates the bursty scenario by adding connection initialisation
            latency and start-up latency to each newly initialised connection. Examples 
            include several methods of adaptive TCP-based video streaming and Web-based
            Content Management Systems.</t>
        </list></t>     
    <t>Start-up latency: the time it takes for a connection to find its correct
    send-rate. The faster the correct bandwidth can be determined and the flow assume
    the correct send rate, the lower the latency. Examples include non-adaptive
    high-quality video-on-demand delivery and Cloud-based office applications.</t>
    <t>Flow completion time: when a browser opens a range of different connections
    when loading a specific webpage, the latency experienced by the user is determined
    by the completion time of the subflows. Very often, such flows are very small, often
    not more then one packet, thus motivating measures like increasing the initial
    window. Examples include heavily styled web pages, messaging systems and news
    tickers, but this problem affects also interactive web browsing.</t>
</list>
There is also the latency induced by extra RTTs needed to set up a connection, for
instance to initiate a security protocol or to negotiate options.</t>

<t>There are flows that fluctuate between the behaviours described above.
In such cases, care must be taken to not blindly apply mechanisms that will reduce the
latency for one of the cases, but increase latency for others. In addition, some
particular applications suffer more when there is a
large variation in latency (jitter) than from a somewhat higher mean latency.
This includes applications with real-time interaction, such as on-line games.
In general, latency is characterised by a number of features including its 
higher order moments and distribution. 
The most important set of features varies between different latency-sensitive 
applications.
There is a need to consider all of these traffic behaviours to properly address the
topic of latency for transport services.</t>
    </section>
</section>

<section title="Challenges in identifying traffic characteristics">
	    <t>It can be hard to reliably identify the flow characteristics from the
	    viewpoint of the transport layer. At the time when a flow starts, the transport
	    can make no 
	    assumptions about what its traffic patterns can be <xref target="MF14"></xref>
	    (AP: unless guessing from 5-tuple).
	    In order for the transport to make qualified decision on which protocols
	    and options to apply for a given flow to reduce latency, more information
	    must be provided to the transport:
	    <list style="format (%d)">
	    <t>The transport service tries to identify the traffic characteristics 
        	of the flow. This is a possibility for long-lasting flows that can be 
        	instrumented by the transport service. Such monitoring is, however, 
        	challenging since the experienced behaviour is dependent network 
        	characteristics like RTT and bottleneck capacity.</t>
	    <t>The application informs the transport layer about its intended behaviour. 
	    For short flows and reducing startup latency, this is the only option as 
	    no information are yet available about the flow's characteristics.</t>
        </list></t>

		<t>For the transport layer to be able to identify relevant traffic 
		characteristics, it is useful to review the metrics that are available
		to the transport layer. Examples of metrics are:
		<list style="format (%d)">
		<t>Packets in flight: "FLIGHT SIZE", according to the TCP congestion control
		specification <xref target="RFC5681"></xref>, is the number of packets that
		have been transmitted, but not yet acknowledged. For efficient retransmissions,
		in reliable protocols, this is an important metric as a flow with less than 
		4 packets in flight cannot trigger a fast retransmission. This leads to high 
		recovery delays for many application-limited flows. Packets in flight is,
		however, not a static indicator of traffic behaviour as it is dependent on the 
		RTT of the connection.</t>
		<t>Packet intertransmission time: the rate by which the application delivers
		data to the transport layer over time gives an indication of the traffic 
		characteristics of the application. A constantly application-limited flow 
		will not need a tuned congestion control, but will be sensitive to recovery
		delays as discussed in the bullet about "Packets in flight".</t>
		<t>Payload size: the payload size is application-specific and does not relate 
		to any network phenomena. Time-dependent, event driven traffic often send packets
		with payload sizes less than the maximum transmission unit 
		(MTU)<xref target="AP09"></xref>. For greedy streams, the packets will all
		fill an MTU.</t>
		<t>Stream duration: Analysis of Internet traffic shows that a majority of the 
		flows are very short in duration<xref target="MF14"></xref>. When a browser loads
		a webpage, dozens of connections are usually opened, each transferring a small
		part of the webpage content. Streams carrying event-based or interactive 
		communication, on the contrary, are usually persistent and longer-lasting. 
		Thus, measuring whether a stream terminates within a short time interval 
		(less than one second) can provide information that may help predict the 
		continued behaviour of the flow.</t>
		<t>Burstiness: if a flow has a traffic pattern with bursts of activity 
		followed by periods of inactivity, getting up to speed quickly in the active 
		periods will be important to the application. The size of each burst is also
		relevant to the choices made by the transport layer.</t>
		<t>Send queue backlog: a flow that is network limited will build a send queue 
		while waiting for data to be transferred. By monitoring the send queue size, the
		transport layer can get relevant information about the flow.</t>
		</list>
		The combination of information provided by the above listed metrics may help the 
		transport services to make qualified decisions on the flow characteristics
		and choose the right services for reducing latency.</t>

</section>

<section title="Examples of choices of protocols and options that influence 
latency" anchor='sec-examples'>
	    <t>List examples of protocols and options that influence latency.</t>
	<section title="Protocols">
	<t>Examples of protocols with a short discussion on latency implications.
		<list style="symbols">
	    <t>TCP:</t>
	    <t>UDP:</t>
	    <t>SCTP:</t>
	    <t>Other: DCCP ++?</t>   
	</list></t>
	</section>
	
	<section title="Options and mechanisms">
	<t>Examples of protocol options and mechanisms with a short discussion on their 
	influence on latency.
	<list style="symbols">   
	    <t>Nagle's algorithm (delays small packets)</t>
	    <t>Delayed ACKs (delays feedback)</t>
		<t>Limited transmit</t>
	    <t>Early retransmit</t>
	    <t>RTO restart</t>
	    <t>New CWV</t>
	    <t>TFO</t>
	    <t>PRSCTP</t>
	</list></t>
	</section>
</section>
    
<section title="Discussion">
	<t>
	<!--
	If the app indicates how much data it intends to send upon startup, this
		may help the transport layer make qualified choices.
		-A way of specifying a transmission pattern may be devised, but how to do 
			this in such a way as to be useful to the transport layer is a task of
			its own.
		-Change protocol/options in flight when characteristics are shown to change
		for a long time.
		-->
		Whether properties should be submitted by the applications in addition to 
		services is an item for discussion and should be treated in future revisions
		of the document. 
			</t>
</section>

<!--    <section anchor="Acknowledgements" title="Acknowledgements">
       <t>ACKs.</t>
    </section>
-->

    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="IANA" title="IANA Considerations">
      <t>This memo includes no request to IANA.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not raise any new security issues.</t>
    </section>

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
      &RFC2119;
      &RFC5681;
    </references>

    <references title="Informative References">
     <reference anchor="AP09" target="">
		<front> 
				<title>Improving Latency for interactive, thin-stream applications
				over reliable transport</title>
				<author initials="A.P." surname="Petlund" fullname="Andreas Petlund">
						<organization>Simula Research Laboratory, Norway</organization>
				</author>		
				<date month="December" year="2009"/>
		</front>
				<seriesInfo name="Thesis" value="Unipub, Kristian Ottosens hus, Pb. 
				33 Blindern, 0313 Oslo"/>
	  </reference>
	  
	 <reference anchor="MF14" target="">
		<front> 
				<title>Time-Dependent Thin Transport Layer Streams: Characterization, 
				Empirical Observation and Protocol Support</title>
				<author initials="M.F." surname="Fuchs" fullname="Markus Fuchs">
						<organization>University of Kaiserslautern, Germany</organization>
				</author>		
				<date month="January" year="2014"/>
		</front>
				<seriesInfo name="Master Thesis" value="University of Kaiserslautern, 
				Germany"/>
     </reference>
	  
	  <!--
	 <reference anchor="LH03" target="">
		<front> 
				<title>On the correlation of internet flow characteristics</title>
				<author initials="K.L." surname="Lan">
						<organization>University of Kaiserslautern, Germany</organization>
				</author>	
				<author initials="J.H." surname="Heidemann">
						<organization>University of Kaiserslautern, Germany</organization>
				</author>		
				<date month="January" year="2014"/>
		</front>
				<seriesInfo name="Technical Report" value="ISI-TR-574, USC/ISI, 
				Tech. Rep., 2003."/>
     </reference> 
     --> 	   
    </references>


	<!--<section anchor="app-additional" title="Additional Stuff">
      <t>This becomes an Appendix.</t>
	</section>-->

    <!-- Change Log
v00 2012-02-12  EBD   Initial version

  -->
  </back>
</rfc>
