I’m new to iRule development, so I apologize if I’m asking a silly question. My department manages the F5 infrastructure, but the resource nodes are managed by multiple internal customers. I have customers who would like to be able to test individual nodes on specific VSs that do not have persistence enabled. I’ve seen a few posts which seem to mention ways to do this, but I haven’t been able to get it to work yet. I’ve tried variations of the following code without success:
when HTTP_REQUEST {
Check the requested URI
switch -glob [string tolower [HTTP::path]] {
"/persist1*" {
Direct traffic to pool member 1
persist source_addr
session add source_addr [IP::client_addr] 10.75.65.55 3600
}
"/persist2*" {
Direct traffic to pool member 2
persist source_addr
session add source_addr [IP::client_addr] 10.75.65.56 3600
}
default {
}
}
}
/persist1 and /persist2 do not exist. My thinking was that I could use that as a switch to drive the switch logic, but I’m sure I’m doing something wrong. Ideally, the customer would like to send a string that sets persistence to a selected node for an hour to allow them to perform testing against that node. Has anyone done this before?
Thanks in advance for any help