JSpartan0901_95
Feb 10, 2012Nimbostratus
Routing traffic to all the pool members except one by keeping the existing load balancing algorithm
Hi all,
I would like to achieve the following in iRules. Appreciate if someone can help me suggest the right way.
Today, we already have a pool configured with Least connections (member) algorithm. Now we are planning to add another member to this pool and route traffic to it based on a value of certain cookie.
One way of doing this would be to create another pool with just the new member and write iRule -
If{ [string match "*[1]" [HTTP::cookie value "testCookie"]]}
{ pool existing_pool }
else
{ pool pool_with_only_one_new_member }
Is there a way I can achieve this by adding the new member to the existing pool?
If{ [string match "*[1]" [HTTP::cookie value "testCookie"]]}
{ pool existing_pool new_member_ip new_member_port }
else
{ pool existing_pool old members 1,2,3 }
Can we do this? If yes, how to ensure it still uses the least connections(member) algorithm?
What will be the correct syntax for mentioning three pool members.
-JS