Forum Discussion
sandiksk_35282
Altostratus
Aug 15, 20182 urls pointing to same VIP
I have a req where we have 2 urls pointing to same VIP.
1 url need to balance across pool of 2 servers without sticky and least connections .
2nd url need to balancer across same pool of 2 servers ...
youssef1
Cumulonimbus
Aug 15, 2018Hi,
In this example don't set any cookie profile on your VS. You will manage this need on the irule. And as you point in the same pool you don't need to set it in the irule just set your pool in the VS.
If you need to manage your need using Hostname
when HTTP_REQUEST {
set hostname [string tolower [HTTP::host]]
switch $hostname {
"host1.com" {
persist cookie
}
"host2.com" {
do nothing
}
}
}
If you need to manage your need using URI
when HTTP_REQUEST {
set uri [string tolower [HTTP::host]]
switch -glob $uri {
"/uri1*" {
persist cookie
}
"/uri2*" {
do nothing
}
}
}
Let me know if you need more details.
And last point, you don't asked it but it's important to keep in mind, if you have multiple pool you need a onconnect profil in order to detach the session or use LTM Policy.
Regards,
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
