Forum Discussion
Want to divert traffic to one pool only while other pool serves as standby from VIP
Hi , I have below requirement F5 LTM
VIP ------->>>>>Server 1(one site),Server 2 (another site)
Want to use one virtual IP only
By default traffic should not go through server 2 from VIP and it should go to Server 1 only
If server 1 is down traffic should go to server 2 . If server 1 is back again traffic should back to server 1
Can it be achieved in IRULE
Thanks Abu hasan
2 Replies
- Abuhasan_116587
Nimbostratus
I have used below irule .Pls check any additional conditional can be used prior to deployment
Create two pools Server1 and Server2
when CLIENT_ACCEPTED { set noofpools [active_members Server1] if {$noofpools < 1 } { pool Server2 } else {pool Server1} }
- Dan_Bowman
Cirrus
You don't need an iRule for this functionality from what I can see of your requirements?
Just set your pool up with priority group activation and configure to "less than 1 available member", then give pool member Server1 priority weight 10, and Server2 priority weight 5.
This will route all traffic to Server1 only, and direct traffic to Server2 only if preferred member becomes available.
You will also require an appropriate health monitor for the pool to check availability.
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