Forum Discussion
Balancing SMPP traffic based on recipient address
Dear Kazeem,
Honestly, I totally forgot the SMPP spec as my last encounter with SMPP is on 2013. So, I can't help much further about the system ID.
I am more interested in the architecture. I am not sure why there are multiple firewalls with F5 in between. Anyhow, I believe the iRule should be placed in the 3rd VIP instead of the 1st. It should be plain TCP LB in 1st VIP and 2nd VIP. The 3rd VIP should be the one talking SMPP to the SMPP server and doing the MBLB.
Cheers,
-joko
- kazeem_yusuf1Feb 28, 2018Nimbostratus
Thank you Joko, however, i don't understand what you mean by TCP LOAD BALANCING.
Can you please explain or give example of TCP load balancing to a pool of servers
- Joko_Yuliantor3Mar 01, 2018Historic F5 Account
TCP load balancing means that F5 conduct load-balancing per TCP connection. Once the TCP connection is established to the server-side, the packet from the client will always use that connection to F5 and landed in the same server all the time until the connection is closed. An example would be a VS with standard type and TCP protocol selected, that is TCP LB. It works well for HTTP because short-lived but it does not work well with long-lived connection such as SMPP or DIAMETER. That is the reason on message-based load balancing (MBLB).
- kazeem_yusuf1Mar 03, 2018Nimbostratus
Hello Joko, Your suggestion on TCP load balancing worked!!!!!!!!!!!
I however added mblb profile on cli to the two initial F5 VIP'S. I have noticed something however, the smpp submit_sm works for so long, then after sometime, stops working.
If i however bypass, the 3rd F5 VIP (which has SMSC as pool member) and send submit_sm directly to SMSC, i don't get a timeout.
What do you think could be responsible?.
This is the irule on the 3rd VIP.
when CLIENT_ACCEPTED { set s_seq_idx 1 set first_bind_resp 1 set sms_m1 10.206.140.172%5 set sms_m2 10.206.140.173%5 TCP::collect } when CLIENT_DATA { while { [TCP::payload length] >= 16 } { binary scan [TCP::payload] IH8IIa* len oper status seq p if { [TCP::payload length] < $len } { TCP::collect $len return } switch -glob $oper { 00000002 - 00000009 { set bind_message [TCP::payload $len] } 00000004 { submit_sm set p [string range $p [expr [string first \x00 $p]+1] end] binary scan $p cca* ston snpi p set p [string range $p [expr [string first \x00 $p]+1] end] binary scan $p ccA* dton dnpi p set dest [getfield $p \x00 1] if { $dest starts_with 420 } { use pool or node command pool [LB::server pool] member $sms_m2 10000 } else { pool [LB::server pool] member $sms_m1 10000 } } 8* { rewrite seq if { [info exists s_seq_map($seq)] } { set old_seq [lindex $s_seq_map($seq) 0] TCP::payload replace 12 4 [binary format I $old_seq] set addr [lindex $s_seq_map($seq) 1] set port [lindex $s_seq_map($seq) 2] use pool or node command pool [LB::server pool] member $addr $port unset s_seq_map($seq) } } } TCP::release $len TCP::notify request } TCP::collect } when SERVER_CONNECTED { if { $first_bind_resp } { TCP::collect } else { TCP::collect -all TCP::respond $bind_message } } when SERVER_DATA { while { [TCP::payload length] >= 16 } { binary scan [TCP::payload] IH8II len oper status seq if { [TCP::payload length] < $len } { TCP::collect $len return } switch -glob $oper { 0* { rewrite seq TCP::payload replace 12 4 [binary format I $s_seq_idx] set s_seq_map($s_seq_idx) "$seq [IP::remote_addr] [TCP::remote_port]" incr s_seq_idx } 80000002 { bind response if { $first_bind_resp } { set first_bind_resp 0 } else { TCP::payload replace 0 [TCP::payload length] "" set len 0 } } } TCP::release $len TCP::notify response } TCP::collect }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com