In
most cases, the on demand router (ODR) does not require configuration to support
HTTP session affinity. However, some special cases exist where you must configure
the ODR to learn about backup servers that the back-end servers might be setting
on the session affinity cookie.
Before you begin
Create the ODR. The servers in your configuration must be in a generic
server cluster or a dynamic cluster. Do not configure the passive HTTP session
affinity on static clusters.
About this task
Passive HTTP session affinity is used in the following situations:
- When the ODR routes to servers that are not running WebSphere® Application
Server middleware products.
- When the ODR routes to WebSphere Application Server application servers
that are in different core groups that are not connected by the core group
bridge.
- When the application uses Java™ 2 Platform, Enterprise Edition (J2EE)
HTTP session affinity that is not standard.
Procedure
- Create and modify the session affinity
descriptor. In the administrative console, click Servers > Dynamic
clusters or Generic server clusters > cluster_name>
Custom properties > New.
- Define the session affinity descriptor properties. Create
a custom property to define the session affinity descriptor. Enter the name
of the custom property as HttpSessionAffinityPolicyDescriptor. The
value must be in the following format:
<learnCloneIDs>!@#<cookieNames>!@#<urlRewriteNames>!@#<delimiter>
- <learnCloneIDs>
Equals true or false. If true is
specified, the ODR parses the clone IDs from the Set-Cookie headers in the
response as the response flows back to the client. You must set this value
to true when you are routing to servers with session cookies that
contain the server clone information. If you do not know if the session cookies
from the servers contain the server clone information, or you know that the
session cookie from the servers does not contain the clone identification,
then set the value to false and set the Affinity mode to active-conditional.
- <cookieNames>
Specifies a comma-separated list of cookie names that can
be used to pass session information.
- <urlRewriteNames>
Specifies a comma-separated list of names to search for
in the Uniform Resource Locator (URL) for session information.
- <delimiter>
Specifies the delimiter that is used by the ODR when
extracting clone IDs from the session information.
Results
When the ODR processes a request, it obtains the session affinity
descriptor policy that is configured for the cluster to which the server belongs.
The method in which the server clone identification is obtained depends on
the property values of the policy attributes.