Settings file loadbalancing.xml¶
Warning
This function is obsoleted and is not supported now! Please use HAProxy, AWS LB or another load balancing tools
This settings file is used if the load balancer is enabled by the load_balancing_enabled=true
parameter in the flashphoner.properties
file. See details here
Example 1. Configuring the load balancer:
<loadbalancer mode="FEWESTCALLS" randomize="false">
<node id="1">
<ip>192.168.1.11</ip>
</node>
<node id="2">
<ip>192.168.1.12</ip>
</node>
</loadbalancer>
Example 2: Configuring static CDN for rebroadcasting of a stream:
<loadbalancer mode="roundrobin" stream_distribution="webrtc">
<node id="1">
<ip>edge1.mydomain.com</ip>
<wss>443</wss>
</node>
<node id="2">
<ip>edge2.mydomain.com</ip>
<wss>443</wss>
</node>
</loadbalancer>
Parameters description:
Element | Default value | Description |
---|---|---|
mode | `FEWESTCALLS` | `FEWESTCALLS` - select the server with the least active calls. `RANDOM` - select the server at random. `ROUNDROBIN` - select servers consequentially one by one (used in case of [static CDN](../../Streaming_video_CDN_functions/CDN_1.0.en.md)). `LESS_LOADED_NODE` - select the server with minimum CPU load. |
randomize | `false` | If both servers do not have active calls and mode is set to `FEWESTCALLS`, the balancer will select the server at random if this parameter is set to `true`. |
stream_distribution | `webrtc` | Technology to use to rebroadcast the stream in case of [static CDN](../../Streaming_video_CDN_functions/CDN_1.0.en.md) |
node id | WCS server numeric identifier | |
ip | IP address or FQDN of the WCS server that responds via HTTP and provides information about load and calls. | |
wss | Port for data exchange via Secure Websocket |