WowzaDynamicLoadBalancingAddOn UserGuide 4.5
WowzaDynamicLoadBalancingAddOn UserGuide 4.5
WowzaDynamicLoadBalancingAddOn UserGuide 4.5
Version: 4.5
http://www.wowza.com
Document History
Table of Contents
Overview ......................................................................................................6
Redirection.................................................................................................23
HTTP redirection ........................................................................................................... 24
RTMP and RTSP redirection ......................................................................................... 27
Host-specific information ............................................................................................... 28
JSON and XML output .................................................................................................. 28
Examples....................................................................................................40
Example Server.xml file................................................................................................. 40
Example privateAddressMap.txt file (Load Balancer) .................................................... 40
Overview
This document describes how to install and configure the Wowza Dynamic Load
Balancing AddOn to enable geographic, bandwidth, and connection-based system load
balancing between multiple servers running Wowza Streaming Engine software.
Note
Wowza Dynamic Load Balancing AddOn 4.5 is for use with Wowza Streaming Engine™ software
version 4.7.3 and later. If you’re running Wowza Streaming Engine 4.0 to 4.7.2, you must use
Dynamic Load Balancing AddOn 4.0. If you're running Wowza Media Server™ software, you must
use Dynamic Load Balancing AddOn 2.0 to enable system load-balancing.
Dynamic Load Balancing AddOn for Wowza Streaming Engine has the following
functionality:
• Decision-based chaining based on geography, bandwidth, connections, private
address space maps, and published stream locations can be specified in any
order:
• Each criteria can be checked until a destination Server is selected
• Geographic load balancing provided by MaxMind GeoIP2 and GeoIP Legacy:
• Geographic Server grouping enables multiple Servers in the same
geographic region to be further balanced
• Bandwidth usage-based load balancing:
• Bandwidth usage across the entire Server with a resolution in kilobits per
second (kbps)
• Ability to exclude or include specific applications (case-sensitive)
• Connection-based load balancing:
• Connections across the entire Server are taken into account
• Ability to exclude or include specific applications (case-sensitive)
• Published stream location-based load balancing:
• Ability to exclude or include specific applications (case-sensitive)
• If not all edge Servers are used, only those to which the stream is
published are used to find a valid destination
• Private address space location-based load balancing:
• Custom address space map file (IPv4 only currently)
• Ability to support multiple private address space segments per Server
6
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
7
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
Deployment architecture
options
The simplest load-balancing configuration is to have one Wowza server that acts as a load
balancer (the "Load Balancer" server) and then any number of other Wowza servers that
act as load-balancing edges (the load-balancing "Servers"). Requests to the Load Balancer
are redirected to one of the connected Servers. In this scenario, each load-balancing
Server has an equal chance of being redirected to.
8
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
All of the load-balancing Servers are registered with the Load Balancer and can be
removed individually. The Wowza server that's configured as the Load Balancer can also
act as a Server and can't be removed from the configuration.
Note
To use geographic load balancing, you must download the GeoIP Legacy or GeoIP2 database(s)
from MaxMind, Inc., and then configure the loadbalanceClientCountryList,
loadbalanceClientGeoIP2CountryList, and/or loadbalanceClientGeoIP2CityList properties on
the Load Balancer. The legacy GeoIP Country and GeoIP2 Country and City databases are
available for one-time purchase or paid subscription. Less accurate versions of the legacy GeoIP
and GeoIP2 databases (the GeoLite Country and GeoLite2 databases) are available free-of-
charge.
9
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
The above Wowza Streaming Engine installation paths for all operating systems are
referred to as [install-dir] throughout this document.
Installation files
The installation files for the module are contained in a compressed (zipped) folder
(WowzaStreamingEngineLoadBalancer-[version].zip). Download the file to each Wowza
server that you plan to use in the load-balancing configuration, and then use the
following instructions to install:
1. Extract the files from the downloaded WowzaStreamingEngineLoadBalancer-
[version].zip file.
2. Copy the contents of the unzipped folders to the corresponding folders in [install-
dir].
10
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
To configure the server listener for the Dynamic Load Balancing AddOn, open the [install-
dir]/conf/Server.xml file in a text editor and add the following server listener to the
<ServerListeners> section in the file. This must be done on the Load Balancer and all
Servers in the load-balancing topology:
<ServerListener>
<BaseClass>com.wowza.wms.plugin.loadbalancer.listeners.ServerListener</
BaseClass>
</ServerListener>
Note
The Examples section of this document shows sample Server.xml configurations for the Load
Balancer in a load-balancing deployment.
To configure the VHost listener for the Dynamic Load Balancing AddOn, open the [install-
dir]/conf/Server.xml file in a text editor and add the following server listener to the
<VHostListener> section in the file. This must be done on the Load Balancer and all
servers in the load-balancing topology:
<VHostListener>
<BaseClass>com.wowza.wms.plugin.loadbalancer.listeners.VHostListener</BaseC
lass>
</VHostListener>
Note
The Examples section of this document shows sample Server.xml configurations for the Load
Balancer in a load-balancing deployment.
11
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
You must specify properties in the Server.xml or VHost.xml file on the Load Balancer and
all servers to configure the desired load-balancing functionality. If you are using the
server listener, configure the properties in the Server.xml file. If you are using the VHost
listener, we recommend configuring the properties in the VHost.xml file; if you use the
Server.xml file, any identical properties in the VHost.xml file will override the Server.xml
values.
To configure the properties, open the .xml file in a text editor and add the desired
properties to the <Properties> section at the end of the file. The properties that can be
set on the Load Balancer are described in the following table:
Notes:
• The Examples section of this document shows sample Server.xml configurations for the Load
Balancer and Servers in a load-balancing deployment.
• Some of the properties in the following table require corresponding properties to be configured
on the Servers.
12
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
13
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
14
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
15
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
You must specify properties in the Server.xml or VHost.xml file on the Load Balancer and
all Servers to configure the desired load-balancing functionality. If you are using the
server listener, configure the properties in the Server.xml file. If you are using the VHost
listener, we recommend configuring the properties in the VHost.xml file; if you use the
Server.xml file, any identical properties in the VHost.xml file will override the Server.xml
values.
To configure the properties, open the .xml file in a text editor and add the desired
properties to the <Properties> section at the end of the file. The properties that can be
set on the Servers are described in the following table:
Note
Some of the properties in the following tables require corresponding properties to be configured on
the Load Balancer.
16
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
17
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
18
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
19
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
connections, set to 0.
If all Servers in the connection load-
balancing deployment are servicing the
maximum number of connections,
redirections will fail and you must add an
additional load-balancing Server to increase
capacity.
loadbalanceClientCountSourceClient Enables you to include connections made by
the Load Balancer, such as receiving streams
from an origin server or an IP camera, in the
connection count for connection load
balancing. The default value is False, which
excludes all remote connections from the
count. To include remote connections in the
count, set to True.
For Bandwidth balancing:
loadbalanceClientBandwidthEnable Controls bandwidth monitoring. The default
value is off. To enable bandwidth
monitoring, set this value to on and
configure the
loadbalanceClientBandwidthLimit property
on load-balancing Servers.
loadbalanceClientBandwidthLimit The bandwidth limit for the Server, in
kilobits per second (Kbps). For example, if
you want this Server to provide only 50
megabits per second (Mbps) of throughput,
set the value to 50000. To allow unlimited
bandwidth, set to 0.
If all Servers in the bandwidth load-
balancing deployment are saturated,
redirection will fail and you must add an
additional load-balancing Server to increase
capacity.
loadbalanceClientBandwidthSourceClient Enables you to include connections made by
the Load Balancer, such as receiving streams
from an origin server or an IP camera, in the
bandwidth count for bandwidth load
balancing. The default value is False, which
excludes all remote connections from the
count. To include remote connection in the
bandwidth count, set to True.
20
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
HTTP interfaces
To enable communication between the Load Balancer and Servers, and to view Server
statistics in a web-based administration interface, HTTP Providers are automatically
created:
• Statistics and control HTTP interface
• Redirection interface for XML and specific host information
For example, if the Load Balancer has the IP address of 192.168.1.1, the port 1935, and
the path loadbalanceinfo, you can open the following address in the browser:
21
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
http://192.168.1.1:1935/loadbalanceinfo
The web-based interface includes Pause Client and Remove Client buttons for each
Server entry.
Pause Client
When you click Pause Client, the Server is temporarily excluded from load balancing
decisions but it will continue to check in. The following is an example of the entry log
created when you click Pause Client:
INFO server comment – loadBalancer: Client: Pause: fa5bb359-8e1f-4fed-
8e8c-d50d4180d88d
After you click Pause Client, the button changes to Unpause, which immediately re-
includes the client in load balancing decision-making when clicked. The following is an
example of a log entry that is created when you click Unpause:
INFO server comment – loadBalancer: Client: Unpause: fa5bb359-8e1f-4fed-
8e8c-d50d4180d88d
Remove Client
When you click Remove Client, the Server is removed from the load-balancing
configuration without shutting it down. The following is an example of a log entry that is
created when you click Remove Client:
INFO server comment – loadBalancer: Client: Stopped: eabdcd97-3989-4622-
a5df-04d34193558a
Clicking Remove Client immediately removed the client from load balancing decision-
making and stops the client from checking in, which eventually causes the Server to
expire. The following is an example of a log entry that is created when a Server expires:
INFO server comment – loadBalancer: Remove client: Expire Timeout:
eabdcd97-3989-4622-a5df-04d34193558a
22
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
Redirection
The load-balancing redirection interfaces on the Load Balancer enable you to provide a
single URL to clients in the following basic form:
[protocol]://[load-balancer-ip-address]:1935/redirect/[application-
name]/[stream-name]?type=[http-transmission-type]
The [load-balancer-ip-address] is the IP address of the Wowza Load Balancer. The type
URL query is used to specify the manifest file format in the redirect URL that's returned to
clients and is only used for HTTP redirection.
A client is then redirected to an available load-balancing Server via a URL that has the
following basic form:
[protocol]://[load-balanced-server-ip-address]:1935/[application-
name]/[stream-name]/[manifest]
Notice that the /redirect/ part of the request URL is removed in the resulting redirect
URL. You can configure your filter to be any name and it too will be removed
appropriately. The [load-balanced-server-ip-address] is either the IP address of the
Wowza Load Balancer or the IP address of a load-balancing Server, depending on the load
on the system.
If you use wget and use the –server-response and set max-redirect to 0 you can see the
headers returned. For example, this command:
wget --max-redirect 0 --server-response http://[wowza-ip-
address]:1935/redirect/vod/stream.mp4?type=m3u8
You can see the request for the application vod and stream name stream.mp4 with the
type m3u8 this then generated a redirect of
http://[wowza-client-ip-address]:1935/vod/stream.mp4/playlist.m3u8
23
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
The address changes based on the load reported by each server and the configuration of
the decisions set.
Notes
• When the loadbalanceType property value is set to Server,Client on the Load Balancer, it's
also a load-balancing Server that can fulfill the client request if not overloaded. Setting this
property value to Server means that the Load Balancer redirects all client requests to
connected load-balancing Servers.
• When using a load-balancing system to deliver relative playlists, particularly with Apple HLS,
some playback clients may not follow the redirection correctly. Therefore, it is important to
configure absolute playlists for all load-balancing edge servers. For more information, see How
to switch between absolute and relative URLs in Apple HTTP Live Streaming playlists.
HTTP redirection
The HTTP redirection interface enables you to provide a single URL that redirects client
requests to an available load-balancing Server. The HTTP redirection supports most
clients by enabling M3U8, F4M, Manifest, MPEG-DASH, and RTMP XML outputs to be
created. All of the redirection types work for live and VOD applications configured in
Wowza Streaming Engine software.
HTTP clients are redirected using the HTTP 302 response status code. Your client must
support the HTTP 302 code for load balancing to work. RTMP clients that use HTTP
requests must support the returned XML (see RTMP XML).
Note
Cross-origin resource sharing (CORS) headers are now supported by default on all HTTP
Providers used by Wowza Streaming Engine, and can’t be configured through the load balancer.
The following is an example for generating an HTTP 302 (redirection) response with a
redirection URL in the Location header field for use in some iOS-based devices:
http://[load-balancer-ip-address]:1935/redirect/[application-
name]/[stream-name]?type=m3u8
24
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
http://[load-balanced-server-ip-address]:1935/[application-
name]/[stream-name]/playlist.m3u8
The following is an example for generating an HTTP 302 (redirection) response with a
redirection URL in the Location header field for use in some Flash-based players:
http://[load-balancer-ip-address]:1935/redirect/[application-
name]/[stream-name]?type=F4M
The following is an example for generating an HTTP 302 (redirection) response with a
redirection URL in the Location header field for use in some Silverlight clients:
http://[load-balancer-ip-address]:1935/redirect/[application-
name]/[stream-name]?type=Manifest
MPEG-DASH (MPD)
The following is an example for generating an HTTP 302 (redirection) response with a
redirection URL in the Location header field for use in some MPEG-DASH clients:
http://[load-balancer-ip-address]:1935/redirect/[application-
name]/[stream-name]?type=dash
You can also change the manifest type by using the manifestType query parameter. The
default manifest type is manifest.mpd, but the the following types are also valid:
• manifest_mpm4sav_mvlist.mpd
• manifest_mvlist.mpd
• manifest_mpm4sav_mvtime.mpd
• manifest_mvtime.mpd
• manifest_mpm4sav_mvnumber.mpd
25
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
• manifest_mvnumber.mpd.
In this example, MPEG Dash clients are redirected with a segment list manifest
(manifest_mvlist.mpd):
http://[load-balancer-ip-address]:1935/redirect/[application-
name]/[stream-name]?type=dash&manifestType=manifest_mvlist.mpd
The following is an example for generating XML output for use in some Flash-based
players:
http://[load-balancer-ip-address]:1935/redirect/[application-
name]/[stream-name]/loadbalancersmil
In this example, an RTMP client using HTTP requests gets XML returned similar to:
<?xml version="1.0"?>
<smil>
<head>
<meta base="rtmp://[load-balanced-server-ip-
address]:1935/[application-name]/" />
</head>
<body>
<switch>
<video src="[stream-name]" />
</switch>
</body>
</smil>
In the above example, a client connects to the Load Balancer and the original URL
parameters are used to construct the application name and stream to be used. If you
specify a longer directory structure, this is added to the src element in the XML file.
You can also generate a multi-bitrate version of this output to allow redirection for
adaptive bitrate (ABR) streams. To do this, the URL requires additional query parameters
that describe the assets and bitrates. These should contain a comma-separated list of
assets and their corresponding bitrates. If the number of assets and bitrates doesn't
match, no output is returned.
The following is an example for generating XML output for use in some Flash-based
players:
http://[load-balancer-ip-address]:1935/redirect/[application-
name]/loadbalancer.smil?assets=file1.mp4,file2.mp4,file3.mp4&bitrates=25
0000,350000,500000
In this example, an RTMP client using HTTP requests gets XML returned similar to:
<?xml version="1.0"?>
<smil>
<head>
<meta base="rtmp://54.194.186.4:80/vod/_definst_" />
</head>
<body>
<switch>
Copyright © 2007–2018 Wowza Media Systems™, LLC. All rights reserved.
26
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
Any additional query string parameters added to the HTTP request are also appended to
the file names presented in the XML file. This can be useful when using the SecureToken
feature in Wowza Streaming Engine (version 4.1 and later).
To enable RTMP redirection functionality to the Load Balancer, configure the load-
balancing system and add an application named 'redirect'. By default, the Load Balancer
enables this application for RTMP and RTSP redirection. You can use the
loadbalanceServerListenApplicationNames property to disable the auto-configuration or
change the application(s).
When auto-configuration is enabled, no changes are made to the Application.xml file.
However, if you disable auto-configuration of RTMP and RTSP redirection, you must add
the Redirect module to the [install-dir]/conf/[application-name]/Application.xml file as
the last module in the <Modules> section. The following example shows the Redirect
module:
<Module>
<Name>Redirect</Name>
<Description>Redirect</Description>
<Class>com.wowza.wms.plugin.loadbalancer.module.ClientConnections</Cla
ss>
</Module>
This module returns an RTMP or RTSP redirect to clients that connect to the Load
Balancer, except for those that are configured to be ignored in the
loadbalanceServerIgnoreClients property in the Server.xml file. Wowza edge servers
that connect to a Load Balancer that's also an origin server in a live stream repeater
(origin/edge) configuration are also ignored.
The following are examples of the URLs used to redirect:
RTMP clients:
rtmp://[load-balancer-ip-address]:1935/redirect/[application-name]/
RTSP clients:
rtsp://[load-balancer-ip-address]/redirect/[application-name]/[stream-
name]
27
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
Host-specific information
To determine the IP address and port of a load-balancing Server to use for any client
request, you can request this information by using the following URL:
http://[load-balancer-ip-address]:1935/redirect/?type=client&IP=A.B.C.D
You can use the IP query parameter to specify the IP address of a potential client to see
which load-balancing Server it would be redirected to. If you omit the query parameter,
the IP address of the local client is used.
This will return a text string with the IP address:port combination, for example:
[load-balanced-server-ip-address]:1935
You can also use the streamName query parameter to specify the name of a stream you
are looking for.
Additionally, you can request JSON and XML output when you query the load balancer
interface by adding the type query parameter to the queries.
JSON
To request JSON output, include the type query parameter with a value of json. For
example, the following query:
http://[load-balancer-ip-address]:1935/redirect/vod/sample.mp4?type=json
The output includes the load balancer version, build number, and the load-balancing
Server. It also returns the IP address determined from the client request. However, you
28
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
can override the IP address by using the IP query parameter; see Host-specific
information for more information.
XML
To request XML output, include the type query parameter with a value of xml. For
example, the following query:
http://[load-balancer-ip-address]:1935/redirect/vod/sample.mp4?type=xml
The output includes the load balancer version, build number, and the load-balancing
Server. It also returns the IP address determined from the client request. However, you
can override the IP address by using the IP query parameter; see Host-specific
information for more information.
29
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
30
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
3. Next, click </>Get Embed Code, which is located above the video preview.
4. In the Wowza Player Embed Code pop up, your full license is displayed in the
third section, Embed the Wowza Player. Copy and paste the license into the
WowzaPlayer example.
31
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
• "mp4:sample.mp4" with the media type prefix (such as mp4) and the name of
your video on demand file or the live source stream. The quotation marks are
required.
32
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
Developer extension
examples
The Dynamic Load Balancing AddOn 4.5 enables customers to develop and deploy their
own extensions to provide functionality specific to their environment. There are four
types of extensions: client data collection, server decision processing, communication
encryption, and HTTP redirection.
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import com.wowza.wms.application.WMSProperties;
import com.wowza.wms.logging.WMSLoggerFactory;
import com.wowza.wms.plugin.loadbalancer.server.LoadBalancerServer;
import com.wowza.wms.plugin.loadbalancer.utils.Logger;
import com.wowza.wms.server.IServer;
import com.wowza.wms.vhost.IVHost;
33
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
34
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
returnMap.put("dummyName","dummyInfo");
return returnMap;
}
The COMPONENT_NAME is used as a prefix for all of the names provided in the map as
they pass through the Server to the Load Balancer. This maintains unique entries for all
client extensions.
To use this extension, the loadbalanceClientProcessAddClasses property should be
added to the Server.xml or VHost.xml file. The following is an example for configuring
the property:
<Property>
<Name>loadbalanceClientProcessAddClasses</Name>
<Value>my.domain.test.client.extension.LoadBalancerClientDummyExtensio
n</Value>
</Property>
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import com.wowza.wms.application.WMSProperties;
import com.wowza.wms.logging.WMSLoggerFactory;
import com.wowza.wms.plugin.loadbalancer.utils.Logger;
35
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
this.debug = debug;
if (!getActive())
return clientList;
36
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
{
String thisClient = clientI.next();
HashMap<String, String> thisClientAtt =
clientList.get(thisClient).getAttributes();
// The attribute list from the client contains ALL attributes
passed by ALL the client data collection extensions.
// Each client extension prefixes the name of the extension
if (thisClientAtt.containsKey("ClientExtensionDummy-dummyName"))
{
// Determine if this client matches criteria you are looking for
and add to the
// return list of clients. This list is passed to the next
extension for processing.
//
// outputClients.put(thisClient, clientList.get(thisClient));
}
}
return outputClients;
}
}
<Value>my.domain.test.server.extension.LoadBalancerServerDummyExtensio
n </Value>
</Property>
The HTTP redirection extensions enable you to write your own extension to handle any
type of request you wish to redirect. The following is an example of an HTTP redirection
extension:
package my.domain.test.http.extension;
import com.wowza.wms.http.IHTTPRequest;
import com.wowza.wms.http.IHTTPResponse;
import com.wowza.wms.plugin.loadbalancer.server.ILoadBalancerServer;
import com.wowza.wms.vhost.IVHost;
37
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
38
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
Or you can append a .[suffix] to the end of the URL. For example:
http://[load-balancer-ip-address]:1935/redirect/[application-
name]/[stream-name].dummy
Note
If Wowza Streaming Engine matches against an extension, such as m3u8, you must use the type
parameter.
39
W O W Z A S T R E A M I N G E N G I N E 4 . 5 D Y N A M I C L O A D B A L A N C I N G
A D D O N
Examples
Server.xml files must be configured on the Load Balancer and all load-balancing Servers.
Examples are available in [install-dir]/documentation/exampleConfigurations for each
type of load balancing decision. Each example includes two files: Server.txt demonstrates
the Load Balancer configuration and Client.txt demonstrates the load-balancing Server
configuration.
Note
To use multiple types of load balancing, enter a comma-separated list of values for the
loadbalanceServerDecisionOrder in the Load Balancer Server.xml file, and then make sure the
properties for those types of load balancing are added to the Server.xml files on the Load Balancer
and load-balancing Servers. For more information, see Load Balancer property configuration
and Server property configuration.
To balance load based on a custom address space map, you must create a new text file
named privateAddressMap.txt that lists the private addresses and tags the Server should
be used for. Usually, this file is located in the [install-dir]/conf/, but you can use the
loadbalanceServerPrivateAddressMapFile property to specify an alternate path. This
map file should contain one entry per line and include a tag and the IP addresses.
Note
IPv6 addresses are not supported. You must use IPv4 or CIDR notation.
To use IPv4 notation, each entry must be formatted as a comma-separated list and
contain a beginning IP address, an ending IP address, and a tag. For example:
192.168.0.0,192.168.0.63,HOME
192.168.1.0,192.168.1.255,WORK
To use the CIDR notation, each entry must contain the CIDR address and a tag, separated
by a comma. For example:
192.168.0.0/26,HOME
192.168.1.0/24,WORK
The tags listed in the privateAddressMap.txt file must correspond to the value of the
loadbalanceClientPrivateAddressTagList property on the Server.
40