Forum Discussion

rama_127949's avatar
rama_127949
Icon for Nimbostratus rankNimbostratus
Feb 08, 2004

Force node selection on the URL

Hi,

 

 

I need some help on node selection stuff.

 

 

I have 2 servers behind my VIP and they need to be tested by a third party. I would like to set up in such a way when they use a particular url, they get the first server and then another url to get to the second server.

 

 

the URLs will be something like:

 

 

http://vip?webserver1 ---- goes to webserver1

 

 

http://vip?webserver2 --- goes to webserver2

 

 

Does anybody know a way to achieve this?

 

 

Thanks a ton.

 

 

Rama.

3 Replies

  • Thanks for your reply.

     

     

    I want to choose a node within a pool and not between pools. It will be one pool which has multiple members and they all got to be tested seperately.

     

     

    Rama.
  • Here is one option:

    1. Create 2 pools, one for each webserver. Call these pools webserver1 and webserver2.

    2. Create a Rule to switch on the http_uri. Call this "node_switcher"

    if (http_uri ends_with "webserver1") { 
        use pool webserver1 
     } 
     else { 
        if (http_uri ends_with "webserver2") { 
           use pool webserver2 
        } 
        else { 
           discard 
        } 
     }

    3. Create the VIP based on the Rule "node_switcher".

    Now When the a request comes in to the specified VIP, it will be processed by the rule and forwarded to either the webserver1 or webserver2 pool (or be discarded - you might want to change this behavior).

    Hope this helps.

    Since this is more of a BIG-IP configuration question (not iControl related), I'd recommend you contact F5 Customer Support (or take a look at the Solution Center) directly.

    F5 Solution Center

    http://www.f5.com/solutions/

    F5 Technical Support

    Email: support@f5.com

    Phone: 206-272-6888

    Web: http://www.f5.com/support/

    AskF5: http://tech.f5.com/

    -Joe
  • Loc_Pham_101863's avatar
    Loc_Pham_101863
    Historic F5 Account
    Here's the feedback from one of our UIE experts:

     

     

    This can be done with direct node selection (the use of the select statement on the pool). Basically, you create a mapping of text->node in a class and then specify an expression to select the text. It's ugly, but it works and it would look something like this:

     

     

    class myClass {

     

    "webserver1 10.10.10.1"

     

    "webserver2 10.10.10.2"

     

    }

     

     

    pool myPool {

     

    member 10.10.10.1

     

    member 10.10.10.2

     

    select mapclass2node(findstr(http_uri,"?",1), myClass)

     

    }

     

     

    Note that no rule is used.

     

    Regards,

     

    Loc