Wowza Community

IP address on LoadBalancing configuration

Hi,

just try to configure load balancing from my two server using LoadBalancer_4.0 module .

so, assuming that I have two server :

(1) main server - Load Balancer (1.1.1.1)

(2) second server - load-balancing Server (2.2.2.2)

in the readme.html on module folder, for Load Balancer I have :

 
       <Property>
		<Name>loadbalanceServerIP</Name>
		<Value>[Load Balancer IP address (xxx.xxx.x.xxx)]</Value>
		<Type>String</Type>
	</Property>

and for load-balancing Server I have :

	<Property>
		<Name>loadbalanceServerIP</Name>
		<Value>[Load Balancer (not this Server) IP address (xxx.xxx.x.xxx)]</Value>
		<Type>String</Type>
	</Property>

so, for Load Balancer I need put IP 2.2.2.2 ? (load-balancing Server IP)

and, which IP I need put in the load-balancing Server IP field ?

also, I have see that the configuration is :

  • Server

  • Client

  • Server,Client

if have only two machine as previous described, I need put ‘Server’ in the Load Balancer and ‘Client’ on load-balancing Server ?

thanks

steve

Steve,

In the example you’ve provided above, You indicated the ip of the Load balancer is 1.1.1.1. So the property is the same for both servers (load balancer and balancing server).

So your example ip would look like this in both Server.xml files.

            <Property>
		<Name>loadbalanceServerIP</Name>
		<Value>1.1.1.1</Value>
		<Type>String</Type>
	    </Property>

Please let me know if you have additional questions. Also, all of this information and examples are in the Dynamic Load Balancing AddOn pdf in the load balancing folder.

Regards,

Mac

Hi,

This is now being handled in ticket #125975

Daren

hi Mac,

ok understand, so I’m able to see loadbalancerinfo in the load balancer server now .

now, if want add an application with load balancer activated, how to do ?

just try to add on load balancer server an application called ‘balancer’ , now, need repeat the same operation in the load-balancing server ?

and, need add this code on application.xml ?

<Module>
     <Name>Redirect</Name> 
    <Description>Redirect</Description> 
    <Class>com.wowza.wms.plugin.loadbalancer.redirect.ClientConnections</Class> 
</Module>

thanks

steve

Hi Mac,

for tell the truth I have follow pdf guide inside v4.0 module, but I have see that this Property is Optional, so I need add in any case ?

if is not present in my server.xml not all application is included by default ?

sorry but I have spend some hour for try this config, now I’m stopped in this point ; I’m unable to add application and make stream test .

I not have understand if need setup the application in both server and if need add some extra config in application.xml inside application

thanks

steve

Hi Mac,

so, I have this config :

Load Balancer Server.xml

