The internal kannel loadbalancing didn't work out as I had expected it to... I 
found that when I had multiple modems online, and my queue grew too big, then I 
would start to reject messages instead of routing to my "failover" smpp 
connection. 

Apparently I ran into the problem of modems being online (according to kannel) 
but unable to send messages (I had pulled out the SIM cards) and therefore 
Kannel just queued outgoing messages and when I hit the queue limit, then 
Kannel would respond with 502 Foo instead of routing to another SMSC :-(

Instead I solved it by having two Kannel instances, one with all my Modems and 
one with my SMPP connections. I routed all traffic through our loadbalancer 
(Riverbed Stingrays) and therefore I could build a trafficscript that would 
first try to send via the Kannels with modems, and if this instance replied 
with a 2xx code, then returned OK to sender. If it failed with a non-2xx code, 
then I send via the kannel SMPP and if this was OK, returned this to sender 
(and a non-OK returncode if kannel SMPP also failed).

This is giving me the advantages:
 * Easy to make a permanent failover to smpp if network provider is having 
problems
 * Easy to scale with other kannel servers if needed

Regards
Thomas


On 29/06/2013, at 14.57, Rene Kluwen <[email protected]> wrote:

> Also you can use the internal Kannel loadbalancing by giving the smsc’s the 
> same smsc-id and put your modem as the first smsc.
>  
> From: users [mailto:[email protected]] On Behalf Of spameden
> Sent: donderdag 20 juni 2013 11:25
> To: Thomas Rasmussen
> Cc: [email protected]
> Subject: Re: Routing SMS' based on queue length on smsc
>  
> You can do this on the application level, parsing /status page or status.xml 
> to get what's up with the queue and load-balance in your app.
>  
> 
> 2013/6/20 Thomas Rasmussen <[email protected]>
> Hello
> 
> I'm in the process of configuring a kannel setup and have run into a little 
> problem that I have not been able to solve by looking in the documentation, 
> so I hope that there are somebody out there that can help me.
> 
> The setup is a pretty simple kannel setup. I have one modem attached as SMSC 
> and I can send messages out via sendsms.  I also have a SMPP connection to 
> another provider that I have configured and this is also working fine. So the 
> basic setup is OK as far as I can see.
> 
> My problem is that I want to be able to route messages via my modem (or 
> modems) as long as these do not have a long queue of messages waiting to be 
> delivered. If there are ie. 10 messages in the queue, then I want to route 
> messages via the SMPP connection, and when the queue has dropped, then revert 
> back to the modem.
> 
> The reason for this is that the per-sms fee is about 5 times more expensive 
> on the SMPP than on the modems. So as long as the modems kan keep up, then I 
> want to use them.
> 
> I have succeeded in setting up kannel so SMPP will be used if the Modem fails 
> (using the guidelines documented here: http://goo.gl/VQXlh but this only 
> works when the modem smsc is failing, but I cannot seem to find a setting 
> that will "fail" a SMSC if there are ie. 10 messages in queue.
> 
> Is this infact possible by using Kannel, if so, how may I proceed?
> 
> My kannel setup is version 1.5.0 on standard Ubuntu 10.04 LTS.
> 
> Regards
> Thomas Rasmussen

Reply via email to