Forum Discussion

Fabian_Arroyo_M's avatar
Fabian_Arroyo_M
Icon for Nimbostratus rankNimbostratus
Sep 09, 2015

Message-based load balancing

Hi, I have an application targeting a VS, when the application opens an HTTP 1.1 connection to the VS, this connection is made up of N XML requests, then these N requests are sent to a single pool member. There is a way to balance these requests to all nodes, not just the first node that the connection is opened to be sent?

 

I researched and read that maybe possible with Message-based load balancing,someone has had a similar scenario?

 

Regards

 

1 Reply

  • I find this iRule and help, it works perfectly, the traffic is balanced as I hope, but I'm beginning to have failover events. This message appears in the CLI "Re-starting tmm and Re-starting tmm1"

    This iRule will cause this events?

    when CLIENT_ACCEPTED {

    set client_closed 0

    TCP::collect

    }

    when CLIENT_CLOSED {

    set client_closed 1

    }

    when SERVER_CONNECTED {

    after 1000 -periodic if {$client_closed} {TCP::close}

    }

    when CLIENT_DATA {

    binary scan [TCP::payload] II head rlen

    if {($head & 0x3) == 1} {

    if {[TCP::payload length] < [expr {8 + $rlen}]} {
    
        TCP::collect [expr {$rlen + 8 - [TCP::payload length]}]
    
        return
    
    }
    

    }

    pool my_pool

    TCP::release [expr {$rlen + 8}]

    TCP::notify request

    TCP::collect

    }