Forum Discussion
Mike_Easdon_615
Nimbostratus
Feb 02, 2009Advice on out of service pages
hello,
I have a conundrum with maintaining the out of service pages that serve our web sites when they are, well, out of service.
BigIP has the following configuration (basic description I know)
Virtual server for www.oursite.com
Pool with four members for www.oursite.com
The pool consists of the physical servers housing the web pages; two nodes are the site itself on the respective servers, two nodes are the out of service pages on the respective servers.
I activate the out of service pages by disabling two nodes (physical site) and enabling the other two (OoS pages)
I’ve noticed that the out of service pages only serve the root URL ie www.oursite.com and not a sub pages with the site ie www.oursite.com/member1
I’m not looking for the solution but more of a pointer in the right direction to ensure that regardless of the URL, any hit within www.oursite.com is redirected to the correct out of service page.
Thank you
- dennypayne
Employee
A generic rule like this would work fine:when HTTP_REQUEST { HTTP::redirect "http://www.oursite.com" }
if { [LB::status pool member ] eq "down" }
- dennypayne
Employee
I'm also assuming you're using priority groups within the pool... - L4L7_53191
Nimbostratus
Another possible approach is this:when HTTP_REQUEST { if { [active_members primary_pool] < 1 } { Your primary members are unavailable, so crop the URI and select splash page servers HTTP::uri "/" pool splash_pool } }
- Mike_Easdon_615
Nimbostratus
These are both great suggestions and I thank you both for your contribution. I'll test both methods and post back the results. Thank you once again. - hoolio
Cirrostratus
If the maintenance page contains references to other objects (like images or css, etc) you could rewrite the URI only if the request is to a page that hasn't been rewritten already. You would want to use a path and page that does not exist in the application already:when RULE_INIT { Use a prefix for the path that does not already exist in the application set ::maintenance_prefix "/maintenance/" The default maintenance page set ::maintenance_page "maintenance.html" } when CLIENT_ACCEPTED { Save the name of the default pool on the VIP set default_pool [LB::server pool] } when HTTP_REQUEST { Check if there aren't any active members in the default pool if { [active_members $default_pool] < 1 } { Primary members are unavailable. Check if the URI has not already been rewritten. if {not ([HTTP::path] starts_with $::maintenance_prefix)}{ Rewrite the URI to the maintenance prefix/maintenance page (/maintenance/maintenance.html) HTTP::uri "$::maintenance_prefix$::maintenance_page" } Use the maintenance pool pool splash_pool } else { Use the default pool pool $default_pool } }
- Mike_Easdon_615
Nimbostratus
Thanks again!
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