Forum Discussion

Ben_Novak's avatar
Ben_Novak
Icon for Employee rankEmployee
Nov 24, 2009

Source IP to certain pools

I have a customer that has a JCAPS application and I have configured basic load balancing to two nodes on all ports. That works fine. Now they want to send certain customers only to certain nodes. But instead of the nodes being the actual server IPs, they will be RedHat cluster instances. Therefore, is one server fails, the other will take over both instances. I think I have come up with a solution but I would appreciate your input and give me a little sanity check.:D

 

 

I figured I would create two pools, each with one RedHat instance. Remove the current pool from the VIP and configure an iRule as follows:

 

 

when CLIENT_ACCEPTED {

 

if { [matchclass [IP::client_addr] equals $::Customerlist_01] } {

 

pool JCAPS_CustomerPool_01

 

} else {

 

pool JCAPS_CustomerPool_02

 

}

 

}

 

 

I thought about doing a switch statement for future expandability but this seemed a little easier to do a proof of concept.

1 Reply

  • That should work fine. It's not really possible to use a switch statement to compare an IP address against a datagroup. You could do string comparisons using switch, but that's not very efficient.

     

     

    What you have now is good.

     

     

    Aaron