<?xml version="1.0" encoding="UTF-8"?>
<Root version="2">
	<Server>
		<Name>Wowza Streaming Engine</Name>
		<Description>Wowza Streaming Engine is robust, customizable, and scalable server software that powers reliable streaming of high-quality video and audio to any device, anywhere.</Description>
		<RESTInterface>
			<Enable>true</Enable>
			<IPAddress>*</IPAddress>
			<Port>8087</Port>
			<!-- none, basic, digest-->
			<AuthenticationMethod>digest</AuthenticationMethod>
			<DiagnosticURLEnable>true</DiagnosticURLEnable>
			<SSLConfig>
				<Enable>false</Enable>
				<KeyStorePath></KeyStorePath>
				<KeyStorePassword></KeyStorePassword>
				<KeyStoreType>JKS</KeyStoreType>
				<SSLProtocol>TLS</SSLProtocol>
				<Algorithm>SunX509</Algorithm>
				<CipherSuites></CipherSuites>
				<Protocols></Protocols>
			</SSLConfig>
			<IPWhiteList>127.0.0.1</IPWhiteList>
			<IPBlackList></IPBlackList>
			<EnableXMLFile>false</EnableXMLFile>
			<DocumentationServerEnable>false</DocumentationServerEnable>
			<DocumentationServerPort>8089</DocumentationServerPort>
			<!-- none, basic, digest-->
			<DocumentationServerAuthenticationMethod>digest</DocumentationServerAuthenticationMethod>
			<Properties>
			</Properties>
		</RESTInterface>
		<CommandInterface>
			<HostPort>
				<ProcessorCount>${com.wowza.wms.TuningAuto}</ProcessorCount>
				<IpAddress>*</IpAddress>
				<Port>8083</Port>
			</HostPort>
		</CommandInterface>
		<AdminInterface>
			<!-- Objects exposed through JMX interface: Server, VHost, VHostItem, Application, ApplicationInstance, MediaCaster, Module, Client, MediaStream, SharedObject, Acceptor, IdleWorker -->
			<ObjectList>Server,VHost,VHostItem,Application,ApplicationInstance,MediaCaster,Module,IdleWorker</ObjectList>
		</AdminInterface>
		<Stats>
			<Enable>true</Enable>
		</Stats>
		<!-- JMXUrl: service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi -->
		<JMXRemoteConfiguration>
			<Enable>false</Enable>
			<IpAddress>localhost</IpAddress>
			<!-- set to localhost or internal ip address if behind NAT -->
			<RMIServerHostName>localhost</RMIServerHostName>
			<!-- set to external ip address or domain name if behind NAT -->
			<RMIConnectionPort>8084</RMIConnectionPort>
			<RMIRegistryPort>8085</RMIRegistryPort>
			<Authenticate>true</Authenticate>
			<PasswordFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.password</PasswordFile>
			<AccessFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.access</AccessFile>
			<SSLSecure>false</SSLSecure>
		</JMXRemoteConfiguration>
		<UserAgents>Shockwave Flash|CFNetwork|MacNetwork/1.0 (Macintosh)</UserAgents>
		<Streams>
			<DefaultStreamPrefix>mp4</DefaultStreamPrefix>
		</Streams>
		<ServerListeners>
			<ServerListener>
				<BaseClass>com.wowza.wms.mediacache.impl.MediaCacheServerListener</BaseClass>
			</ServerListener>
			<ServerListener>
				<BaseClass>com.wowza.wms.plugin.collection.serverlistener.ServerListenerStreamPublisher</BaseClass>
			</ServerListener>
			<ServerListener>
			    <BaseClass>com.wowza.wms.plugin.loadbalancer.general.LoadBalancerServer</BaseClass>
			</ServerListener>
		</ServerListeners>
		<!-- Properties defined here will be added to the IServer.getProperties() collection -->				
		<VHostListeners>
			<!--
			<VHostListener>
				<BaseClass></BaseClass>
			</VHostListener>
			-->
		</VHostListeners>
		<HandlerThreadPool>
			<PoolSize>${com.wowza.wms.TuningAuto}</PoolSize>
		</HandlerThreadPool>
		<TransportThreadPool>
			<PoolSize>${com.wowza.wms.TuningAuto}</PoolSize>
		</TransportThreadPool>
		<RTP>
			<DatagramStartingPort>6970</DatagramStartingPort>
			<DatagramPortSharing>false</DatagramPortSharing>
		</RTP>
		<Manager>
			<!-- Properties defined are used by the Manager -->
			<Properties>
			</Properties>
		</Manager>
		<!-- Properties defined here will be added to the IServer.getProperties() collection -->
		        <Properties>
						<Property>
								<Name>loadbalanceServerPort</Name>
								<Value>1935</Value>
						</Property>
						<Property>
								<Name>loadbalanceDebugEnabled</Name>
								<Value>On</Value>
						</Property>
						<Property>
						        <Name>loadbalanceConnectionEnable</Name> 
						        <Value>On</Value>
						        <Type>String</Type> 
						</Property>
						<Property>
								<Name>loadbalanceAllowRemoteClientShutdown</Name>
								<Value>On</Value>
						</Property>
						<Property>
								<Name>loadbalanceType</Name>
								<Value>Server,Client</Value>
						</Property>
						<Property>
								<Name>loadbalanceKey</Name>
								<Value>123456789012345</Value>
						</Property>
						<Property>
								<Name>loadbalanceIgnoreClients</Name>
								<Value></Value>
						</Property>
						<Property>
								<Name>loadbalanceGeoDataFile</Name>
								<Value>[Install-dir]\GeoIP.dat</Value>
						</Property>
						<Property>
								<Name>loadbalanceDecisionOrder</Name>
								<Value>Connection,Bandwidth</Value>
						</Property>
						<Property> 
						        <Name>loadbalanceConnectionLimit</Name> 
						        <Value>50</Value>
						        <Type>String</Type> 
						</Property>
						<Property>
								<Name>loadbalanceServerIP</Name>
								<Value>192.168.10.10</Value>
						</Property>						
				</Properties>		
	</Server>
</Root>								

and, Load-Balancing Server , Server.xml :

