74
Chapter 4 Configuring Clusters
Persistent session failover in JRun
JRun can be configured to enable session persistence, meaning that all session data is
saved (persisted) upon the completion of every request. When a server that is servicing a
client's session goes down, the client's active session data can be retrieved intact from a
common data store (such as a JDBC database) by another server. When the client
attempts to continue its active session and presents its session ID to the replacement
server, its session data is restored from the repository, completing the session failover.
This feature is called
session swapping
. The client's session state is effectively swapped
from one server to another when the first fails.
Session swapping overview
The following are required to use failover for persistent sessions with ClusterCATS:
•
Session swapping must be enabled in JRun and ClusterCATS. For more information,
see
“Configuring JRun for session swapping” on page 74
and
“Configuring
ClusterCATS for session swapping” on page 74
, respectively.
•
Session-aware load balancing must be enabled. Because only one server can be
responsible for a session at a time, JRun session swapping must be used in
conjunction with the ClusterCATS session-aware load-balancing feature. This ensures
that multiple servers do not have concurrent access to the same session data. For more
information, see
“Session-aware load balancing” on page 72
.
•
A repository used for persistent session data must be shared among the JRun servers
in a cluster. For information, see
“Using shared files for session swapping” on page
75
. For an example of using JDBC to connect to a shared repository of session
information, see
“Using JDBC for session swapping” on page 76
.
•
Cookies must have domain scope for proper session swapping. For more information,
see
“Configuring JRun for session swapping” on page 74
.
Configuring JRun for session swapping
To enable session swapping in JRun, the following properties must be set in the JRun
server’s
local.properties
file:
session.swapping=true
session.maxresident=0
The
local.properties
file must enable domain scope for cookies by including the
following property:
session.cookie.domain=yourdomain.com
The repository used for session swapping can be a shared file or a shared JDBC database.
For information, see
“Using shared files for session swapping” on page 75
and
“Using
JDBC for session swapping” on page 76
.
Configuring ClusterCATS for session swapping
ClusterCATS must be configured to allow session swapping to function properly. The
following platform-specific procedures explain how to enable session swapping in
ClusterCATS.
Содержание COLDFUSION MX-CLUSTERCATS
Страница 1: ...macromedia Using ClusterCATS...
Страница 56: ...46 Chapter 3 Installing ClusterCATS...
Страница 118: ...108 Chapter 4 Configuring Clusters...
Страница 156: ...146 Index...