Forum Discussion
lardyboy_lardyb
Nimbostratus
Apr 27, 2005BEA Weblogic and specific failover using iRules
Can anybody out there help me???????
I need to be able to query a string in the HTTP header to determine the persistamce to a server, and it's corresponding backup (v9.0.4)
I will expand on this:
BEA WEblogic uses a JSESSIONID in the HTTP header to determine which server holds the primary connection and which server will be desingated a backup. I need to be able to load balance to any server, and interogate the JSESSIONID in the header in order to provide persistance, but (and here is the gotcha) I also need to be able to take the secondary server ID and use this to provide the fallback host scenario in the event of a primary server failure.
the JSESSIONID is constructed as
JSESSIONID=!!
where session ID is 52 characters long, and the primary/secondary IDs are 10 characters each.
How can I do this easily? (I know it is possible to force a designated backup for each primary server, but the customer does not want to have this level of administration on HIS head!!)
HELP!!!
4 Replies
- JRahm
Admin
I'd start here from another post:rule WeblogicJSessionPersist { when CLIENT_ACCEPTED { set add_persist 1 } when HTTP_RESPONSE { if { [HTTP::cookie exists "JSESSIONID"] and $add_persist } { persist add uie [HTTP::cookie "JSESSIONID"] set add_persist 0 } } when HTTP_REQUEST { if { [HTTP::cookie exists "JSESSIONID"] } { persist uie [HTTP::cookie "JSESSIONID"] } else { set jsess [findstr [HTTP::uri] "jsessionid" 11 ";"] if { $jsess != "" } { persist uie $jsess } } } }
when rule_init { array set ::server_definitions { server1_name 10.1.1.1 server2_name 10.1.1.2 } }
- JRahm
Admin
Here's how you can pull out the variables: - unRuleY_95363Historic F5 AccountOk, couple of things to add here:
- brad_11480
Nimbostratus
This looks like a great start but has anyone taken this further to select the BEA secondary server if the primary member is not available to service the request?
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