Forum Discussion

munim_64879's avatar
munim_64879
Icon for Nimbostratus rankNimbostratus
Sep 21, 2011

Directing traffic to specific member of a pool

I have 2 vip:

 

 

One for UI VIP:10.5.0.132

 

One for PF VIP:10.6.0.132

 

And 2 pools are silo1 and Silo2

 

Silo1 has 4 members: UI1,BG1,PF1,FSS1

 

Silo2 has 4 members:UI2,BG2,PF2,FSS2

 

Requirements are:

 

When Clients Hits UI VIP ie,10.5.0.132 then the request directly goes to UI1 which ip is 10.5.0.141 & when clients hits PF VIP i.e, 10.6.0.132 then the request directly goes to PF1 which ip is 10.6.0.139. No load balance need to occur inside pool Silo1 right now.

 

The other 2 server inside Silo1 BG1, FSS1 are there for service check only. If the services are not available or down for any of these 4 servers(UI1,BG1,PF1,FSS1) inside Silo1 then the entire pool silo1 declared down and all the request for UI VIP will then goes to Silo2 i,e UI2 which ip is 10.5.0.142 and for PF VIP will goes to PF2 which ip is 10.6.0.142. Here(in Silo2) also 2 servers BG2,FFS2 are there for same reason i,e service check only. Here also if any of the 4 members is down then Silo2 declared down and request goes to Silo1.

 

Note: Right now no load balancing is happening inside Silo1 and Silo2.

 

I think I need to create a i-Rule to do this:

 

 

UIVIP ( 10.5.0.132)

 

==================

 

when CLIENT_ACCEPTED {

 

if {"[active_members Silo1]" = 4}{

 

node 10.5.0.141

 

 

} else {

 

node 10.5.0.142

 

 

}

 

}

 

PFVIP (10.6.0.132)

 

==================

 

when CLIENT_ACCEPTED {

 

if {"[active_members Silo2]" = 4}{

 

node 10.6.0.139

 

 

} else {

 

node 10.6.0.142

 

 

}

 

}

 

Already tested this script in production environment but failed. Pls suggest in this regards. Thanks in advanced.

 

 

 

regards,

 

Munim.

 

 

2 Replies

  • Interesting requirements...How are you accomplishing servers in a pool just for service checking? Or do you need the iRule to do that as well?

    You can force a pool member selection as shown below(inside the HTTP_REQUEST event).

     pool [LB::server pool] member $ip $port 

    I was initially thinking priority group activation, but that will not satisfy the requirements stated above. Obviously only you can understand what the actual needs are, I just feel like a better explanation of why the requirements are how you stated them would help us come up with a better solution.
  •  

    I have 2 vip:

     

     

    One for UI VIP:10.5.0.132

     

    One for PF VIP:10.6.0.132

     

    And 2 pools are silo1 and Silo2

     

    Silo1 has 4 members: UI1,BG1,PF1,FSS1

     

    Silo2 has 4 members:UI2,BG2,PF2,FSS2

     

    Requirements are:

     

    When Clients Hits UI VIP ie,10.5.0.132 then the request directly goes to UI1 which ip is 10.5.0.141 & when clients hits PF VIP i.e, 10.6.0.132 then the request directly goes to PF1 which ip is 10.6.0.139. No load balance need to occur inside pool Silo1 right now.

     

     

    The other 2 server inside Silo1 BG1, FSS1 are there for service check only. If the services are not available or down for any of these 4 servers(UI1,BG1,PF1,FSS1) inside Silo1 then the entire pool silo1 declared down and all the request for UI VIP will then goes to Silo2 i,e UI2 which ip is 10.5.0.142 and for PF VIP will goes to PF2 which ip is 10.6.0.142. Here(in Silo2) also 2 servers BG2,FFS2 are there for same reason i,e service check only. Here also if any of the 4 members is down then Silo2 declared down and request goes to Silo1.

     

    Note: Right now no load balancing is happening inside Silo1 and Silo2.

     

    I think I need to create a i-Rule to do this:

     

     

    UIVIP ( 10.5.0.132)

     

    ==================

     

    when CLIENT_ACCEPTED {

     

    if {"[active_members Silo1]" = 4}{

     

    node 10.5.0.141

     

    } else {

     

    node 10.5.0.142

     

    }

     

    }

     

    PFVIP (10.6.0.132)

     

    ==================

     

    when CLIENT_ACCEPTED {

     

    if {"[active_members Silo2]" = 4}{

     

    node 10.6.0.139

     

    } else {

     

    node 10.6.0.142

     

    }

     

    }

     

    Already tested this script in production environment but failed. Pls suggest in this regards. Thanks in advanced.

     

     

    regards,

     

    Munim.

     

     

     

    Answered here too:

     

    http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/aft/1184488/showtab/groupforums/Default.aspx

     

     

    Aaron