Forum Discussion

vaibhav_MD_2489's avatar
vaibhav_MD_2489
Icon for Nimbostratus rankNimbostratus
Nov 01, 2018
Solved

Should I Use iRule or there is any other way to move traffic on other server. while useing xyz.com/new instead of xyz.com

Hi Hope you are doing good.

I have hosted one URL "https://webside.shop.com"; with VIP 10.10.10.10, there are three pool members server-1, server-2 server-3

Application owner installed addition software on one server (assuming on SRV-2). and application owner wants, if user entered "https://webside.shop.com/new_function"; then this request should be transfer on server-2 only. I thing, I should create two pool and then use iRule to move traffic.

I have no idea about iRule, Please currect below one. please suggest if there any other way.

when HTTP_REQUEST {

if { [string tolower [HTTP::uri]] starts_with "/new_function "

} {

 pool new_function 
`


} else {

`if { [string tolower [HTTP::host]] equals " weside.shop.com "} {

 pool old_one_pool 

} } }

  • You can write some thing like this.

                when HTTP_REQUEST {
                    if {[string tolower [HTTP::uri]] starts_with "/new_function" } {  
                    node 10.1.2.200 80  2nd Pool member
                        } 
                    }
    

2 Replies

  • You can write some thing like this.

                when HTTP_REQUEST {
                    if {[string tolower [HTTP::uri]] starts_with "/new_function" } {  
                    node 10.1.2.200 80  2nd Pool member
                        } 
                    }
    
    • vaibhav_MD_2489's avatar
      vaibhav_MD_2489
      Icon for Nimbostratus rankNimbostratus

      Dear f5_rock.

       

      Thanks a lot for you kind support. I have done this with below iRule.

       

      when HTTP_REQUEST { if { [HTTP::uri] starts_with "/digitalpmsmart" } { pool pmsmart_digitalpmsmart_pool } else { pool pmsmart.hcl.com_pool } }