Forum Discussion

Chris_Bond_1573's avatar
Chris_Bond_1573
Icon for Nimbostratus rankNimbostratus
Aug 15, 2005

Maintence

Currently we're looking todo the following:

 

 

BIG IP -> SSL Off Load/Compression -> BIG IP Chooses best WEB Server to route request to (WMI CPU, Dynamic Ratio from initial talks). F5/ada are doing this for us on the trial period.

 

 

Its also worth meantioning the ssl setup, we're using two wildcard SSL Cert's.

 

 

However, we have the following scenerio that we'd like to do on the big-ip side and was wondering if anybody has a solution.

 

 

Say we want to upgrade a customers site https://clientname.domain.com/somevirtualdir/*. What we want todo is get the BIG-IP to stop sending those requests (which ever page they hit) over the normal webserver pool and instead redirect to a static htm page that says an upgrade is going on. Once the upgrade is finished we then want to revert back to the normal setup.

 

 

Hope this makes sense - im assuming its an irule and a combination of a vbs/.NET exe script to create an irule on the fly that disables takes priority over existing rules.

6 Replies

  • bl0ndie_127134's avatar
    bl0ndie_127134
    Historic F5 Account
    This rule should do the trick.

    
    when HTTP_REQUEST {
      if {[HTTP::host] equals "mydownhost.com" } {
          HTTP::redirect "http://www.mystatic.com/static.html"
      }
    }
  • What about a specifical directory too? As one site might have X amount of databases/sites hanging off it.

     

     

    Are they any examples of creating the irule on the fly via the Web Services? Do we have to be careful about placement ie. this rule needs to take priority over the other rules if it exists.
  • bl0ndie_127134's avatar
    bl0ndie_127134
    Historic F5 Account
    You should be able to get that path information using the ‘HTTP::uri’; I would recommend that you scan around the forum as there are plenty of good examples that should get you statted.

     

     

    As for configuration on the fly; we have a SOAP/XML interface called iControl that allows you to configure and modify configurations programmatically. Here is a link to its forum Click here

     

     

    Rules are specific to virtuals, therefore you can add/remove/modify a rule on virtual without affecting your other customers assuming that they are using different virtual addresses.
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    As for a rule using a redirect that includes the HTTP::uri, bl0ndie's right, there are some good examples.

     

     

    Here's one Click here

     

     

    -Colin
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    I might suggest you use a class/datagroup. That way you can dynamically update the class with hosts/uris that are offline and then you don't have to change the rule.

    IE:

    
    when HTTP_REQUEST {
       if { [matchclass [HTTP::host] equals $::offline_hosts] or \
            [matchclass [HTTP::uri] starts_with $::offline_uris] } {
          HTTP::redirect http://www.domain.com/offline
       }
    }

    You can then manage the offline_hosts and/or offline_uris datagroups via the GUI or iControl and it will dynamically take effect.

    You can also use priorities to specify that this rule always runs first.

    To do that, you add a priority statement with a number between 1-1000.

    If you add the statement before the when statement, then that is the default priority for all subsequent when statements. IE:

    
    priority 250
    when HTTP_REQUEST {
    }

    You can alternatively specify the priority after the event name in the when statement. In this case, the priority is changed only on that event. IE:

    
    when HTTP_REQUEST priority 250 {
    }

    This will make sure the this rule event runs before any other rule event with higher numbered priority. The default priority is 500.

  • Brilliant thanks for all your replies should be able to knock something up on unit now when it arrives.