5. Load Balancing
You can change the routing destinations by using some unique value, for example, by time or by session ID. For example, you can reduce the load of a gateway by allocating the calls to multiple VoIP gateways.
Ex 1. Load Balancing by switching 3 destinations every second
Matching Patterns | Deploy Patterns |
$request = ^INVITE $time = [0369]$ |
$target = server1 |
$request = ^INVITE $time = [147]$ |
$target = server2 |
$request = ^INVITE |
$target = server3 |
Ex 2. Load Balancing by switching 2 destinations every 30 minutes
Matching Patterns | Deploy Patterns |
$request = ^INVITE $time = ^..:[0-2] |
$target = server1 |
$request = ^INVITE |
$target = server2 |
Ex 3. Load Balancing based on whether the Session ID is odd or even
Matching Patterns | Deploy Patterns |
$request = ^INVITE $sid = [13579]$ |
$target = server1 |
$request = ^INVITE |
$target = server2 |