Forum Discussion
Tony_Jarvis_132
Altostratus
Jun 23, 2014Modify priority of pool members using iRules
Hi all
I have an application which has the specific requirements:
Two nodes in the pool. Send all requests to only one node during normal operation (hence using priority group activation)...
nitass
Employee
Jun 23, 2014it seems this may not be suitable for situations requiring prioritisation of nodes within the pool though?
is LB::status useful (i.e. manually select pool member for the first request)?
e.g.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 41
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm pool foo
ltm pool foo {
members {
200.200.200.101:80 {
address 200.200.200.101
session monitor-enabled
state up
}
200.200.200.111:80 {
address 200.200.200.111
session monitor-enabled
state up
}
}
monitor gateway_icmp
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when CLIENT_ACCEPTED {
if { [persist lookup uie 1] ne "" } {
persist uie 1
} else {
if { [LB::status pool foo member 200.200.200.111 80] eq "up" } {
pool foo member 200.200.200.111 80
}
}
}
when SERVER_CONNECTED {
persist add uie 1
}
}
persistence
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) show ltm persistence persist-records all-properties
Sys::Persistent Connections
universal - 172.28.24.10:80 - 200.200.200.111:80
------------------------------------------------
TMM 0
Mode universal
Value 1
Age (sec.) 6
Virtual Name /Common/bar
Virtual Addr 172.28.24.10:80
Node Addr 200.200.200.111:80
Pool Name /Common/foo
Client Addr 200.200.200.111
Local entry
universal - 172.28.24.10:80 - 200.200.200.111:80
------------------------------------------------
TMM 1
Mode universal
Value 1
Age (sec.) 6
Virtual Name /Common/bar
Virtual Addr 172.28.24.10:80
Node Addr 200.200.200.111:80
Pool Name /Common/foo
Client Addr 200.200.200.111
Owner entry
Total records returned: 2
by the way, if you want to change pool member priority value, i think alertd or icall may be applicable.
Acton on Log - using the alertd deamon
https://devcentral.f5.com/wiki/advdesignconfig.Acton-on-Log-using-the-alertd-deamon.ashxiCall - All New Event-Based Automation System by Jason Rahm
https://devcentral.f5.com/articles/icall-all-new-event-based-automation-systemHelp guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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