Using Weight and Priority
Some entities in BVR use weight and priority values to determine which of a set of possible resources should be used, as follows:
Currently the entities in BVR using weight and priority are Call Features and SIP Proxies. The following examples use proxies but the behaviour is also applicable to Call Features.
Examples
Proxy name | Weight | Priority | Status |
---|---|---|---|
Proxy1 | 50 | 10 | UP |
Proxy2 | 20 | 10 | UP |
Proxy3 | 30 | 10 | UP |
Proxy4 | 1000 | 20 | UP |
In this example, Proxy1 has a 50% chance of being picked, Proxy2 has a 20% chance of being picked and Proxy3 has a 30% chance of being picked.
Now assume the status changes and Proxy1 goes down. The status is now:
Proxy name | Weight | Priority | Status |
---|---|---|---|
Proxy1 | 50 | 10 | DOWN |
Proxy2 | 20 | 10 | UP |
Proxy3 | 30 | 10 | UP |
Proxy4 | 1000 | 20 | UP |
In this example, Proxy2 has a 40% chance of being picked and Proxy3 has a 60% chance. This is because Proxy1, which had a weight of 50, is no longer UP. Therefore the total weight of the proxies at priority 1 is 50, so the chance of Proxy2 being picked is 20/50 (40%) and for Proxy3 is 30/50 (60%).
Proxy name | Weight | Priority | Status |
---|---|---|---|
Proxy1 | 50 | 10 | DOWN |
Proxy2 | 20 | 10 | UP |
Proxy3 | 30 | 10 | DOWN |
Proxy4 | 1000 | 20 | UP |
In this example, Proxy2 will ALWAYS be picked. This is because Proxy1, Proxy2 and Proxy3 are all in the most preferred priority group, but Proxy1 and Proxy3 are down so will not be used.
Now, Proxy2 also goes down
Proxy name | Weight | Priority | Status |
---|---|---|---|
Proxy1 | 50 | 10 | DOWN |
Proxy2 | 20 | 10 | DOWN |
Proxy3 | 30 | 10 | DOWN |
Proxy4 | 1000 | 20 | UP |
In this example, Proxy4 will always be used.