Hello, I am modifying my LCR setup and just wanted to get some confirmation that I am following best practices. I am a
I am loading up 18,500 routes into the table which all belong to a single group. There will be a single route in a second group which all non-matches will fail over to.
That being said, this is what my configuration looks like:
modparam("lcr","lcr_hash_size", 20000) modparam("lcr","fetch_rows", 5000)
This server has 8G of RAM and I am currently using 4M of private memory (#define PKG_MEM_POOL_SIZE 4*1024*1024 ).
Thanks, Geoff
A couple of other questions regarding LCR. Hopefully they are all simple. I read the overview and exported method docs and didn't find 100% definitive answers to any of this:
1 - If I have 2 gateways with the same group id and the same weight, will the LCR module route in a round-robin fashion between them, or will each request try one of them first and then use the other as a failover. (i believe it's round-robin, but i could be wrong)
2 - If I have 2 gateways that have a longer length match, and one that has a default match i.e
prefix group_id 1555555 1 1 2
gateway_name group_id carrier1-A 1 carrier1-B 1 carrier2 2
Would the following scenario hold true if I tried to dial 15555551212?
--> next_gw() from REQUEST_ROUTE --> route to carrier1-A --> carrier1-A returns a 503 --> next_gw() from FAILURE_ROUTE --> route to carrier1-B --> carrier1-B returns a 503 --> next_gw() from FAILURE_ROUTE --> route to carrier2 --> 200 OK
Thanks! Geoff
On Fri, Apr 3, 2009 at 9:45 AM, geoffreymina@gmail.com wrote:
Hello, I am modifying my LCR setup and just wanted to get some confirmation that I am following best practices. I am a
I am loading up 18,500 routes into the table which all belong to a single group. There will be a single route in a second group which all non-matches will fail over to.
That being said, this is what my configuration looks like:
modparam("lcr","lcr_hash_size", 20000) modparam("lcr","fetch_rows", 5000)
This server has 8G of RAM and I am currently using 4M of private memory (#define PKG_MEM_POOL_SIZE 4*1024*1024 ).
Thanks, Geoff
Geoffrey Mina writes:
1 - If I have 2 gateways with the same group id and the same weight, will the LCR module route in a round-robin fashion between them, or will each request try one of them first and then use the other as a failover. (i believe it's round-robin, but i could be wrong)
they are chosen randomly, not round robin.
2 - If I have 2 gateways that have a longer length match, and one that has a default match i.e
prefix group_id 1555555 1 1 2
gateway_name group_id carrier1-A 1 carrier1-B 1 carrier2 2
Would the following scenario hold true if I tried to dial 15555551212?
--> next_gw() from REQUEST_ROUTE --> route to carrier1-A --> carrier1-A returns a 503 --> next_gw() from FAILURE_ROUTE --> route to carrier1-B --> carrier1-B returns a 503 --> next_gw() from FAILURE_ROUTE --> route to carrier2 --> 200 OK
yes, that is what would happen or if carrier1-A and carrier1-B have same weight, then either one of them would be the first to try.
-- juha
Juha, Thanks for the information. Much appreciated! Seeing as you are the author of this module, what do you think the level of effort would be to implement global round-robin functionality for gateways with the same weight in the same group? Is there maybe a different module I should be looking into for the more advanced routing functionality?
Perhaps carrierroute would be more flexible?
thanks! Geoff
On Sat, Apr 4, 2009 at 4:00 AM, Juha Heinanen jh@tutpro.com wrote:
Geoffrey Mina writes:
> 1 - If I have 2 gateways with the same group id and the same weight, > will the LCR module route in a round-robin fashion between them, or > will each request try one of them first and then use the other as a > failover. (i believe it's round-robin, but i could be wrong)
they are chosen randomly, not round robin.
> 2 - If I have 2 gateways that have a longer length match, and one that > has a default match i.e > > prefix group_id > 1555555 1 > 1 2 > > gateway_name group_id > carrier1-A 1 > carrier1-B 1 > carrier2 2 > > Would the following scenario hold true if I tried to dial 15555551212? > > --> next_gw() from REQUEST_ROUTE > --> route to carrier1-A > --> carrier1-A returns a 503 > --> next_gw() from FAILURE_ROUTE > --> route to carrier1-B > --> carrier1-B returns a 503 > --> next_gw() from FAILURE_ROUTE > --> route to carrier2 > --> 200 OK
yes, that is what would happen or if carrier1-A and carrier1-B have same weight, then either one of them would be the first to try.
-- juha
Geoffrey Mina writes:
Thanks for the information. Much appreciated! Seeing as you are the author of this module, what do you think the level of effort would be to implement global round-robin functionality for gateways with the same weight in the same group?
then the module would need to remember, which gw was used during processing of previous request, i.e., per group state would need to be kept from one request to the next. there would be ways to do so, e.g., using htable module, but effort would not be trivial.
should be looking into for the more advanced routing functionality?
Perhaps carrierroute would be more flexible?
i have no experience with carrierroute, but perhaps it could support what you want.
-- juha
On Saturday 04 April 2009, Geoffrey Mina wrote:
Thanks for the information. Much appreciated! Seeing as you are the author of this module, what do you think the level of effort would be to implement global round-robin functionality for gateways with the same weight in the same group? Is there maybe a different module I should be looking into for the more advanced routing functionality?
Perhaps carrierroute would be more flexible?
Hi Geoffrey,
yes, you can have more control with cr. Its possible to specify nearly arbitrary failover logic with help of the failure_route table. But this comes with a price, its not that convinient then to use the lcr module, though. Take a look at the example 1.22 in the cr documentation to get an idea.
Cheers,
Henning
geoffreymina@gmail.com writes:
I am loading up 18,500 routes into the table which all belong to a single group. There will be a single route in a second group which all non-matches will fail over to.
That being said, this is what my configuration looks like:
modparam("lcr","lcr_hash_size", 20000) modparam("lcr","fetch_rows", 5000)
looks ok to me.
-- juha