Load Balancing with Data Groups
I have an iRule that looks at a data group and sends the application to the correct pool based on the string defined in the data group. We are load balancing our applications between 1 - Windows 2003 pool and 1 - Windows 2012 pool so we can upgrade our application 1 and a time and move to the new server when ready. However, I'm running into an issue when there are underscores in the application name. I have to define my application in the datagroup with a backslash at the end which requires the user to type the backsplash in the URL. How do I get around this? Here is my iRule: when HTTP_REQUEST { if { [class match [string tolower [HTTP::path]] contains dwdworkweb-acc.2003]} { pool dwdworkweb-acc.2003 } else {pool dwdworkweb-acc.2012 } }
I have tried using equals instead of contains but then nothing works. So for example, http://dwdworkweb-acc/applicationone works but http://dwdworkweb-acc/application_one does not, (strings in the datagroup are defined as /applicationone and /application_one)I have to type http://dwdworkweb-acc/application_one/ in order for it to work. Any help would be greatly appreciated.