Forum Discussion
Aaron_Dummer_18
Mar 25, 2011Nimbostratus
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
- The_BhattmanNimbostratusHi Aaron,
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects