FortiDirector
FortiDirector uses conditions to determine if a redirector Rule is a match for a given request.
tdietrich
Staff
Staff
Article Id 192955
Description

Every HTML5 browser supports the ability for players to seek to not-yet-downloaded portions of a video. This functionality, often referred to as pseudo-streaming, is great for any video longer than a few minutes.

Unfortunately, this functionality is not available by default when playing videos in Flash. A work-around is usually provided by each content host provider or CDN in the form of a query "start" parameter which is appended to the video URL. 

FortiDirector can take any custom or CDN start parameter and on-the-fly remap it to the appropriate named parameter for the applicable CDN.  This allows you to program your website in a standardized way, without knowledge of which CDN the FortiDirector service may send the end user to.

Below is the translation table that FortiDirector uses for generating the query parameter rewrites between the various CDNs: 

CDNFileTypeParamAKAAKA (VIP)AKA HDLIMLEVEDGBTG
AKAFLVsecondsaktimeoffset"""---starttime
AKA (VIP)FLVsecondsaktimeoffset"""---starttime
AKA HDFLVsecondsaktimeoffset"""---starttime
LIMFLVbytesfs---"startec_seekap_start
LEVFLVbytesstart---fs"ec_seekambiguous
LEVMP4secondsstart----"ec_seekambiguous
EDGFLVbytesec_seek---fsstart"ambiguous
EDGMP4secondsec_seek----start"ambiguous
BTGFLVsecondsstarttimeaktimeoffsetaktimeoffsetaktimeoffset---"
BTGFLVbytesap_start---fsstartec_seek"
BTGMP4secondsstarttime----startec_seek"

Key:

  • AKA - Akamai
  • AKA (VIP) - Akamai VIP Network
  • AKA HD - Akamai HD Network
  • LIM - Limelight
  • LEV - Level3
  • EDG - Edgecast (Large) 
  • BTG - BitGravity

Additionally:

  • CDNetworks : parameters are all configured by the customer/GUI and must be manually entered into FortiDirector
  • Edgecast (Small) : no video support

FortiDirector Configuration

URL transforms are enabled by adding items to the "URL Transforms" section when editing a Network Resource*  

You can define any custom URL transforms , or if the Network Resource Type is a Content Delivery Network (CDN), you can pre-pick from a list of known transformations (namely the start and seek parameters) for psuedo-streaming videos across multiple CDNs using the CDN-to-CDN Wizard at the bottom of the Drop Down list.

To establish a new URL transform, select any existing HTTP Network Resource, and click “edit”.  At the bottom of that page you will find the URL Transform Builder.  Here you can setup the transforms for matrix of Resources (e.g. CDNs) that you are using.    

Note: you will need to make sure you setup each directional transform for every Network Resource combination.  E.g. if you want full bi-directional transforms between 3 CDNs: (A,B,C), then you’ll need to setup the following transforms:

  • NWR A
    • Transform NWR C parameters to NWR A
    • Transform NWR B parameters to NWR A
  • NWR B
    • Transform NWR A parameters to NWR B
    • Transform NWR C parameters to NWR B
  • NWR C
    • Transform NWR A parameters to NWR C
    • Transform NWR B parameters to NWR C

Additionally, the FortiDirector order of evaluation becomes:

  1. Determine Rule Set based on Host Name
  2. Evaluate Rules within that Rule Set
  3. Determine what Network Resource will be delivered to
  4. Perform URL Transforms, based on the Network Resource chosen
  5. Issue 302.

 Configuration Example

I am using both Edgecast and Level 3 CDNs, and have the same videos replicated on both, with the same sub-directory structure.  I need to be able to, based on FortiDirector rules, serve from both CDNs.  My 1st CDN was Edgecast, so my developers have already programmed all of our Flash embeds using Edgecast syntax, such as:

http://ne.edgecastcdn.net/00XXXX/videos/example.mp4?ec_seek=958692

I'm now using FortiDirector and want to add Level 3.

  1. Create a HTTP Network Resource "Edgecast" with the following:
    1. Resource Type: Edgecast (Large)
    2. Base URL: http://ne.edgecastcdn.net/00XXXX/
  2. Create a 2nd HTTP Network Resource "Level 3" with the following:
    1. Resource Type: Level 3
    2. Base URL: Usually a CNAME mapping that Level 3 has provided for you: http://lvl3.mycompany.com/
  3. Once created, edit the HTTP Resource "Edgecast" and scroll down to the URL Transform Builder
  4. Select CDN-to-CDN Wizard and choose: Level 3 to Edgecast (Large).
  5. Submit the form to save.
  6. Add your "Edgecast" and "Level 3" resources to a Rule within a Rule Set, say http://fd.mycompany.com

 Usage Example

That's it.  Once you start using your FD ruleset, the following will occur:

  • The Hostname in your HTML gets updated to use the FortiDirector Rule Set, and the seek parameters are kept the same as Edgecast
     
    http://fd.mycompany.com/videos/example.mp4?ec_seek=958692
     
  • If FortiDirector decides to redirect to Edgecast, then seek parameters is not modified, and the 302 which is issued will be:
     
    http://ne.edgecastcdn.net/00XXXX/videos/example.mp4?ec_seek=958692
     
  • If FortiDirector decides to redirect to Level 3, then seek parameter is modified, and the 302 which is issued will be:
     
    http://lvl3.mycompany.com/videos/example.mp4?start=958692

 

* Assigning the transforms to the Network Resource allows for rules to be executed without other processing, and then once the Network Resource delivery is determined, the transformations are applied.  It also means that if you are using the same Network Resource in multiple Rulesets, you will not have to update every ruleset each time.


Contributors