Forum Discussion
Its easy enough. The trick is trying to tie it into the existing persistence method and let it do the leg work. The first thing you need to consider is the BIGIP sees the pool members as IP addresses. While you can specify DNS names they are only looked up at the time the member is added to the pool. Thereafter they are referred to by IP address. So either you specify the IP address or you use RESOLV::lookup command to look up the IP address. When you have that you select the pool member using something like this...
if {not [HTTP::cookie exists "qwaapp"]} {
if {[URI::query [HTTP::uri] app] ne ""} {
pool mypoolname member [RESOLV::lookup -a [URI::query [HTTP::uri] app]] 80
}
}
log local0. "Cookie qwaapp is [HTTP::cookie qwaapp]"
Requirement
DNS is configured and it can resolve the name you provide in the app parameter. Cookie persistence applied with cookie name of qwaapp Initial request is made with http://www.xyz.com/download.do?app=qwa1234.mycompany.com or you can manually add the domain in the iRule.Instructions
Replace mypoolname with the actual pool name. Replace port 80 with the actual port used by your pool members.When the request arrives it checks if qwaapp cookie exists. If not then checks if the app parameter is passed in the URL. If so then it selects the pool member based on the IP address of the name provided.