Forum Discussion

Harry_Singh_105's avatar
Harry_Singh_105
Icon for Nimbostratus rankNimbostratus
Feb 12, 2013

iRule help for Single Node/URL Persistance across Pool.

Admitedlly, I have little to no experience with iRule creation. I've persued the vast amount of information on the site, and truthfully it will take me a while to get comfortable with iRules, but deadlines are deadlines.

 

I need help creating an iRule that will allow anyone (outside of the network) attempting to request a specific URL string (i.e https://site.company.com/connect/login.aspx) to pass through the load balancer to the pool of webservers and communicate to only 1 of the webservers in said pool.

 

 

https://site.company.com is available publicly, but a 3rd party vendor has installed a plugin on one of the webservers and needs constant communication to this URL string for polling/uptime data. I'm confident this is something I can do with the F5-1500's i currently have and really don't want to blow a public IP just for this purpose.

 

 

As always, your help would be greatly appreciated. Also, for any MVP or iRule rockstar who is interested in some side work regarding the my F5, contact me offline or send me a direct message.

 

 

Best,

 

 

Harry.

 

15 Replies

  • Steve - to confirm I should replace the '/common' with the virtual directory which needs to be polled correct ? I shouldn't replace the /common with the entire URL string right ?
  • to confirm I should replace the '/common' with the virtual directory which needs to be polled correct ? I shouldn't replace the /common with the entire URL string right ?if it is not full url, i think you should use "starts_with" or "contains" instead of "equals".
  • Good point Nitass, thanks. Harry, yes, replace /common with whatever the URI is (the URL without the FQDN). So, using the information in your first post;

    
    when HTTP_REQUEST {
     if { [string tolower [HTTP::uri]] equals "/connect/login.aspx" } {
     pool ‘pool_name’ member x.x.x.x XX
      }
    }
    
  • And if the URI could change;

    
    when HTTP_REQUEST {
     if { [string tolower [HTTP::uri]] starts_with "/connect/" } {
     pool ‘pool_name’ member x.x.x.x XX
      }
    }
    
  • Thanks to all. To any future readers who come across this post, the "starts_with" parameter worked best in my scenario.