Forum Discussion
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!!
- Thomas_GobetNimbostratus
Hi,
when HTTP_REQUEST { if { [active_members [pool_1] ] > 0 } { if { !([lsearch -exact [active_members -list pool_1] pool_member1:its_port]) } { reject } } }
- ERLomboy_27803NimbostratusHi Thomas, Thank you for sharing.. So it's only possible via iRule as you were suggesting?
- Thomas_Gobet_91Cirrostratus
Hi,
when HTTP_REQUEST { if { [active_members [pool_1] ] > 0 } { if { !([lsearch -exact [active_members -list pool_1] pool_member1:its_port]) } { reject } } }
- ERLomboy_27803NimbostratusHi Thomas, Thank you for sharing.. So it's only possible via iRule as you were suggesting?
- Thomas_GobetNimbostratus
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.
- Thomas_GobetNimbostratus
Yes, I don't see any way to do it without iRules.
- shaggy_121467Cumulonimbus
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
- ERLomboy_27803NimbostratusHi Shaggy, Thanks for sharing.. Meaning I don't need to do the iRule, just monitoring? Edward
- shaggy_121467Cumulonimbuscorrect. 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
- shaggyNimbostratus
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
- ERLomboy_27803NimbostratusHi Shaggy, Thanks for sharing.. Meaning I don't need to do the iRule, just monitoring? Edward
- shaggyNimbostratuscorrect. 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
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com