Forum Discussion
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 po...
jaikumar_f5
Jul 23, 2020MVP
May be something like this, not tested,
Irule:
ltm rule /Common/VIP_URI_POOL_RULE {
when HTTP_REQUEST {
set httpuri [string tolower [HTTP::uri]]
set uri_pool [class match -value $httpuri contains VIP_URI_POOL_DGL]
if { $uri_pool ne "" } {
if { [active_members $uri_pool ] > 0 } {
pool $uri_pool
} else {
pool servers_fallback_pool
}
} else {
pool servers_default_pool
}
}
Data Group:
ltm data-group internal VIP_URI_POOL_DGL {
records {
"/def/ghi/account*" {
data servers_8100
}
"/def/ghi/customer*" {
data servers_8200
}
"/def/ghi/equipment*" {
data servers_8300
}
"/def/ghi/order*" {
data servers_8400
}
"/def/ghi/statement*" {
data servers_8500
}
"/def/ghi/payment*" {
data servers_8600
}
"/def/ghi/financials*" {
data servers_8700
}
type string
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects