Is it possible to persist on a value in the URI?
We then could write a a iRule where we check this value, in this case a server-id. We could write a iRule where we define every value of the server-id.
It would be nice to have that the F5 builds a table for the server-id and make the lb based on this value in the request.
Example:
where
srvid: is the variable
srv1: value to persist on
Any suggestions are welkom.
Regards,
Gerard.
What you are referring to is what we call Universal Persistence.
To do this you need to use a rule to extract the portion of the uri you want to persist on and then execute the persist uie command with that value.
Here is an example that persists on the uri query string’s “srvid” value:
rule uri_persist {
when HTTP_REQUEST {
set srvid [findstr [URI::query [HTTP::uri]] "srvid=" 6 ";"]
if { $srvid ne "" } {
persist uie $srvid
}
}
}