impala_38421
Dec 29, 2017Nimbostratus
Irule to use different persistence cookie by node
I need to create an irule that use different pools according the URL requested and insert a different persistence cookie to each pool member
I will try to explain the scenario.
The elements are:
One Virtual Server: VS1
Three Pools: Pool1, Pool2, Pool3
Two Nodes: Node1, Node2
6 persistence cookies: ck1, ck2, ck3, ck4, ck5, ck6
3 URLs that could be used by source user. VS1 has the IP of the URL, and the URL allways is the same only changes the resource
htttps://URL/XXXX
htttps://URL/YYYY
htttps://URL/ZZZZ
The work policy must be the next:
request to:
https://URL/XXXX
Pool1
Node1 with persistence ck1
Node2 with Persistence ck2
https://URL/YYYY
Pool2
Node1 with persistence ck3
Node2 with Persistence ck4
https://URL/ZZZZ
Pool3
Node1 with persistence ck5
Node2 with Persistence ck6
To try to do it I have created the next Irule
when HTTP_REQUEST {
switch [HTTP::host] {
https://URL/XXXX {
Pool1
}
https://URL/YYYY {
Pool2
}
https://URL/ZZZZ {
Pool3
}
default { reject }
}
}
Now I need to insert the cookie to each node. Please could you help finish this configurtion?
Thaks in advance.Jordi