Forum Discussion

Sam_73035's avatar
Sam_73035
Icon for Nimbostratus rankNimbostratus
Jun 05, 2009

Can I use iRules to route based on the application name

Hi:

 

 

I am very new to Big-IP but would like to find out about if I can use Big-IP to support the following use cases:

 

 

If I have the following two URLs:

 

 

1) http://myhost:myport/app1

 

2) http://myhost:myport/app2

 

 

Can Big IP route those requests to two separate web servers. As you see in the case above, the host and port are same except the application name is different. If this can be done more efficiently using some other Big-IP components instead of iRules, I would be interested to know that as well.

 

 

All comments and suggestions are highly appreciated.

 

 

Thanks in advance

 

 

Sam

 

 

 

1 Reply

  • you bet, you can use an http class profile to switch based on URI path, or you can do something like this with iRules:

     
     when HTTP_REQUEST { 
       if { [string tolower [HTTP::uri]] starts_with "/app1" } { 
         pool app1_pool 
       } elseif { [string_tolower [HTTP::uri]] starts_with "/app2" } { 
           pool app2_pool 
       } 
     }