FAQ

Why does RTMP streaming through the ProxySG over HTTP stop in the middle of the stream?

FAQ ID:    FAQ1762
Version:    3.0
Status:    Published
Published date:    12/12/2011
Updated:    01/19/2012
 

Answer

This is happening under a particular environment. RTMPT (RTMP over HTTP) always uses HTTP between client and OCS through the ProxySG.
 
The RTMPT client (usually a browser) requests HTTP Post packets as RTMP with OCS name (#1 in the below example), the ProxySG then re-queries this OCS's IP address (#2 in the below example), because the DNS's TTL is expired. When the DNS response is a different IP address for the same OCS name, the ProxySG sends packets of the middle of stream to the new OCS as a normal behavior (#3 in the below example). The result is that the OCS sends back FIN and tries to disconnect (#4 in the below example), and the previous connection is still in progress, so streaming is stopped. If the DNS's TTL is long enough (for example 10 minutes), this issue would not be happened. However, most TTL is configured to 30 seconds. There is nothing we can do in this situation.
 
  client                        SG            OCS(first time)
10.9.20.90        10.9.116.95     211.233.9.96
 
(1)
    409 2011-12-06 20:04:55.610999 10.9.20.90            10.9.116.95           HTTP     POST http://vod.imnews.imbc.com/fcs/ident2 HTTP/1.0   <<== first request of RTMPT
    430 2011-12-06 20:04:55.853999 10.9.20.90            10.9.116.95           HTTP     POST http://vod.imnews.imbc.com/open/1 HTTP/1.0 
 
 
    410 2011-12-06 20:04:55.612999 10.9.116.95           10.9.9.30             DNS      Standard query A vod.imnews.imbc.com          <<== First time DNS query.
    422 2011-12-06 20:04:55.722999 10.9.9.30             10.9.116.95           DNS      Standard query response A 211.233.9.96        <<== OCS's ip= 211.233.9.96
    426 2011-12-06 20:04:55.777999 10.9.116.95           211.233.9.96          HTTP     POST /fcs/ident2 HTTP/1.1
    431 2011-12-06 20:04:55.856000 10.9.116.95           211.233.9.96          HTTP     POST /open/1 HTTP/1.1
    442 2011-12-06 20:04:56.232999 10.9.116.95           211.233.9.96          HTTP     POST /send/567138809/0 HTTP/1.1
    465 2011-12-06 20:04:56.387000 10.9.116.95           211.233.9.96          HTTP     POST /send/567138809/1 HTTP/1.1
    483 2011-12-06 20:04:56.661000 10.9.116.95           211.233.9.96          RTMP     Window Acknowledgement Size 2500000
    490 2011-12-06 20:04:56.779000 10.9.116.95           211.233.9.96          RTMP     Set Buffer Length 0,100ms | createStream()
    504 2011-12-06 20:04:56.957000 10.9.116.95           211.233.9.96          RTMP     play('mp4:newsvod/today/2011/12/mbc_morn_20111206_2_500k.mp4') | Set Buffer Length 1,100ms
    515 2011-12-06 20:04:57.171999 10.9.116.95           211.233.9.96          HTTP     POST /idle/567138809/5 HTTP/1.1 
....
(2)
 34076 2011-12-06 20:06:27.473000 10.9.116.95           10.9.9.30             DNS      Standard query A vod.imnews.imbc.com        <<== Re-query, becasue of TTL expired.
 34078 2011-12-06 20:06:27.574999 10.9.9.30                10.9.116.95           DNS      Standard query response A 211.233.9.97      <<== IP address cahnged.
 

  34082 2011-12-06 20:06:27.629999 10.9.116.95           211.233.9.97          HTTP     POST /idle/567138809/183 HTTP/1.1   <<== Change target OCS.
  34114 2011-12-06 20:06:29.739000 10.9.116.95           211.233.9.97          HTTP     POST /idle/567138809/183 HTTP/1.1
  34144 2011-12-06 20:06:31.908999 10.9.116.95           211.233.9.97          HTTP     POST /idle/567138809/183 HTTP/1.1
  34178 2011-12-06 20:06:34.050999 10.9.116.95           211.233.9.97          HTTP     POST /idle/567138809/183 HTTP/1.1
  34223 2011-12-06 20:06:39.133999 10.9.116.95           211.233.9.97          HTTP     POST /idle/567138809/183 HTTP/1.1
  34250 2011-12-06 20:06:41.302999 10.9.116.95           211.233.9.97          HTTP     POST /idle/567138809/183 HTTP/1.1
  34287 2011-12-06 20:06:43.481999 10.9.116.95           211.233.9.97          HTTP     POST /idle/567138809/183 HTTP/1.1
  34311 2011-12-06 20:06:45.644000 10.9.116.95           211.233.9.97          HTTP     POST /close/567138809/184 HTTP/1.1
  34341 2011-12-06 20:06:47.788999 10.9.116.95           211.233.9.97          HTTP     POST /close/567138809/184 HTTP/1.1
  34369 2011-12-06 20:06:49.908999 10.9.116.95           211.233.9.97          HTTP     POST /close/567138809/184 HTTP/1.1
  34400 2011-12-06 20:06:52.051999 10.9.116.95           211.233.9.97          HTTP     POST /close/567138809/184 HTTP/1.1
  34440 2011-12-06 20:06:54.274000 10.9.116.95           211.233.9.97          HTTP     POST /close/567138809/184 HTTP/1.1 
 
(3),(4)
  34079 2011-12-06 20:06:27.575999 10.9.116.95           211.233.9.97          TCP      55911 > http [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=64 SACK_PERM=1 TSval=9368173 TSecr=0
  34080 2011-12-06 20:06:27.628999 211.233.9.97          10.9.116.95           TCP      http > 55911 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 SACK_PERM=1 TSval=2426647882 TSecr=9368173 WS=128
  34081 2011-12-06 20:06:27.629999 10.9.116.95           211.233.9.97          TCP      55911 > http [ACK] Seq=1 Ack=1 Win=66048 Len=0 TSval=9368233 TSecr=2426647882
  34082 2011-12-06 20:06:27.629999 10.9.116.95           211.233.9.97          HTTP     POST /idle/567138809/183 HTTP/1.1
  34085 2011-12-06 20:06:27.669999 211.233.9.97          10.9.116.95           TCP      http > 55911 [ACK] Seq=1 Ack=223 Win=6912 Len=0 TSval=2426647933 TSecr=9368233
  34100 2011-12-06 20:06:29.673000 211.233.9.97          10.9.116.95           TCP      http > 55911 [FIN, ACK] Seq=1 Ack=223 Win=6912 Len=0 TSval=2426649941 TSecr=9368233 <<== Disconnect
  34101 2011-12-06 20:06:29.673000 10.9.116.95           211.233.9.97          TCP      55911 > http [ACK] Seq=223 Ack=2 Win=66048 Len=0 TSval=9370273 TSecr=2426649941
  34102 2011-12-06 20:06:29.673000 10.9.116.95           211.233.9.97          TCP      55911 > http [FIN, ACK] Seq=223 Ack=2 Win=66048 Len=0 TSval=9370273 TSecr=2426649941
  34111 2011-12-06 20:06:29.713999 211.233.9.97          10.9.116.95           TCP      http > 55911 [ACK] Seq=2 Ack=224 Win=6912 Len=0 TSval=2426649982 TSecr=9370273
 
Workaround:
 
This issue is not a problem caused by the proxy but instead is a problem with the way some sites that host Flash content maintain their DNS as described above. This manner does not accomodate for RTMPT (RTMP 'Tunneled' over HTTP). Therefore a solution to address this problem specifically cannot be applied to the proxy. However, a workaround can be applied by use of Flash proxy. See KB4875 for more information on the workaround.

Rate this Page

Please take a moment to complete this form to help us better serve you.

Did this document help answer your question?
 
 
If you are finished providing feedback, please click the RATE CONTENT button. Otherwise, please add more detail in the following text box and then click RATE CONTENT.
 
 

Your response will be used to improve our document content.

Ask a Question