Forum Discussion
teknet7_237497
Nimbostratus
Dec 14, 2015iRule: persist uie "$var1:$var2"
Hello Team,
I have just found i can create persistence entry using two variables example:
persist uie "$var1:$var2"
But not sure how can later use it.
Is it possible to hit it if matching...
StephanManthey
Nacreous
Dec 16, 2015Hi Michal,
if you want to persist on a combination of parameters it will be required to match exactly.when HTTP_REQUEST {
log local0. "[IP::client_addr]:[URI::query [HTTP::uri] param1]"
persist uie "[IP::client_addr]:[URI::query [HTTP::uri] param1]"
}
I.e. you try to persist on combined client IP and a query parameter. Now watch your persistence table (specify
mode and the virtual server to limit output; the all-properties parameter just dispays some more details i.e. record age):
watch -d 'tmsh show ltm persist persist-records mode universal virtual vs_51 all-properties'
Sys::Persistent Connections
universal - 10.131.131.51:80 - 10.131.131.64:80
-------------------------------------------------
TMM 1
Mode universal
Value 10.131.131.176:abc
Age (sec.) 36
Virtual Name /Common/vs_51
Virtual Addr 10.131.131.51:80
Node Addr 10.131.131.64:80
Pool Name /Common/pool_distribution_service
Client Addr 10.131.131.176
Owner entry
universal - 10.131.131.51:80 - 10.131.131.63:80
-------------------------------------------------
TMM 1
Mode universal
Value 10.131.131.176:hij
Age (sec.) 24
Virtual Name /Common/vs_51
Virtual Addr 10.131.131.51:80
Node Addr 10.131.131.63:80
Pool Name /Common/pool_distribution_service
Client Addr 10.131.131.176
Owner entry
Total records returned: 2
Whenever the value ist matched, the associated poolmember will be reselected.
Use i.e. cURL to play with query parameters:curl -v http://10.131.131.51/path?param1=hij
Thanks, Stephan
Help 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