Forum Discussion
Sonny
Cirrus
Mar 08, 2019URI redirect to pool with port other than 443
I have a VS that has both a client and server SSL profile on 443. When I use the below irule, since the "generic_pool" is NOT listening on 443 (but rather 8443), it doesn't work. We can't change the ...
Stanislas_Piro2
Cumulonimbus
Mar 12, 2019Hi,
when you write an irule which change pool, never forget to define a default statement, even if the virtual server already assigned a default pool...
pool selection is connection based, except if there is oneconnect profile assigned to virtual server, which is false on the vs configuration.
this means that the following URI will have this behavior with your irule:
- URI / --> pool XXXXX_Pool
- URI /abc/foo/bar --> pool generic_pool
- URI / --> pool generic_pool (because the previous request changed the pool assigned to the connection)
try this code:
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/abc*" { pool generic_pool
HTTP::path "/abc-test"
}
"/def*" { pool generic_pool
HTTP::path "/def-test"
}
"/ghi*" { pool generic_pool
HTTP::path "/ghi-test"
}
default { pool $default_pool
}
}
}
if the server respond with absolute URL including port number, the client will request to pool member's port...
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