This topic describes how to configure passive HTTP session affinity
in the on demand router (ODR).
在您开始之前
When routing to a cluster of WebSphere Application Server servers,
the (ODR) typically requires no configuration to support HTTP session affinity.
The following are sample scenarios in which configuration is required:
关于本任务
- The ODR routes to non-WebSphere Application Server servers.
- The ODR routes to WebSphere Application Server servers which are in a
different core group and no core group bridge links the core groups.
- An application uses non-standard Java 2 Platform, Enterprise Edition (J2EE)
HTTP session affinity.
Use the following configuration to support these scenarios for both generic
server clusters and dynamic clusters. It is not supported for static clusters.
Add a custom property to a generic server cluster or a dynamic
cluster with the name HttpSessionAffinityPolicyDescriptor and
a value of the following format: <learnCloneIDs>!@#<cookieNames>!@# <urlRewriteNames>!@#<delimiter>where:
- <learnCloneIDs> is either true or false.
If <learnCloneIDs> is true, the ODR
parses the clone IDs from Set-Cookie headers in the response as they flow
back to the client. This is necessary in the first two scenarios above because
the ODR has no other way to learn the clone ID of a server. If the <learnCloneIDs> value
is false, the ODR does not read the clone IDs from responses.
- <cookieNames> is a comma-separated list of cookie
names that can be used to pass session information.
- <urlRewriteNames> is a comma-separated list of names
to search for in the URL for session information.
- <delimiter> is the delimiter used by the ODR when
extracting clone IDs from the session information.
If a request is routed to a cluster with
HttpSessionAffinityPolicyDescriptor configured,
the ODR reads the session information in the following format:
<sessionID><delimiter><cloneID><delimiter><cloneID>...
结果
The ODR does not read the <sessionID>. The
ODR uses the configured delimiter to extract the <cloneID> from
the session information. The ODR finds the session information as the value
of a cookie or in the URL.
The following is the default value of HttpSessionAffinityPolicyDescriptor for
each cluster:
false!@#WSJSESSIONID,JSESSIONID,SSLJSESSIONID!@#jsessionid!@#:
false indicates
that clone IDs are learned directly from the servers rather than parsing responses. WSJSESSIONID,JSESSIONID,SSLJSESSIONID causes
the ODR to look for three different cookie names to find session information,
and then jsessionid in the URL. The final ":" denotes
the delimiter character to use when extracting clone IDs from the session
information.