Wowza Load Balancer AddOn 4.0
Posted By : Dinesh Dhiman | 21-Sep-2015
Wowza Load Balancer needs min 2 instances of WowzaStreamingEngine. This Document is for configuration of load balancer and test weather load is balanced or not .
Configuring the Load Balancer(SERVER)
- Install Wowza Streaming Engine-4.2.0 on Minimum 2 or More Machine.
- Download LoadBalancer_4.0 from this link :- http://www.wowza.com/forums/content.php?108#loadbalancing4
- Unzip the downloaded file go to lib folder and copy the wms-plugin-loadbalancer.jar file and paste into [install-dir]/WowzaStreamingEngine-4.2.0/lib (in ubuntu).
- Open the [install-dir]/conf/Server.xml (usr/local/Wowza Streaming Engine-4.2.0/conf/Server.xml) file in a text editor and add the following server listener to the <ServerListeners> section in the file:- <ServerListener><BaseClass>com.wowza.wms.plugin.loadbalancer.general.LoadBalancerServer</BaseClass></ServerListener>
- Then add some properties in same server.xml add the following properties to the <Properties> section at the bottom of the file:-
- <!-- Properties defined here will be added to the IServer.getProperties() collection -->
- <Property>
- <Name>loadbalanceType</Name>
- <Value>Server,Client</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceKey</Name>
- <Value>123456789012345</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceServerIP</Name>
- <Value>[Load Balancer IP address]</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceServerPort</Name>
- <Value>1935</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceDecisionOrder</Name>
- <Value>Connection</Value>
- <!-- you can also handle load on bases of Bandwidth as well as connection <Value>Bandwidth, Connection</Value> -->
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceIgnoreClients</Name>
- <Value>FMLE</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceBandwidthEnable</Name>
- <Value>Off</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceBandwidthLimit</Name>
- <Value>5000</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceConnectionEnable</Name>
- <Value>On</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceConnectionLimit</Name>
- <Value>2</Value>
- <Type>String</Type>
- </Property>
- Open the [install-dir]/conf/VHost.xml (usr/local/WowzaStreamingEngine-4.2.0/conf/VHost.xml) file in a text editor and add the following HTTP Providers to the <HTTPProviders> section for the Default Streaming host port (Be sure that they're the first entries in the <HTTPProviders> section. :-
- <HTTPProvider>
- <BaseClass>com.wowza.wms.plugin.loadbalancer.http.LoadBalancerPublicInterface </BaseClass>
- <RequestFilters>redirect*</RequestFilters>
- <AuthenticationMethod>none</AuthenticationMethod>
- </HTTPProvider>
- <HTTPProvider>
- <BaseClass>com.wowza.wms.plugin.loadbalancer.http.LoadBalancerInterface
- </BaseClass>
- <RequestFilters>*loadbalancerInterface</RequestFilters>
- <AuthenticationMethod>none</AuthenticationMethod>
- </HTTPProvider>
- <HTTPProvider>
- <BaseClass>com.wowza.wms.plugin.loadbalancer.http.LoadBalancerInformation
- </BaseClass></HTTPProvider>
- <RequestFilters>*loadbalancerInfo</RequestFilters>
- <AuthenticationMethod>admin-digest</AuthenticationMethod>
- </HTTPProvider>
- Add new Application with name redirect (VOD type or LIVE type).
- Open the [install-dir]/conf/redirect/Application.xml (usr/local/WowzaStreamingEngine-4.2.0/redirect/Application.xml) and add this module:-
- <Module>
- <Name>Redirect</Name>
- <Description>Redirect</Description>
- <Class>com.wowza.wms.plugin.loadbalancer.redirect.ClientConnections</Class>
- </Module>
- NOTE:- This is for RTMP and RTSP. Be sure to add it "after" the last <Module> that's included in the <Modules> section in Application.xml.
- Restart the Wowza Streaming Engine.
Configuring the Loadbalancing Servers(EDGE)
- Copy the wms-plugin-loadbalancer.jar file and paste into [install-dir]/WowzaStreamingEngine-4.2.0/lib (in ubuntu).
- Open the [install-dir]/conf/Server.xml (usr/local/WowzaStreamingEngine-4.2.0/conf/Server.xml) file in a text editor and add the following server listener to the <ServerListeners> section in the file:- <ServerListener> <BaseClass>com.wowza.wms.plugin.loadbalancer.general.LoadBalancerServer</BaseClass> </ServerListener>
- Then add some properties in same server.xml add the following properties to the <Properties> section at the bottom of the file:- <!--Properties defined here will be added to the IServer.getProperties() collection-->
- <Property>
- <Name>loadbalanceType</Name>
- <Value>Client</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceKey</Name>
- <Value>123456789012345</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceServerIP</Name>
- <Value>[Load Balancer IP Address ]</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceServerPort</Name>
- <Value>1935</Value>
- <Type>String</Type>
- </Property>
- <Property>
- <Name>loadbalanceConnectionEnable</Name>
- <Value>On</Value>
- <Type>String</Type>
- </Property>??
- <Property>
- <Name>loadbalanceConnectionLimit</Name>
- <Value>2</Value>
- <Type>String</Type>
- </Property>
- Restart the Wowza Streaming Engine.
Test Load Balancer configuration???
-
Now check weather Load Balancer Configure Correct or not for that just hit
-
http://[Load Balancer IP Address]:1935/loadbalancerInfo this url (in Browser) after that you show like that : (NOTE:- For more Configuration Wowza Dynamic Load Balancing AddOn User's Guide (WowzaDynamicLoadBalancingAddOn_UsersGuide.pdf) which was present in for download)
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Dinesh Dhiman
Dinesh is good in java and grails with having extra knowledge in AngularJS , HTML ,SQL , Selenium