Forum Discussion

Richard__Harlan's avatar
Richard__Harlan
Historic F5 Account
Mar 23, 2005

Rule Processing Problem

When a rule to a Load balanceing site it look like it is only being run the first time the user connects to the site, not at each HTTP request like we need it to. We have 6 rules chain together that need to be processed at each http request. Below are three of the rules. Any help would be great. Thanks

 
  when HTTP_REQUEST {  
  if {[HTTP::uri] starts_with "/servlet" or  
     [HTTP::uri] starts_with "/en_US/ag/" or  
     [HTTP::uri] starts_with "/en_CA/ag/" or  
     [HTTP::uri] starts_with "/siteminder/english_login.jsp" or  
     [HTTP::uri] starts_with "/en_US/myequipment/" or  
     [HTTP::uri] starts_with "/en_US/ProductCatalog/FR" } {  
     persist source_addr  
     use pool dcagna }   
  }  
    
  when HTTP_REQUEST {  
  if { [HTTP::uri] starts_with "/de_DE"} {  
     persist source_addr  
     use pool dcagde  
  }  
  }  
    
  when HTTP_REQUEST {  
  if { [HTTP::uri] starts_with "/en_AU/"} {  
      persist source_addr  
      use pool dcaggs }  
  } 
 

2 Replies

  • drteeth_127330's avatar
    drteeth_127330
    Historic F5 Account
    The HTTP_REQUEST event is raised for each request even if the client sends mutilple requests on the same connection. If the rule chooses a different pool, then a new back-end connection will be established to the server. However, if the rule chooses the same pool, then the same backend connection will be used. Perhaps this is what you're seeing? Basically, BIG-IP performs per-connection load balancing with per-request content switching by default. If you add a OneConnect profile to the virtual server, then each request will be load balanced individually.
  • drteeth_127330's avatar
    drteeth_127330
    Historic F5 Account
    Are you expecting the LB pick to be reset to the default pool on the virtual server after each request? Unfortunately, this is not presently the case, which is a little confusing for HTTP_REQUEST rules. The simple work-around is to add an else pool default_pool to your rules. Thanks to UnRulely for pointing out that this might be the source of confusion.