<?xml version="1.0" encoding="UTF-8"?>
<Root version="2">
	<Server>
		<Name>Wowza Streaming Engine</Name>
		<Description>Wowza Streaming Engine is robust, customizable, and scalable server software that powers reliable streaming of high-quality video and audio to any device, anywhere.</Description>
		<RESTInterface>
			<Enable>true</Enable>
			<IPAddress>*</IPAddress>
			<Port>8087</Port>
			<!-- none, basic, digest-->
			<AuthenticationMethod>digest</AuthenticationMethod>
			<DiagnosticURLEnable>true</DiagnosticURLEnable>
			<SSLConfig>
				<Enable>false</Enable>
				<KeyStorePath></KeyStorePath>
				<KeyStorePassword></KeyStorePassword>
				<KeyStoreType>JKS</KeyStoreType>
				<SSLProtocol>TLS</SSLProtocol>
				<Algorithm>SunX509</Algorithm>
				<CipherSuites></CipherSuites>
				<Protocols></Protocols>
			</SSLConfig>
			<IPWhiteList>127.0.0.1</IPWhiteList>
			<IPBlackList></IPBlackList>
			<EnableXMLFile>false</EnableXMLFile>
			<Properties>
			</Properties>
		</RESTInterface>
		<CommandInterface>
			<HostPort>
				<ProcessorCount>${com.wowza.wms.TuningAuto}</ProcessorCount>
				<IpAddress>*</IpAddress>
				<Port>8083</Port>
			</HostPort>
		</CommandInterface>
		<AdminInterface>
			<!-- Objects exposed through JMX interface: Server, VHost, VHostItem, Application, ApplicationInstance, MediaCaster, Module, Client, MediaStream, SharedObject, Acceptor, IdleWorker -->
			<ObjectList>Server,VHost,VHostItem,Application,ApplicationInstance,MediaCaster,Module,IdleWorker</ObjectList>
		</AdminInterface>
		<Stats>
			<Enable>true</Enable>
			<Properties>
				<Property>
					<Name>statsManagerDebugEnable</Name>
					<Value>false</Value>
					<Type>Boolean</Type>
				</Property>
				<Property>
					<Name>statsDatabaseManagerDebugEnable</Name>
					<Value>false</Value>
					<Type>Boolean</Type>
				</Property>
			</Properties>
		</Stats>
		<!-- JMXUrl: service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi -->
		<JMXRemoteConfiguration>
			<Enable>false</Enable>
			<IpAddress>localhost</IpAddress>
			<!-- set to localhost or internal ip address if behind NAT -->
			<RMIServerHostName>localhost</RMIServerHostName>
			<!-- set to external ip address or domain name if behind NAT -->
			<RMIConnectionPort>8084</RMIConnectionPort>
			<RMIRegistryPort>8085</RMIRegistryPort>
			<Authenticate>true</Authenticate>
			<PasswordFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.password</PasswordFile>
			<AccessFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.access</AccessFile>
			<SSLSecure>false</SSLSecure>
		</JMXRemoteConfiguration>
		<UserAgents>Shockwave Flash|CFNetwork|MacNetwork/1.0 (Macintosh)</UserAgents>
		<Streams>
			<DefaultStreamPrefix>mp4</DefaultStreamPrefix>
		</Streams>
		<ServerListeners>
			<ServerListener>
				<BaseClass>com.wowza.wms.mediacache.impl.MediaCacheServerListener</BaseClass>
			</ServerListener>
			<ServerListener>
				<BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerListener</BaseClass>
			</ServerListener>
			<ServerListener>
	            <BaseClass>com.wowza.wms.plugin.loadbalancer.general.LoadBalancerServer</BaseClass>
            </ServerListener>
		</ServerListeners>
		<!-- Properties defined here will be added to the IServer.getProperties() collection -->
				
		<VHostListeners>
			<!--
			<VHostListener>
				<BaseClass></BaseClass>
			</VHostListener>
			-->
		</VHostListeners>
		<HandlerThreadPool>
			<PoolSize>${com.wowza.wms.TuningAuto}</PoolSize>
		</HandlerThreadPool>
		<TransportThreadPool>
			<PoolSize>${com.wowza.wms.TuningAuto}</PoolSize>
		</TransportThreadPool>
		<RTP>
			<DatagramStartingPort>6970</DatagramStartingPort>
			<DatagramPortSharing>true</DatagramPortSharing>
		</RTP>
		<Manager>
			<!-- Properties defined are used by the Manager -->
			<Properties>
			</Properties>
		</Manager>
		<!-- Properties defined here will be added to the IServer.getProperties() collection -->
		        <Properties>
						<Property>
								<Name>loadbalanceServerPort</Name>
								<Value>1935</Value>
						</Property>
						<Property>
								<Name>loadbalanceBandwidthLimit</Name>
								<Value>5000</Value>
						</Property>
						<Property>
								<Name>loadbalanceConnectionLimit</Name>
								<Value>50</Value>
						</Property>
						<Property>
								<Name>loadbalanceDebugEnabled</Name>
								<Value>Off</Value>
						</Property>
						<Property>
								<Name>loadbalanceType</Name>
								<Value>Client</Value>
						</Property>
						<Property>
								<Name>loadbalanceKey</Name>
								<Value>123456789012345</Value>
						</Property>
						<Property>
								<Name>loadbalanceIgnoreClients</Name>
								<Value>FMLE</Value>
						</Property>
						<Property>
								<Name>loadbalanceCountryEnable</Name>
								<Value>On</Value>
						</Property>
						<Property>
								<Name>loadbalanceBandwidthEnable</Name>
								<Value>On</Value>
						</Property>
						<Property>
								<Name>loadbalanceConnectionEnable</Name>
								<Value>On</Value>
						</Property>
						<Property>
								<Name>loadbalanceServerIP</Name>
								<Value>192.168.10.10</Value>
						</Property>				
		        </Properties>
	</Server>
