4.3 Packet-Pair Bandwidth Estimation

Packet-pair is a technique for estimating the bandwidth of a streaming media connection over the Internet.

To estimate bandwidth, the server sends two or more consecutive packets of highly entropic data, and the client estimates the bandwidth by measuring the difference between the times that it receives the packets. This method is usually reliable; however, if the client traverses a Network Address Translation (NAT), firewall, or proxy server, the packet-pair bandwidth measurement might be inaccurate.

This technique is not necessary for devices with known bandwidths, such as cellular phones.

Note The client's use of the packet-pair data to estimate the network bandwidth is implementation-specific.

The following sequence occurs between a client and server when conducting the packet-pair experiment. The sequencing applies to both the pipelined mode and non-pipelined modes of the protocol.

  1.  The client sends a Describe request and includes:

  2. If the server is able to conduct the packet-pair experiment, the server response includes:

    • The Pragma header field with the token packet-pair-experiment=1.

    • The Supported header with the token com.microsoft.wm.srvppair.

  3. The server sends the following packets in the response body:

The following figure shows the previously described sequence.

Packet-pair sequence

Figure 3: Packet-pair sequence

The following example shows a client's packet-pair experiment request.

 GET /test.asf HTTP/1.0 
 Accept: */* 
 User-Agent: NSPlayer/ 
 Host: SampleServer 
 X-Accept-Authentication: Negotiate, NTLM, Digest, Basic 
 Pragma: no-cache,rate=1.000,stream-time=0,stream-offset=0:0,
 Pragma: packet-pair-experiment=1 
 Supported: com.microsoft.wm.srvppair, com.microsoft.wm.sswitch, 
 com.microsoft.wm.predstrm, com.microsoft.wm.startupprofile

The following example shows the server response.

 HTTP/1.0 200 OK 
 Content-Length: 5227 
 Content-Type: application/vnd.ms.wms-hdr.asfv1 
 Server: Cougar/ 
 Pragma: packet-pair-experiment=1, no-cache, client-id=2064325698, xResetStrm=1, 
 features="seekable,stridable", timeout=60000 
 Cache-Control: no-cache, x-wms-content-size=638066, x-wms-event-subscription="remote-log" 
 Supported: com.microsoft.wm.srvppair, com.microsoft.wm.sswitch, 
 com.microsoft.wm.predstrm, com.microsoft.wm.fastcache, 
 $P......<packet-pair payload>
 $P......<packet-pair payload>
 $P......<packet-pair payload>
 $M......<metadata payload>  
 $H......<header payload>