Learn how to configure source properties for Media Cache, a built-in caching mechanism included with Wowza Streaming Engine™ media server software that increases the scalability of video-on-demand (VOD) streaming.
Before you start
You should complete the following tasks:
- Set up Media Cache according to Scale video-on-demand streaming with Wowza Streaming Engine Media Cache.
Add Media Cache source properties
First, to configure any properties for Media Cache sources, complete the following steps:
- In Wowza Streaming Engine Manager, click the Server tab, and then click Media Cache in the contents panel.
- On the Sources tab, click the name of the source you want to configure.
- Click the Properties tab.
Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
Next, refer to the following sections for how to configure common or source-specific properties:
Common source properties
You can configure the following Media Cache properties for any type of source.
- In the Media Cache Source area, click Edit.
- Update the values for the following properties as desired.
Name | Description |
defaultBlockSize | The size of the blocks of data that are read from the source to populate the cache. Values are expressed in bytes and the following units are supported: K (kilobytes), M (megabytes), G (gigabytes), and T (terabytes). The default value is 1M. |
readAhead | Switch that controls whether content blocks are cached. If set to true, content blocks are pre-populated in the cache based on the readAheadThreshold. If set to false, no read ahead occurs. The default state is true. |
readAheadCount | Determines how many blocks are fetched from the MediaCacheSource when the readAheadThreshold is reached. The default value is 1. |
readAheadThreshold | A percentage value that controls when the request is made to read the next block of data. For example, if set to 50, then when any content is read beyond the halfway mark of the current block of content, the next block is queued to be read. The default value is 30. |
- Click Save.
- Restart Wowza Streaming Engine.
File source properties
You can configure the following Media Cache property for file sources.
- In the File Source area, click Edit.
- Update the value for the following property as desired.
Name | Description |
fileReadRetries | The number of times a file request is retried if it fails. The default value is 3. |
- Click Save.
- Restart Wowza Streaming Engine.
HTTP source properties
You can configure the following Media Cache properties for HTTP sources.
- In the HTTP Source area, click Edit.
- Click Enabled, if it isn't already checked, for any of the following properties and then update the their values as desired.
Name | Description |
httpReadTimeout | The time, in milliseconds, that the server will wait for a read request to be fulfilled. The default value is 3000 (3 seconds). |
maxPoolSize | The maximum number of connections allowed in the connection pool. The default value is 25. Media Cache creates a pool of HTTP TCP connections per-source. Requests are sent to the source using this HTTP TCP pool. |
httpConnectionTimeout | The time, in milliseconds, that the server will wait for an SSL connection. The default value is 6000 (6 seconds). |
httpReadRetries | The number of times an HTTP request is retried if it fails. The default value is 3. |
httpSendBufferSize | The size, in bytes, of the send buffer, which is a low-level TCP buffer. The default value is 8000. |
httpReceiveBufferSize | The size, in bytes, of the receive buffer, which is a low-level TCP buffer. The default value is 65000. |
closeConnectOnBadContentLength | Switch that controls the socket connection when Media Cache makes a range request to the HTTP source and gets an incorrect content length in the response. If set to true, the server closes the connection when an unexpected content length is received. The default value is false. |
proxyHost | Properties that direct HTTP requests to a proxy. If these properties are set, Media Cache sends all HTTP requests to the defined proxy. Not enabled by default. |
proxyPort | |
requestFullURL |
- Click Save.
- In the Custom area, click Edit.
- Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add.
Path | Name | Type | Description |
/Root/MediaCacheSources /MediaCacheSource |
closeConnectOnBadStatus | Boolean | Enables Wowza Streaming Engine to close the connection if it does not receive the HTTP status code 206 (Partial Content) in the response when making a range request to the HTTP source. The default value is false. |
/Root/MediaCacheSources /MediaCacheSource |
sendHTTPKeepAlive | Boolean | Enables Wowza Streaming Engine to make a keep-alive connection to an HTTP source. The default value is true. |
/Root/MediaCacheSources /MediaCacheSource |
sendHTTPProxyKeepAlive | Boolean | Enables Wowza Streaming Engine to make a keep-alive connection to an HTTP proxy. The default value is true. |
/Root/MediaCacheSources /MediaCacheSource |
userHTTPHeaders | String | A pipe-separated list of key: value pairs that define HTTP headers to add to requests made to the source. For example: User-Agent: Mozilla/5.0|AccessControl-Request-Method: <method>. |
/Root/MediaCacheSources /MediaCacheSource |
debugHTTPRequests | Boolean | Enables debug logging for all HTTP requests. The default value is false. |
/Root/MediaCacheSources /MediaCacheSource |
urlDecodeStreamName | Boolean | Enables content names with non-safe transportable characters such as spaces and dots to be URL-encoded. The default value is false. |
/Root/MediaCacheSources /MediaCacheSource |
base64DecodeStreamName | Boolean | Enables all content names to be base64 encoded. This can aid in the transport of both unsafe and HTTP GET variables to be passed through to the HTTP source. Note that passing HTTP GET variables means the same piece of content could be cached more than once if the variable changes for new requests. The default value is false. |
- Click Save.
- Restart Wowza Streaming Engine.
Amazon S3 properties
You can configure the following Media Cache properties for Amazon S3 sources.
- In the Custom area, click Edit.
- Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add.
Path | Name | Type | Description |
/Root/MediaCacheSources /MediaCacheSource |
awsSigningVersion | Integer | Enables you to specify the signature version for Amazon S3 bucket authentication. Supported values are 2 or 4. The default value depends on your version of Wowza Streaming Engine:
|
/Root/MediaCacheSources /MediaCacheSource |
awsDefaultRegion | String | Inserts the region into the bucket name. Used to specify the default region for bucket authentication signing. For a list of regions, see AWS service endpoints. |
- Click Save.
- Restart Wowza Streaming Engine.