Forum Discussion

meja_127775's avatar
meja_127775
Icon for Nimbostratus rankNimbostratus
Jan 27, 2006

CLIENT_DATA event not triggered on subsequent client requests

I'd like to make an lb decision on each client request

 

within a persistent TCP connection. The behaviour I'm

 

trying to emulate is HTTP profile + OneConnect but at

 

the TCP layer.

 

 

The client_data event appears to only be triggered on the

 

initial client request with all subsequent client requests

 

sent to the pool selected in the initial request.

 

 

This is the latest incarnation of the rule I'm using. I've

 

tried including "LB::detach" before and after the pool

 

statements. Tcpdumps show the connection between Big-IP

 

and the server closing but next client request gets sent

 

to the same server.

 

 

 

when CLIENT_ACCEPTED {

 

log local0. "client accepted"

 

client request only 77 bytes

 

TCP::collect 77

 

}

 

 

when CLIENT_DATA {

 

log local0. "client data"

 

if { [TCP::payload 77] contains "abcde" }{

 

pool delme-udp-I

 

} else {

 

pool delme-udp-II

 

}

 

}

 

when SERVER_CONNECTED {

 

TCP::collect

 

log local0. "server connected"

 

}

 

when SERVER_DATA {

 

log local0. "server data invoked"

 

TCP::release

 

LB::detach

 

}

 

 

Thoughts and suggestions greatly welcomed
  • bl0ndie_127134's avatar
    bl0ndie_127134
    Historic F5 Account
    There is an implicit release after every CLIENT_DATA and SERVER_DATA events. You need to set TCP back to collect mode after the release.

    
    when CLIENT_DATA {
       log local0. "client data"
       if { [TCP::payload 77] contains "abcde" }{
          pool delme-udp-I
       } else {
          pool delme-udp-II
       }
       TCP::release
        Go back to collect mode
       TCP::collect 77
    }

  • Hi all,

     

     

    I have used your iRules. I see that when client sends request first time, it works well. When client sent again, server can receive request and send it to BigIP, but BigIP didn't send it to client. Could anyone help me? Thanks very much.