Forum Discussion

Aaron_Dummer_18's avatar
Aaron_Dummer_18
Icon for Nimbostratus rankNimbostratus
Mar 25, 2011

Action on Service Up?

Hi, I've got a scenario where there are two nodes in a pool, in a master/slave type setup. I want all connections to go to a single pool member at all times - there should never be a case where some clients are connected to the master and some to the slave at the same time. I'm using the priority group activation feature.

 

 

Desired scenarios:

 

1. If the master is up, all connections are sent to it.

 

2. If the master goes down, all new connections are sent to the slave. All existing connections to the master are killed.

 

3. If the master comes back up, all new connections are sent to it. All existing connections to the slave are killed.

 

 

The "Action on Service Down" pool property (set to Reject) handles the second scenario very well [1]. When a pool member goes down, a TCP reset packet is sent to the server and clients to terminate all existing connections.

 

 

But I'm not sure how to handle the third scenario - the master comes back up and all connections to the slave need to be killed with a TCP reset packet.

 

 

I setup a lab environment and found that this iRule does the trick:

 

 

when CLIENT_DATA {

 

if { [LB::server addr] eq "IP_OF_SLAVE" and [LB::status pool MY_POOL_NAME member IP_OF_MASTER PORT_OF_MASTER] eq "up" } {

 

reject

 

}

 

}

 

 

If the LB has chosen to send client data to the slave node, and the master node is up, kill the connection. That's great, but I believe "when CLIENT_DATA" means that this iRule will inspect every packet received from the client! Logic tells me this will be way too much overhead as these servers handle 40Mb/sec of traffic.

 

 

Is there another, less CPU-intensive way to achieve this? What I'm looking for is "Action on Service Up" - when a pool member comes online, kill connections established with the other member.

 

 

 

[1] http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/179/LTM-Action-on-Service-Down.aspx

 

  • Hi Aaron,

     

    Not sure if this would be way to much overhead. I have ran this type of scenario before in the LAB and I was pushing over 300Mbps against the same type of the iRule and didn't see a performance hit. However, yes in that the each time the client data is received it would trigger the event.

     

     

    I hope this helps

     

     

    Bhattman