Forum Discussion

David_Bradley_2's avatar
David_Bradley_2
Icon for Nimbostratus rankNimbostratus
Mar 05, 2007

Health Monitor embedded within iRule

I'm trying to develop an iRule load balances incoming FIX logins across a pool of nodes. When a particular node becomes "too busy", it returns the word "FULL" in response to the FIX login request. I have a health monitor written that deals with removing full nodes from the pool. This works great. However, it only runs at periodic intervals. When the market opens, there is typically a huge influx of connection requests all at once. I imagine that there is a large window of opportunity for a pool member to become "full" before the health monitor ever detects it and removes it from the pool. Therefore i'd like to put an additional check directly into my iRule. My questions are:

 

 

Q) How do I probe the first packet back from the selected pool member to see if it contains the word "full"?

 

Q) Assuming I can do this, if there is no word "full" in the packet, how do I just get out of the way and let the session establish?

 

 

 

Thanks. Sorry for the long-winded post.

 

 

Dave

1 Reply

  • I wish I could do:

     

     

    when SERVER_CONNECTED {

     

    TCP::collect 4

     

    }

     

    when SERVER_DATA {

     

    set payload [TCP::payload]

     

    log local0. "SERVER_DATA: TCP payload = $payload"

     

    if { $payload == "FULL" } {

     

    log local0. "SERVER_DATA: Chosen server is full. Selecting another."

     

    LB::reselect

     

    }

     

    }

     

     

    But it won't let me do an LB::reselect from SERVER_DATA. Help.