JSESSIONID Persistence

Community Forum Forums Thunder and AX Series General JSESSIONID Persistence

This topic contains 2 replies, has 1 voice, and was last updated by avatar gpinero 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14212
    avatar
    gpinero
    Member

    Hi all. We have experiencing issues with the VIP with cookie persistence.
    Actual config:

    port 80 http
    no def-selection-if-pref-failed
    template http aaurl_switch
    template persist cookie Template_PERSIST_Cookie

    slb template persist cookie Template_PERSIST_Cookie
    expire 0
    match-type service-group

    The JBOSS admins comment that sometimes there are requests to several nodes with the same JSSESSIONID

    What is the configuration to do persistence based on the jsessionid?

    Thanks

    #14262
    avatar
    gpinero
    Member

    AFLEX to do it:

    when HTTP_REQUEST {

    # Check if there is a jsessionid cookie
    if { [HTTP::cookie exists “JSESSIONID”] } {
    # Persist off of the cookie value
    set jsess_id [HTTP::cookie “JSESSIONID”]
    log “Jession ID is $jsess_id”
    persist uie [HTTP::cookie “JSESSIONID”]

    } else {
    # Parse the jsessionid from the path (URI minus the query string)
    set jsess [findstr [HTTP::path] “JSESSIONID=” 31]

    # Use the jsessionid from the path for persisting
    if { $jsess != “” } {

    persist uie $jsess

    }
    }
    }
    when HTTP_RESPONSE {

    # Check if there is a jsessionid cookie in the response
    if { [HTTP::cookie exists “JSESSIONID”] } {

    # Persist off of the cookie value
    persist add uie [HTTP::cookie “JSESSIONID”]

    }
    }

    #14342
    avatar
    gpinero
    Member

    Working in PRO – JSESSION ID Cooki persistence:

    when HTTP_REQUEST {
    if { [HTTP::cookie exists “JSESSIONID”] } {
    set jsess_id [HTTP::cookie “JSESSIONID”]
    persist uie [HTTP::cookie “JSESSIONID”]
    } else {
    set jsess [findstr [HTTP::path] “JSESSIONID=” 31]
    if { $jsess != “” } {
    persist uie $jsess
    }
    }
    }
    when HTTP_RESPONSE {
    if { [HTTP::cookie exists “JSESSIONID”] } {
    persist add uie [HTTP::cookie “JSESSIONID”]
    }
    }

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Comments are closed.