Caching HTTP Streaming from Akamai HD on ProxySG


Article ID: 168801


Updated On:


Advanced Secure Gateway Software - ASG ProxySG Software - SGOS


As of SGOS 6.5.x the ProxySG can identify various HTTP streaming protocols such as Adobe's HTTP Dynamic Streaming (HDS), Apple's HTTP Live Streaming (HLS), and Microsoft's Smooth Streaming. The ProxySG can also cache streaming content for delivery to multiple clients without having to retrieve the content for each user from the Origin Content Server (OCS). This results in dramatic bandwidth savings (i.e. if 10 clients watch a stream with a bitrate of 2 Mbps, ProxySG would be able to save 80% [or 16 Mbps] bandwidth).


The following is example Content Policy Language (CPL) that can be used to effectively cache content delivered by these protocols.

Make sure to change the Content Delivery Network (CDN) domains as necessary.

; Example Streaming / Cache Policy
; for video delivered via
   ; Remove Query String from Cache URL
   condition=StreamingSites action.do_not_cache_query(yes)
   ; Don´t force-cache Manifest file extensions
   condition=StreamingManifests cache(no)
   ; Don´t force-cache bootstrap files
   condition=StreamingSites url.path.substring="bootstrap" cache(no)
   ; Force Cache Fragment Files with a configurable TTL (here 1h = 3600s)
   condition=StreamingSites cache(yes) force_cache(yes) ttl(3600)
define condition StreamingManifests
    url.extension=ismc  ;MS Smooth Manifest File Extension
    url.extension=f4m   ;Adobe HDS Manifest File Extension
    url.extension=m3u8  ;Apple HLS Manifest File Extension
define condition StreamingSites
      ; add CDN domains, this is just one example
define action do_not_cache_query
   rewrite (url, ".*", "$(cs-uri-stem)", cache)