Server-side load balancing is usually done using a load balancer running in
front of the RTMP or HTTP streaming servers. In this example the plugin first
connects this server-side load balancer. If this connection fails the plugin
switches to client side load balancing.
We have three hosts on our cluster configured in our hosts property. The
first host is our server side load balancer. It's an imaginary host and will
never answer in reality. In normal situations it would serve video files when
it's up and running. When this host fails the onConnectFailed event is
called and we will dynamically switch to client side load balancing by using
setLoadBalancing(true) method. The plugin remembers the failing host and
will not use that after the first failed connection attempt.