Optimal trunk capacity filling algorithm
Hi All, I'm looking for a solution to a problem that is not FreeSWITCH specific, but for sure some of you have dealt with this, and maybe someone can suggest optimal solution, so I could not re-invent the wheel It's all about proper filling of available termination trunk capacity, but not the trivial one with simple LCR Let's say we have two trunks: - Trunk 1 - capacity 100 channels, termination cost 1 cent - Trunk 2 - capacity 200 channels, termination cost 3 cent And we have clients sending wholesale traffic with random number of channels: - Client 1 - sell rate 2 cent - Client 2 - sell rate 4 cent As you see we call only sell to client 1 with profit using trunk 1. If we use LCR and client 2 has more traffic, than it will fill trunk 1 capacity and client 2 will hit trunk 2 and we will start to loose Sticking client 1 to trunk 1 and client 2 to trunk 2 is also not optimal. Number of channels is more or less random. If we stick client 2 to trunk 2 when client 1 is not using all 100 channels, than we loose additional 1 cent of margin I think about some form of capacity-aware dynamic routing - send client 2 traffic to trunk 1 only if client 1 cannot fill trunk 1, maybe using some capacity averages from last X minutes. Any suggestions how to approach this problem? Kind Regards
Neet to implement limits for client2 on trunk1. If on trunk1 is active 80 calls, then route to trunk2 пн, 30 окт. 2017 г., 18:57 Adam Raszynski <netcentrica@gmail.com>:
Hi All,
I'm looking for a solution to a problem that is not FreeSWITCH specific, but for sure some of you have dealt with this, and maybe someone can suggest optimal solution, so I could not re-invent the wheel
It's all about proper filling of available termination trunk capacity, but not the trivial one with simple LCR
Let's say we have two trunks: - Trunk 1 - capacity 100 channels, termination cost 1 cent - Trunk 2 - capacity 200 channels, termination cost 3 cent
And we have clients sending wholesale traffic with random number of channels: - Client 1 - sell rate 2 cent - Client 2 - sell rate 4 cent
As you see we call only sell to client 1 with profit using trunk 1. If we use LCR and client 2 has more traffic, than it will fill trunk 1 capacity and client 2 will hit trunk 2 and we will start to loose
Sticking client 1 to trunk 1 and client 2 to trunk 2 is also not optimal. Number of channels is more or less random. If we stick client 2 to trunk 2 when client 1 is not using all 100 channels, than we loose additional 1 cent of margin
I think about some form of capacity-aware dynamic routing - send client 2 traffic to trunk 1 only if client 1 cannot fill trunk 1, maybe using some capacity averages from last X minutes.
Any suggestions how to approach this problem?
Kind Regards _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
Adam Raszynski
-
Sergey Safarov