Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Configuring multiple pools under same VIP in F5 Load Balancer

Sabari_Nath_179
Nimbostratus
Nimbostratus

Hi Experts,

 

I have a requirement to have 2 pools added under the same VIP. Does F5 allow to do this ? If so, how ?

 

The reason I want to do like this is given below.

 

Say the URL "abc.com" resolves to the VIP "vip_abc" and "vip_abc" has the pool "pool_abc" mapped to it with 3 members m1,m2,m3 under this pool.

 

Now I have another new application which is being called by the URL "abc.com/newapp" which needs to go to another virtual host in my web server. Hence I am trying to configure a new pool say "pool_abc_newapp" and add this pool also to the same vip "vip_abc" and will have iRules written to redirect the traffic to pool_abc or pool_abc_newapp based on whether the HTTP:URI starts with /newapp or not.

 

Does F5 allow this configuration ? If not, what is the other alternative by which I can set this up ?

 

Thanks, Sabari Nath S

 

4 REPLIES 4

Sheigh_65772
Cirrus
Cirrus

Sabaris,

Either one of these should work, though I believe the second one consumes less resources due to the switch statement. The 'string tolower' doesn't have to be in there, though it could also be in both, just depends how you want to do it.

when HTTP_REQUEST {
 if { [HTTP::uri] starts_with "/newapp" } {
        use pool pool_abc_newapp
    } else {
        use pool pool_abc
    }
}


when HTTP_REQUEST {
    set uri [string tolower [HTTP::uri]]
    switch -glob $uri {
    "/newapp*" {
        use pool pool_abc_newapp
    }
    default {
        use pool pool_abc
    }
}

Hi...writing the iRule for redirecting to seperate pools is fine. The question here is if these two pools can be mapped under the same virtual server VIP. If not can a pool be created amd not relate to any VIP and still redirecting traffic to that stand alone pool will still work

Hi Sheigh / Expert

Additional question for this title "Configuring multiple pools under same VIP in F5 Load Balancer"
If there is ASM (AWAF) module installed on the same f5 device,

Since we only use same VIP for multiple pools,  
1)  Can we still  have multiple ASM(WAF) policy for multiple  web service?   By which I can set this up ?
    i.e,  "abc_Policy",    "abc_newapp_Policy"

Thanks for  assist.





Pratik_125797
Nimbostratus
Nimbostratus

There is no need to map the pool physically with VIP. The irule will do it. when HTTP_REQUEST { if {[string tolower[HTTP::uri]] starts_with "/newapp"} { pool pool_abc_newapp } else { pool pool_abc } }

 

You don't need to select any default pool on VIP, just associate the irule with VIP.