Forum Discussion
chris_wood
Nimbostratus
Jun 26, 2023Big-IP LTM - load balancing incoming request to 2 different 'paths' on Member Pool
Hi, A strange request has come in :). I donlt think it's possible but thought I'd reach out just encase some has an answer. We have a VS setup that load balances to 2 different servers. In this e...
Jun 26, 2023
Ok chris_wood ,
This Irule Code should meet your need :
when LB_SELECTED {
if { [IP::addr [LB::server addr] equals x.x.x.x] } {
log local0. " Server 1 selected , Change path to ( http://example/folder/folder/server1 ) "
HTTP::uri "http://[HTTP::host]/folder/folder/server1"
} elseif { [IP::addr [LB::server addr] equals x.x.x.x] } {
log local0. " Server 2 selected , Change path to ( http://example/folder/folder/server2 ) "
HTTP::uri "http://[HTTP::host]/folder/folder/server2"
}
}
#Replace "x.x.x.x" Ips by your servers/poolmembers IPs.
#First "x.x.x.x" server1 and second "x.x.x.x" server2
>> I have tested it and it works as expected , after capturing the traffic in both sides , I observerd the chaning in URI paths according to selected pool member inside the pool.
<< Why I used this method >> ?
Because you need to use round Robin loadbalance technique and modify the request to servers at the same time.
try it and let me know.
Goodluck 🙂
chris_wood
Nimbostratus
Jun 26, 2023Thank you! I will test this afternoon and let you know!
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