I’m hitting the wall with persistence in version 9.4. In version 4.6, I can set different persistence for each pool such as SSL persistence for pool A, Simple persistence for pool B, and None for pool C. All pool A, B, and C are under a single VIP. Now I can’t do the same thing thru configuration in version 9.4. The Tech @ F5 recommended me to config the persistence for each pool thru irule and I’m not sure how to start with. For instance, https://www.mycompany.com/A go to poolA, /B go to poolB, /C go to poolC and poolA is a Simple persistence, poolB is a SSL persistence, and poolC is None.
when HTTP_REQUEST {
if {[HTTP::uri] contains “A”} {
pool A
}
elseif {[HTTP::uri] contains “B”} {
pool B
}
else {
pool C
}
}
The Persistence feature in Profile is configured for all pools, so I can’t utilize it and need your help to config persistence for each pool.
Thanks for the response. I looked over the persist command but got confused that can I embed the persist command within HTTP_REQUEST event or I have to create a new event CLIENTSSL_HANDSHAKE? For intstance:
when HTTP_REQUEST {
if {[HTTP::uri] contains “A”} {
persist simple
pool A
}
elseif {[HTTP::uri] contains “B”} {
pool B
persist ssl
}
else {
pool C
persist ssl
}
}
Not so sure if the above persist can be used as such. Thanks.
You should be able to set the different persistence methods in the HTTP_REQUEST event. This allows you to make per-HTTP request decisions on which persistence method to use.
However, trying to use SSL session ID persistence in this context won’t work. SSL persistence can only be used when the BIG-IP does not decrypt the traffic:
SSL persistence is a type of persistence that tracks non-terminated SSL sessions, using the SSL session ID. Even when the client’s IP address changes, the LTM system still recognizes the connection as being persistent based on the session ID. Note that the term non-terminated SSL sessions refers to sessions in which the LTM system does not perform the tasks of SSL certificate authentication and encryption/re-encryption. To enable persistence for terminated SSL sessions, see Chapter 7, Managing SSL Traffic and Chapter 13, Writing iRules.
You can only use SSL persistence with nodes that are running SSL, where BIG-IP load balances only encrypted traffic. You cannot use SSL Persistence with SSL connections that are terminated by BIG-IP.
If the BIG-IP terminates the SSL connection, the SSL session ID is removed before the connection is directed to a pool. As a result, the pool sees the connection as a regular HTTP connection, which does not contain an SSL Session ID.
If the BIG-IP is configured to terminate and re-encrypt SSL connections, a different SSL session ID is used for the node-side connection than is used for the client-side connection. As a result, you cannot use SSL session ID persistence in combination with re-encryption.
If you are decrypting the traffic, you could persist on the SSL session ID using the session table or persist uie. Try searching the forum for “SSL::sessionid” for some examples.
I also recall that you need to assign a persistence profile to the VIP in order to use certain persist commands in an iRule (like ssl). That would mean you need to do “persist none” for pool C. DevCentral - An F5 Technical Community