Forum Discussion

Jeremy_Alons_40's avatar
Jeremy_Alons_40
Icon for Nimbostratus rankNimbostratus
Nov 19, 2008

one virtual server, multiple pools?

Greetings,

 

 

Extremely new to iRules and the F5s in general, but here goes.

 

 

I haven't seen a way to do this in the configuration, so I'm assuming an iRule is going to be the answer.

 

 

We want to maintain persistence to a specific pool for a virtual server, while having multiple pools service that virtual server (with a special, last ditch effort pool defined that basically says "We're having issues yada yada yada"

 

 

I've gotten uri matching and the likes working via iRules, simple http->https and the likes, but can't seem to see how to make it go to multiple rules, with persistence, as long as the first pool it hits lives.

 

 

So basically:

 

 

virtual_serverA

 

-> Pool1

 

- nodeA1

 

- nodeB1

 

...

 

- nodeN1

 

-> Pool2

 

- nodeA2

 

- nodeB2

 

...

 

- nodeN2

 

-> PoolN

 

- nodeAN

 

- nodeBN

 

...

 

- nodeNN

 

 

And the likes. There's no URI I can match off of to redirect - I simply need persistence for each user to go to the same pool unless every node in that pool is dead, and then move onto another pool, finally falling out to the "maintenance" pool should all nodes in all pools cease responding.

 

 

I can't just have one massive pool, as the cost of replication between them is too high. Is my logic correct? Am I overlooking something obvious? Have I managed to make this harder than it actually is?

5 Replies

  • Assuming that this is website have you you tried creating a cookie persistance for each selection of the irule within your pool selection.

     
     persist cookie insert COOKIE_NAME_PoolNN TIMEOUT 
     

    Hope this helps

    CB

  • You just need to create one pool with priority group options enabled. Set your primary servers to priority 3, your secondary ones to priority 2, and your fallback ones to priority 1. Then set the priority group activation to "Less than 1" and that should do what you require.

     

     

    Denny
  • Good one Denny. Don't know how I missed that one.

     

     

    Jalons - please note that if the nodes do return the next NEW connection will go to the node that returned and eventually everything will idle out and return to the node that returned.

     

     

    Let us know if you are successfull.

     

     

    CB

     

     

     

  • I'm not sure I understand the Priority group Activation.

     

     

    According to the help, "The system sends traffic to groups in order of priority."

     

     

    So, if I have, say 4 servers of 4 nodes each.

     

     

    I want:

     

     

    Group1

     

    server1_g1

     

    server2_g1

     

    server3_g1

     

    server4_g1

     

     

    Group2

     

    server1_g2

     

    server2_g2

     

    server3_g2

     

    server3_g2

     

     

    Group3

     

    server1_g3

     

    server2_g3

     

    server3_g3

     

    server3_g3

     

     

    Group4

     

    server1_g4

     

    server2_g4

     

    server3_g4

     

    server3_g4

     

     

     

    Requests that come in, get sent to one of any group - I'm not fussy which. With priority group activation, I specify servers in Group1 as Priority Group 1, Group 2 as 2, Group3 members with a 3, and Group4 with a 4.

     

     

    "The system sends traffic to members in priority-group order." - is this ascending or descending? Does stickiness stick to the priority group, or strictly to a node, and if the node is marked down, it makes a recalculation...somewhere? Do items only "spill over" to different priority groups when some arbitrary configuration item is met? Is there any way to dump out the contents of memory or similar to see why the F5 made the choice it made?

     

     

    We're currently re-engineering our replication methods since we haven't found a suitable method to do this on the F5 itself, which is why there was such a lag in my response, however that's proving daunting thus the renewed interest.
  • The higher the number, the higher the priority, so your priority group 4 will get all the traffic first (so, descending order). Stickiness (persistence) will apply to whatever node is chosen. If that node is marked down, the client will be sent to the next available server in the currently active priority group.

     

     

    The Priority Group Activation dropdown box will control when the next priority group is activated. If you set it to "Less than 1" then when all of the nodes in priority group 4 fail, priority group 3 will become active. If you set it to "Less than 2" then it will activate when 3 of the Group 4 nodes fail, etc, etc.

     

     

    Denny