Forum Discussion

JRahm's avatar
JRahm
Icon for Admin rankAdmin
Aug 02, 2006

WebLogic information extraction

Our weblogic servers will give me an active list of servers in the X-WebLogic-Cluster-List header if I supply the X-Weblogic-Request-ClusterInfo header with a value of true. This is the missing piece I've been trying to identify since weblogic stopped encoding the real server IP in network byte order in version 8. I'd like to populate an array with the servername and the unique arbitrary number it is assigned. By utilizing the rule


when HTTP_REQUEST {
  HTTP::header insert "X-Weblogic-Request-ClusterInfo" "true"
}
when HTTP_RESPONSE {
  if { [HTTP::header exists "X-WebLogic-Cluster-List"] } {
    log "Cluster list: [HTTP::header "X-WebLogic-Cluster-List"]"
    HTTP::header remove "X-WebLogic-Cluster-List"
  }
}

I receive the information below:

-306262974!server_a-93!65535!-1 |

-572170000!server_c-93!65535!-1 |

-851958269!server_b-91!65535!-1 |

-896443913!server_d-93!65535!-1 |

-937189304!server_b-90!65535!-1 |

1685710619!server_c-92!65535!-1 |

1717517013!server_d-90!65535!-1 |

1720885579!server_d-91!65535!-1 |

1949732605!server_b-93!65535!-1 |

296784837!server_c-90!65535!-1 |

324405524!server_c-91!65535!-1 |

472005059!server_d-92!65535!-1 |

534925464!server_b-92!65535!-1 |

548600573!server_a-90!65535!-1 |

82670729!server_a-92!65535!-1 |

894452575!server_a-91!65535!-1

I'm looking for advice on the best way (read: efficient) to extract the servername and the leading arbitrary number associated to it. I know the real IP address for each of those server names, so what I'd like to do is evaluate the JSESSIONID information arriving (jsessionid!primary_server!secondary_server) and send connections to primary_server based on information in the array, and in the LB_FAILED event, send connections to the secondary_server. I'm struggling with getting persistence to behave nicely in failure scenarios and I am looking at alternatives. Any help would be appreciated.

18 Replies

  • From the description in the wiki:

     

     

     

    LB::reselect

     

    * Selects the next available member in the current pool, based on pool Load Balancing options

     

     

    LB::reselect

     

    * Selects the next available member in the specified pool, based on the Load Balancing options of that pool

     

     

     

    It appears that the LB::reselect utilizes the pool LB method. How then do I combine the LB::mode command to reselect outside of the normal load balancing method?
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    Sheesh, this thread is getting long...

     

     

    Here's the caveat: The reselect doesn't actually occur until the LB_FAILED event is finished executing. So, doing an [LB::server addr] in the same execution is going to return the same value, no matter how many times you call LB::reselect. Think of it as indicating that you want to reselect. The LB_FAILED event should get raised again if the new reselected server also fails.

     

  • I think I'll try upgrading first, then open a case if that doesn't work. I'll post back results. Thanks for the help.
  • I upgraded to 9.2.3, and we are now getting the lb_failed event to trigger. All of our 502 errors are now gone, but we still have some weird timeout behavior. Our configuration for testing is:

     

     

    LoadRunner -> F5 webtier -> Apache Servers -> F5 apptier -> WebLogic Servers

     

     

    The rule is on the F5 apptier, and once loadrunner has ramped up and stabilized in its scenario, we fail a physical server, which kills four of the sixteen weblogic instances. The upgrade eliminated the immediate failures, but loadrunner receives timeouts at the two minute IE timeout. Apache however, waits for, and eventually receives, the 200/302 valid responses from teh F5 apptier. They come in bunches at about 80 sec, 150 sec, 180-190 sec, and 300 sec. Is there anyway to configure around this?
  • Hi Jason, Can you please tell us what configuration setting you used on Apache / F5 to get it working .We have little different issue but layer are same like your

     

     

    F5webtier -- Apache --F5AppTier -- Weblogic ( how did you get this working ? ) Please suggest.

     

  • Posted By Paresh Birla on 02/09/2011 05:55 AM

     

    Hi Jason, Can you please tell us what configuration setting you used on Apache / F5 to get it working .We have little different issue but layer are same like your

     

     

    F5webtier -- Apache --F5AppTier -- Weblogic ( how did you get this working ? ) Please suggest.

     

     

    What's the issue you're seeing?
  • I wasn't on the apache team, unfortunately. They gave me a set of requirements at functionality they were pulling out and I took it from there. The biggest thing for me was supporting persistence for clients with or without cookies enabled. For those with cookies enabled, we did a simple cookie insert. For those that didn't, we extracted the jsessionID and stored that and the server IP in the session table. When a request came in, if the inserted cookie was not present, we'd look for the jsession in the URI and then use the host from the session table to map the request accordingly. The logic left in Apache on those apps was whether or not the request was ssl or not since at the time we weren't offloading SSL on the front-tier LTM.
  • Hi Jason

     

    This is a really interesting discussion you've started here and something I've been looking into myself (to simplify the architecture by removing an Apache/OHS layer for load balancing within the application zone).

     

    Did you manage to resolve your issues and get this iRule into production? I've been intending to mock up something similar myself so it's great to see the path has already been trodden but I'm wondering if there's any sort of fundamental show stopper here.

     

    TIA!

     

    Simon