Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Help with custom LB method

Hi F5 peers,

Need some help on how to approach a requirement from our DB team.

Customized LB which distributes traffic to pool_member 1 and pool-member2. If and when pool_member2 is unavailable traffic should go to pool_member1. But if pool_member1 is unavailable it SHOULD NOT go to pool_member2.

Thanks in advance!!

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hi,

when HTTP_REQUEST { 
    if { [active_members [pool_1] ] > 0 } { 
        if { !([lsearch -exact [active_members -list pool_1] pool_member1:its_port]) } {
            reject
        }
    }
}
0
Comments on this Answer
Comment made 06-Nov-2014 by ERLomboy 245
Hi Thomas, Thank you for sharing.. So it's only possible via iRule as you were suggesting?
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

This iRule will check if member1 is down. If it is, the request will be rejected. Then you also have to define priority group into your pool, with a higher priority for your member_2.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Yes, I don't see any way to do it without iRules.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

You could also do member-specific monitors applied to member_2. the first monitor would be the monitor used to check member_2, the second monitor could check the status of member_1 using monitor configuration items alias-address and alias-port settings that specify member_1

0
Comments on this Answer
Comment made 06-Nov-2014 by ERLomboy 245
Hi Shaggy, Thanks for sharing.. Meaning I don't need to do the iRule, just monitoring? Edward
0
Comment made 06-Nov-2014 by shaggy 2250
correct. member-specific monitors can be a pain as they are often forgotten when doing config changes or doing troubleshooting since most admins will only notice pool-level monitors
0