</Root>

now, at 192.168.10.10:1935/loadbalancerInfo I have two pc in the list :

192.168.10.10:1935 - Load Balancer

192.168.10.31:1935 - load-balancing Server

both appear as OK

at 192.168.10.10:1935/redirect I get 192.168.10.31:1935

I have created an application on Load Balancer called ‘balancer’ .

so, if try to open http://192.168.10.10:1935/redirect/balancer/test?scheme=m3u8 have no stream

same if try in rtmp or rtsp, no stream .

my questions :

  • why in the Load Balancer my application appear OK (in the connectioncounts also) and I’m not able to see my stream ?

  • the Load Balancer server is empty, why if type 192.168.10.10:1935/loadbalancerInfo I get 192.168.10.31:1935 ? and not Load Balancer IP ?

thanks

steve

Hi Zoran,

I have updated the module but without success, I think need also this night for solve problem…

seems loadbalancer is installed correctly, but not working,

so, if call :

rtmp://192.168.10.10:1935/loadbalancer/balancerorigin/test

where : loadbalancer* is the filter used in the VHost.xml LoadBalancerPublicInterface HTTPProvider and balancerorigin is my live application, I get :

Application folder ([install-location]/applications/loadbalancer) is missing

recognize loadbalancer as application and not loadbalance function.

I have try using VLC and Flowplayer .

so, I ahev installed also module ModuleLoadBalancerEdgeLimitConnections and I get always error :

ModuleLoadBalancerEdgeLimitConnections.addConnection Error: Load Balancer Sender is not installed

and I don’t know why, I have check installation many many time but without result…

also, after module update, now when hit 192.168.10.10:1935/loadbalancer I get always :

Invalid Content Requested

any idea ?

thanks

steve

yes, I have open ticket,

thanks

steve

Hi,

This is an issue we have recently discovered and it should already be fixed in the latest Load Balance package available for download in the “How to get Dynamic Load Balancing AddOn” forum article.

Please download the Load Balance package available in the link I mentioned earlier, extract the “wms-plugin-loadbalancer.jar” from the lib/ folder and replace the [wowza-install-dir]/lib/wms-plugin-loadbalancer.jar file with this new one. Restart your Wowza server so that the new .jar file is taken into account and the Load Balancer should work properly.

With this new version, the HTTP based redirection should work.

Regarding the RTMP and RTSP redirection, there are two things to consider:

  • use a player that supports RTSP and RTMP redirect (you can use VLC to test)

  • you will need to have the redirect application created that has the redirect module added.

Let’s assume that your redirection application from the Load Balancer (192.168.10.10) is called “myredirect” and has the “Redirect” module enabled, then the RTSP and RTMP redirect playback URL should look like this:

rtmp://192.168.10.10:1935/myredirect/vod/sample.mp4
rtsp://192.168.10.10:1935/myredirect/vod/sample.mp4

While the Apple HLS loadbalancer playback URL would look like this:

http://192.168.10.10:1935/redirect/vod/sample.mp4?scheme=m3u8

Please notice that for the HTTP based redirects, I am using http://192.168.10.10:1935/redirect/ since “redirect*” is the filter used in the VHost.xml LoadBalancerPublicInterface HTTPProvider.

Zoran

Steve,

This is all in the User’s Guide. You must specify properties in the Server.xml file on the Load Balancer and all Servers to configure the desired load-balancing functionality. Open the Server.xml file in a text editor and add the desired properties to the section at the end of the file. All of the properties are listed in the Guide.

In this case, you could use this property with the example application you created on the client. As an example, I included 3 applications to load balance. You could just allow 1.

<!--
(Optional) A comma-separated list of
applications to include in bandwidth and
connection load-balancing calculations. Leaving
this value blank includes all applications on the
Server automatically. Any applications specified
in loadbalanceApplicationsExclude override
this setting.
Deployed on [loadbalanceType]: Client
-->
<Property>
<Name>loadbalanceApplicationsInclude</Name>
<Value>balancer,live,vod</Value>
<Type>String</Type>
</Property>

I hope this helps.

Regards,

Mac

Steve,

If you do not specify, it will load balance all applications by default. You do not edit the Application.xml for this task. Most of the properties in the guide are optional and to be used based on your desired workflow for the streams to be load balanced.

Regards,

Mac

Hello, I urgently need a complete tutorial on how to configure 2 servers LoadBalancing