Forum Discussion
Unable to view Webpage through Load Balancer
But how do i write an irule for load balancing between both web servers
Here's a very basic iRule that changes the Host header based on the load balancing decision:
when HTTP_REQUEST_RELEASE {
HTTP::header replace Host "[LB::server addr]:9080"
}
This should work on a v11 system. If you're on v10.x, then you'd need to do something like this:
when HTTP_REQUEST_SEND {
clientside {
HTTP::header replace Host "[LB::server addr]:9080"
}
}
Both of these events are triggered after the load balancing decision, so you can take this information to replace the Host header before leaving the box.
or is there any change that needs to be done on the Webserver so that it accepts the header that the LB sends.
That would depend entirely on the application itself.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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