Forum Discussion

Gary_Walderich_'s avatar
Gary_Walderich_
Icon for Nimbostratus rankNimbostratus
May 03, 2007

iRule to direct traffic to a specific node in a pool?

I have a single virtual server on port 1080 and two nodes that talk over port 1080 in a pool. However, both nodes perform a seperate function for the client accessing the data. Example, node 1 provides data for time entered. Node 2 provides data for vacation time.

 

 

Can I write an iRule that would direct the client to the appropriate node in the pool, instead of load-balancing between the two nodes?

 

 

-GW

1 Reply

  • You can create a pool for the "time_entered" server and a pool for the "vacation_time" server. You could then create a rule that selects the correct pool based on whatever logic you have. Then create a virtual server which points to the rule.

    The advantage to using a pool is that you can change the pool membership without having to modify the rule.

    The rule might look something like this:

    
    if {$some_condition==1}{
       pool time_entered_pool
    } elseif {$some_other_condition==1}{
       pool vactaion_time_pool
    } else {
       
    }

    If you provide more detail on what the criteria for the selection is, I can give you a closer example.

    Aaron