• How to configure a Wowza server as an HTTP caching origin

    A Wowza media server can be used as an origin to an HTTP caching infrastructure for delivery of live and video on demand streams that use the Adobe HTTP Dynamic Streaming (HDS), Apple HTTP Live Streaming (HLS), Microsoft Smooth Streaming, and MPEG-DASH streaming protocols. This article describes how to configure your streaming application to accomplish this.

    Notes:
    • The HTTP caching feature is supported in Wowza Streaming Engine™ software and in Wowza Media Server™ software (version 3.5 and later).

    • The MPEG-DASH streaming protocol is only supported by Wowza Streaming Engine software.

    • The HTTP caching feature is NOT available in Trial and Developer Editions of the server software.

    Contents


    About HTTP Caching Origin
    Configuration Notes
    Creating a Wowza media server HTTP Origin Application
    Property Reference
    Additional Resources

    About HTTP Caching Origin


    When using a Wowza media server as an HTTP caching origin:

    • The edge is an HTTP caching infrastructure, not another Wowza media server. The edge HTTP caching infrastructure pulls HTTP chunks from your Wowza media server HTTP caching origin and caches them. All clients receive the same cached data.

    • Communication with the Wowza media server HTTP caching origin is sessionless (session-based communication doesn't work). A single session is created internally for the requested protocol. This session is based on the stream name and it's used for every request for that name. This has the following ramifications:

      • URL query parameters in player requests aren't supported. This includes the wowzaplaystart and wowzaplayduration parameters for VOD playback, the wowzadvrplayliststart and wowzadvrplaylistduration for nDVR playback, and any custom parameters. (This does NOT include the DVR query parameter that's required for DVR playback.) If query parameters are set, only the parameters that are set when the stream name is initially requested are used. Subsequent changes to these parameters, either from the same player or a different one, are ignored.

      • Session-specific information (for example, connection counts) isn't relevant and, therefore, isn't available.

    Configuration Notes


    For HTTP caching to work properly, the following aspects of HTTP streaming behave differently:

    • The Wowza media server session identifier (_wXXXXXXXXX) must be removed from all playlist and manifest data. This is done automatically when you enable the Wowza media server to be an HTTP caching origin (see below).

    • HTTP caching headers must be set to enable content caching.

    • Random identifiers must be added to live media chunk and fragment URLs so that each encoder session is unique from a caching perspective.


    Creating a Wowza media server HTTP Origin Application


    This section shows you how to create an application on your Wowza media server to use as an HTTP caching origin. If you're running Wowza Streaming Engine software, you can either create this application in Wowza Streaming Engine Manager or update Application.xml properties in a text editor with the required properties that are described in the Property Reference. If you're running Wowza Media Server software, you must configure the Application.xml file.

    1. In Wowza Streaming Engine Manager, click the Applications tab, and then click Add Application in the contents panel.

    2. On the Add Application page, click either Live HTTP Origin (for live streaming) or VOD HTTP Origin (for video on-demand streaming).


    3. In the New Application dialog box, name your application and click Add.


    4. Click Save to save the application with default values.

    The application is ready to use as an origin to an HTTP caching infrastructure.

    Note: As shown in the previous figure, HTTP origin applications support all HTTP streaming playback types by default. They don't support the RTMP and RTSP playback types.
    HTTP cache origin properties are automatically enabled and set to default values for each of the selected Playback Types for the application. To change the default application property values, click the Properties tab and then click HTTP Cache Origin in the Quick Links bar. Use the Property Reference below to configure the default property values and to add custom properties. Note that access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.

    Property Reference


    This section describes the properties that you can configure for your HTTP origin application. If you're running Wowza Streaming Engine software, you can configure the values for the default properties and add the custom properties described in this section using Wowza Streaming Engine Manager. If you're running Wowza Media Server software, you must configure the properties in the application's [install-dir]/conf/[application]/Application.xml file using a text editor.

    HTTP Streamer properties

    httpOriginMode


    This property is required to configure your HTTP origin application and enables or disables HTTP Origin Mode. The default value is on (enabled).

    Wowza Streaming Engine Manager configuration


    1. In Wowza Streaming Engine Manager, click the Applications tab, and then click the name of your HTTP origin application in the contents panel.

    2. On the HTTP origin application page Properties tab, click HTTP Cache Origin in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. In the HTTP Cache Origin area, make sure that httpOriginMode value is set to on. To turn off HTTP Origin Mode, click Edit, and then set the value to off.

    4. Click Save, and then restart the application to apply any changes.

    XML configuration


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your HTTP origin application and add the following property to the <HTTPStreamer>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml as there are several such containers in the file.
      <Property>
          <Name>httpOriginMode</Name>
          <Value>on</Value>
          <Type>String</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.

    Apple HLS cache-control properties


    These properties are required for delivery of streams using the Apple HTTP Live Streaming protocol.

    Wowza Streaming Engine Manager configuration


    1. In Wowza Streaming Engine Manager, click the Applications tab, and then click the name of your HTTP origin application in the contents panel.

    2. On the HTTP origin application page Properties tab, click HTTP Cache Origin in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. Click Edit in the HTTP Cache Origin properties area and make the following changes:

      1. Select the Enabled check box next to cupertinoCacheControlPlaylist and set the value to max-age=1 second.

      2. Select the Enabled check box next to cupertinoCacheControlMediaChunk and set the value to max-age=3600 seconds.

    4. Click Save, and then restart the application to apply the changes.

    XML configuration


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your HTTP origin application and add the following properties to the <HTTPStreamer>/<Properties> container. Be sure to add the properties to the correct <Properties> container in Application.xml as there are several such containers in the file.
      <Property>
          <Name>cupertinoCacheControlPlaylist</Name>
          <Value>max-age=1</Value>
          <Type>String</Type>
      </Property>
      <Property>
          <Name>cupertinoCacheControlMediaChunk</Name>
          <Value>max-age=3600</Value>
          <Type>String</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.
    Notes:
    • cupertinoCacheControlPlaylist sets the value of the HTTP caching header for playlists in seconds.

    • cupertinoCacheControlMediaChunk sets the value of the HTTP caching header for media chunks in seconds.

    Smooth Streaming cache-control properties


    These properties are required for delivery of streams using the Microsoft Smooth Streaming protocol.

    Wowza Streaming Engine Manager configuration


    1. In Wowza Streaming Engine Manager, click the Applications tab, and then click the name of your HTTP origin application in the contents panel.

    2. On the HTTP origin application page Properties tab, click HTTP Cache Origin in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. Click Edit in the HTTP Cache Origin properties area and make the following changes:

      1. Select the Enabled check box next to smoothCacheControlPlaylist and set the value to max-age=1 second.

      2. Select the Enabled check box next to smoothCacheControlMediaChunk and set the value to max-age=3600 seconds.

      3. Select the Enabled check box next to smoothCacheControlDataChunk and set the value to max-age=3600 seconds.

      4. Select the Enabled check box next to smoothStreamingEncryptionRandomIV and set the value to false.

    4. Click Save, and then restart the application to apply any changes.

    XML configuration


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your HTTP origin application and add the following properties to the <HTTPStreamer>/<Properties> container. Be sure to add the properties to the correct <Properties> container in Application.xml as there are several such containers in the file.
      <Property>
          <Name>smoothCacheControlPlaylist</Name>
          <Value>max-age=1</Value>
          <Type>String</Type>
      </Property>
      <Property>
          <Name>smoothCacheControlMediaChunk</Name>
          <Value>max-age=3600</Value>
          <Type>String</Type>
      </Property>
      <Property>
          <Name>smoothCacheControlDataChunk</Name>
          <Value>max-age=3600</Value>
          <Type>String</Type>
      </Property>
      <Property>
          <Name>smoothStreamingEncryptionRandomIV</Name>
          <Value>false</Value>
          <Type>Boolean</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.
    Notes:
    • smoothCacheControlPlaylist sets the value of the HTTP caching header for manifests in seconds.

    • smoothCacheControlMediaChunk sets the value of the HTTP caching header for media segments in seconds.

    • smoothCacheControlDataChunk sets the value of the HTTP caching header for data segments in seconds.

    • smoothStreamingEncryptionRandomIV controls whether the encryption initialization vector (IV) is random (true) or generated (false). This property is only supported in Wowza Streaming Engine software.

    Adobe HDS cache-control properties


    This property is required for delivery of streams using the Adobe HTTP Dynamic Streaming protocol.

    Wowza Streaming Engine Manager configuration


    1. In Wowza Streaming Engine Manager, click the Applications tab, and then click the name of your HTTP origin application in the contents panel.

    2. On the HTTP origin application page Properties tab, click HTTP Cache Origin in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. Click Edit in the HTTP Cache Origin properties area and make the following changes:

      1. Select the Enabled check box next to sanjoseCacheControlPlaylist and set the value to max-age=1 second.

      2. Select the Enabled check box next to sanjoseCacheControlMediaChunk and set the value to max-age=3600 seconds.

    4. Click Save, and then restart the application to apply the changes.

    XML configuration


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your HTTP origin application and add the following properties to the <HTTPStreamer>/<Properties> container. Be sure to add the properties to the correct <Properties> container in Application.xml as there are several such containers in the file.
      <Property>
          <Name>sanjoseCacheControlPlaylist</Name>
          <Value>max-age=1</Value>
          <Type>String</Type>
      </Property>
      <Property>
          <Name>sanjoseCacheControlMediaChunk</Name>
          <Value>max-age=3600</Value>
          <Type>String</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.
    Notes:
    • sanjoseCacheControlPlaylist sets the value of the HTTP caching header for manifests and playlists in seconds.

    • sanjoseCacheControlMediaChunk sets the value of the HTTP caching header for media segments in seconds.

    MPEG-DASH cache-control properties


    These properties are required for delivery of streams using the MPEG-DASH streaming protocol.

    Note: The MPEG-DASH cache-control properties are only supported in Wowza Streaming Engine software.

    Wowza Streaming Engine Manager configuration


    1. In Wowza Streaming Engine Manager, click the Applications tab, and then click the name of your HTTP origin application in the contents panel.

    2. On the HTTP origin application page Properties tab, click HTTP Cache Origin in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. Click Edit in the HTTP Cache Origin properties area and make the following changes:

      1. Select the Enabled check box next to mpegdashCacheControlPlaylist and set the value to max-age=1 second.

      2. Select the Enabled check box next to mpegdashCacheControlMediaChunk and set the value to max-age=3600 seconds.

    4. Click Save, and then restart the application to apply the changes.

    XML configuration


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your HTTP origin application and add the following properties to the <HTTPStreamer>/<Properties> container. Be sure to add the properties to the correct <Properties> container in Application.xml as there are several such containers in the file.
      <Property>
          <Name>mpegdashCacheControlPlaylist</Name>
          <Value>max-age=1</Value>
          <Type>String</Type>
      </Property>
      <Property>
          <Name>mpegdashCacheControlMediaChunk</Name>
          <Value>max-age=3600</Value>
          <Type>String</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.
    Notes:
    • mpegdashCacheControlPlaylist sets the value of the HTTP caching header for manifests and playlists in seconds.

    • mpegdashCacheControlMediaChunk sets the value of the HTTP caching header for media segments in seconds.

    Custom properties

    cupertinoOnChunkStartResetCounter


    Set this property to true to reset the continuity counter in each media chunk that's generated. This helps to ensure that each generated chunk is identical. When disabled (false), the continuity counter is incremented in each media chunk to help track packet loss in TCP transmissions.

    Wowza Streaming Engine Manager configuration


    1. In Wowza Streaming Engine Manager, click the Applications tab, and then click the name of your HTTP origin application in the contents panel.

    2. On the HTTP origin application page Properties tab, click Custom in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. In the Custom area, click Edit.

    4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:

      • Path - Select /Root/Application/HTTPStreamer.

      • Name - Enter cupertinoOnChunkStartResetCounter.

      • Type - Select Boolean.

      • Value - Enter true.

    5. Click Save, and then restart the application to apply the changes.

    XML configuration


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your HTTP origin application and add the following property to the <HTTPStreamer>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml as there are several such containers in the file.
      <Property>
          <Name>cupertinoOnChunkStartResetCounter</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.

    httpRandomizeMediaName


    Set this property to true to help to ensure that the chunks in live streams are unique if the encoder is restarted.

    Wowza Streaming Engine Manager configuration


    1. In Wowza Streaming Engine Manager, click the Applications tab, and then click the name of your HTTP origin application in the contents panel.

    2. On the HTTP origin application page Properties tab, click Custom in the Quick Links bar.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. In the Custom area, click Edit.

    4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:

      • Path - Select /Root/Application/LiveStreamPacketizer.

      • Name - Enter httpRandomizeMediaName.

      • Type - Select Boolean.

      • Value - Enter true.

    5. Click Save, and then restart the application to apply the changes.

    XML configuration


    1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your HTTP origin application and add the following property to the <LiveStreamPacketizer>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml as there are several such containers in the file.
      <Property>
          <Name>httpRandomizeMediaName</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
      </Property>
    2. Restart the Wowza media server software to apply the changes.
    Note: If you want to use Wowza nDVR as an HTTP caching origin, you must also add this property to the Root/Application/DVR path (<DVR>/Properties container) to your live application that has Wowza nDVR enabled.

    Additional Resources


    For more information about HTTP caching technologies, see the following resources:



    Originally Published: 11-08-2012.
    Updated: For Wowza Streaming Engine 4.2 on 06-16-2015.

    If you're having problems or want to discuss this article, post in our forum.