How to dynamically resolve edge server stream requests to origin servers (StreamResolver)

The ModuleStreamResolver module for Wowza Streaming Engine™ media server software enables edge servers in a live stream repeater (origin/edge) configuration to dynamically resolve client requests for streams to multiple origin servers.

Contents


Prerequisites

Installation

Wowza Streaming Engine edge server configuration

Wowza Streaming Engine edge server properties

Wowza Streaming Engine origin server configuration

Wowza Streaming Engine origin server properties

Usage

For developers

More resources

Prerequisites


Wowza Streaming Engine 4.0.0 or later is required.

Installation


  1. Download wse-plugin-streamresolver.zip. Do this on all origin and edge servers in your live stream repeater configuration.
     
  2. Extract the contents from the downloaded (zipped) package, and then copy the lib/wse-plugin-streamresolver.jar file from the package to the lib folder in your Wowza Streaming Engine installation ([install-dir]/lib).
     
  3. Restart Wowza Streaming Engine.

Wowza Streaming Engine edge server configuration


On each edge server in your live stream repeater setup, add the following module definition to your live application configuration. See Configure modules for details.

Name
Description
Fully Qualified Class Name
ModuleStreamResolverResolves streams from origin dynamically.com.wowza.wms.plugin.streamresolver.ModuleStreamResolver

Wowza Streaming Engine edge server properties


After enabling the module on each edge server, you can adjust the default settings by adding the following properties to your live application. See Configure properties for details.

Path
Name
Type
Value
Notes
/Root/ApplicationwowzaResolverConfTargetPathString[install-dir]/content/origins.txtPath to a file that has a list of origin servers (one per line). (default: not set)
/Root/ApplicationwowzaResolverOriginServersStringserver1.com,server2.comIf the wowzaResolverConfTargetPath property isn't set, use this property to define a comma-delimited list of origin servers. (default: not set)
/Root/ApplicationwowzaResolverProtocolStringrtmpProtocol to use when connecting to origin servers (rtmp or wowz). (default: wowz)
/Root/ApplicationwowzaResolverUDPClientPortInteger9777UDP port to use for edge/origin communication. (default: 9777)
/Root/ApplicationwowzaResolverUDPClientTimeoutInteger2000Time (in milliseconds) before timing out the connection to an origin server. (default: 2000)
/Root/ApplicationwowzaResolverOriginApplicationNameStringlive(Optional) By default, the edge server application looks for streams on the origin server application with the same name. Use this property to define a different application name on the origin server in which to look for streams. (default: uses requested edge application name)
/Root/ApplicationwowzaResolverOriginApplicationInstanceNameString_definst_(Optional) By default, the edge server application looks for streams on the origin server application with the same application instance name. Use this property to define a different application instance name on the origin server in which to look for streams. (default: uses requested edge application instance name)
/Root/ApplicationwowzaResolverOriginStreamNameStringmyStream(Optional) By default, the edge server application looks for streams on the origin server application/application instance with the same stream name. Use this property to define a different stream name on the origin server to look for. (default: uses stream name requested from edge).
/Root/ApplicationwowzaResolverDebugLogBooleantrueEnable extra debug logging on the edge application. (default: false)

 


On each origin server in your live stream repeater setup, add the following server listener definition to your media server. See Configure server listeners for details.

Fully Qualified Class Name
com.wowza.wms.plugin.streamresolver.ServerListenerLocateSourceStream

Wowza Streaming Engine origin server properties


After enabling the server listener on each origin server, you can adjust the default settings by adding the following properties to your live application. See Configure properties for details.

Path
Name
Type
Value
Notes
/Root/ServerwowzaSourceStreamUDPListenerDebugBooleanfalseDebug inbound connections to your origin server from edge requests. (default: false)
/Root/ServerwowzaSourceStreamUDPListenerPortInteger9777UDP port to use for origin/edge communication. (default: 9777)
/Root/ServerwowzaSourceStreamHostNameStringmycompany.comThe origin server's public hostname. (default: null)

Usage


When a client/player requests a stream from an edge server, the edge will first look for existing streams that it has already requested for a match. If none are found, it then queries the defined list of origin servers to return the requested stream. The edge server will connect to the origin server that responds first with a valid stream, and then serve that stream to the client/player.

For developers


Source code is available on GitHub.


Wowza Media Systems™ provides developers with a platform to create streaming applications and solutions. See Wowza Developer Tools to learn more about our APIs and SDK.


More resources



Wowza media server software and all components, including modules, source code, and other related items offered on this page, are copyrighted (c) 2006-2017 by Wowza Media Systems, LLC, all rights reserved, and are licensed pursuant to the Wowza Media Software End User License Agreement.

 

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