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

Filter by:
  • Solution
  • Technology
Answers

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

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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} }

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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.

0