Forum Discussion
Ramesh_Polarapu
Nimbostratus
May 11, 2008Load Balancer to forward the traffic when the Pool is down
In our setup we have a Virtual server MM1-Traffic and it has an iRule associated with it namely "Vantrix-v7.0". The purpose of this iRule is to differentiate the POST/GET in the HTTP requests and redirect the traffic to the pools Van-Get and Van-Post accordingly. Till now we have no issues as the traffic is going smooth and fine.
The customer have asked to implement redirection if any pools Van-Get or Van-Post are down redirect the traffic to another server/pool. I created Pool called MM1-Redirect, then created the iRules POST-Redirect & GET-Redirect and added this iRules to the MM1-Traffic virtual server but I am not able to see that the F5 redirecting the traffic if Van-Get or Van-Post pools are down.
Kindly advice and let me know if you need more information.
3 Replies
Sort By
- hoolio
Cirrostratus
Hi, - Ramesh_Polarapu
Nimbostratus
Hi Aaron, - hoolio
Cirrostratus
Hi Ramesh,when HTTP_REQUEST { Select a pool based on the HTTP method switch [HTTP::method] { "GET" { log local0. "[IP::client_addr]:[TCP::client_port]: GET request to [HTTP::host][HTTP::uri]" Check if the selected pool has available members if {[active_members Van-Get]}{ log local0. "[IP::client_addr]:[TCP::client_port]: using Van-Get pool" pool Van-Get } else { log local0. "[IP::client_addr]:[TCP::client_port]: using MM1-Redirect pool. Van-Get pool is down" pool MM1-Redirect } } "POST" { log local0. "[IP::client_addr]:[TCP::client_port]: GET request to [HTTP::host][HTTP::uri]" Check if the selected pool has available members if {[active_members Van-Post]}{ log local0. "[IP::client_addr]:[TCP::client_port]: using Van-Post pool" pool Van-Post } else { log local0. "[IP::client_addr]:[TCP::client_port]: using MM1-Redirect pool. Van-Post pool is down" pool MM1-Redirect } } default { Do something for non-GET/non-POST requests? If nothing is done, the request will go to the default pool on the VIP if one is configured. log local0. "[IP::client_addr]:[TCP::client_port]: Request method [HTTP::method] to [HTTP::host][HTTP::uri] was not GET or POST. " } } }
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