Forum Discussion
Load Balance HTTP Redirections
Can someone help me out here? I am trying to redirect a front end internal URL to a couple of servers on different ports via round robin. However, I don't want it to redirect to a server or port that is down.
Front-end URL http://Internal-DNS-URL (port 80)
Redirected to the following http://server1:9081 http://server1:9082 http://server2:9083 http://server2:9084
4 Replies
- Jason_40733
Cirrocumulus
Add each of those server+port combos as a pool member. Put a good health check monitor on them that validates they are up correctly.
server1:9081 server1:9082 server2:9083 server2:9084
Example in version 11
ltm pool /Common/POOL_RANDOM_PORTS { description "Multiple servers Multiple Ports" members { /Common/10.10.10.1:9081 { address 10.10.10.1 } /Common/10.10.10.1:9082 { address 10.10.10.1 } /Common/10.10.10.2:9084 { address 10.10.10.2 } /Common/10.10.10.2:9084 { address 10.10.10.2 } } monitor /Common/http }- meenny_60187
Nimbostratus
I guess I should also add that the server URL is expecting a path in the URI in order for the page to load. server1:9081 (does not work. web page won't load) server1:9081/string (works) - meenny_60187
Nimbostratus
So the flow would go something like this: Client goes to http://friendlyname Load balancer will load balance among the following URLs http://server1:9081/here http://server1:9082/here http://server2:9093/here http://server2:9084/here Then to complicate it further, I don't want traffic to redirect to a URL where the server or port is down.
- Jason_40733
Cirrocumulus
If the strings for the URL and the response are the same for each pool member, then a standard monitor that gives an accurate up/down will work fine for the server+port availability.
It looks like you have the same string each time. A quick URL re-write iRule will accomplish that. Someone else may know of a better method.
when HTTP_REQUEST { switch -glob [HTTP::uri] { "/" { HTTP::redirect "http://[HTTP::host]/here" } } }
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