I noticed that when I play a movie with rtmpt protocol, all requests are tripled and sent once to port 1935, once to port 443 and once with no port on the URL. After a few requests are sent,it goes back to sending it only to one URL. Can you tell why is that?
Also, When I played the same movie in Akamai’s test player it went straight to port 1935.
This is caused by the "shotgun" approach used to establish a connection for RTMPx. It is a normal behavior and performs better usually than trying sequentially all protocol-port combinations.
When dealing with RTMP, we don't want our developers to provide explicit protocol and port number, instead we initiate multiple connection attempts using various RTMP protocols and port combinations and the first connection which is established will wins the race. All other attempts are canceled and we are going to use only one going forward. More insight for this approach can be found in NetNegociator class in org.osmf.net
Our approach makes the player more resilient when is located behind firewalls – where normal RTMP port 1935 is usually blocked. In that case, the NetNegociator class will automatically try to establish a connection using RTMPT on port 80 which is usually open on the firewalls. No developer work needed.
The developer can customize the protocols and the port he wants to be used when trying connections.
He can even force the connection to use only one specific protocol and port combination ( rtmp:1935), thus emulating the Akamai behavior.