Mattews
Jul 21, 2020Cirrus
Create a Datagroup with URI:VIP:POOL relationship
Hi,
I need to create a datagroup with the relation in object (URI:VIP:POOL), this could help me to implement a dynamic iRule that, based on the HTTP REQUEST, redirects the traffic to a specific pool.
This is the starting point of the iRule:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/def/ghi/account*" {
pool servers_8100
}
"/def/ghi/customer*" {
pool servers_8200
}
"/def/ghi/equipment*" {
pool servers_8300
}
"/def/ghi/order*" {
pool servers_8400
}
"/def/ghi/statement*" {
pool servers_8500
}
"/def/ghi/payment*" {
pool servers_8600
}
"/def/ghi/financials*" {
pool servers_8700
}
default {
pool servers_default_pool
}
}
}
Could you recommend to me a way for implementing both the datagroup and the iRule ?
Thanks in advance,
Matteo