Chapter 2. Distributed Session Servers

Table of Contents

2.1. Overview
2.2. Basic Concepts
2.3. Server Structure
2.4. Server Process
2.5. Duplicate Login Prevention
2.6. Failback
2.7. Maintaining Sessions for Multiple Requests
2.8. Session Cluster Modes
2.8.1. Default Session Cluster Mode
2.8.2. Domain-wide Session Cluster Mode
2.8.3. Specially-defined-scope Session Cluster Mode
2.9. Basic Configuration for a Session Cluster
2.10. Configuration for Each Session Cluster Mode
2.10.1. Session Clustering for Each Session Cluster Mode
2.10.2. Distributed Session Server Configuration Screens
2.10.3. Distributed Session Server Configuration Details

This chapter describes the structure, operation, and configuration of distributed session server that are used for session tracking in clustered environments.

2.1. Overview

Session servers are used to manage or back up client session data. They are especially useful when managing session data from multiple web servers and servlet engines in a clustered environment. Distributed session servers are used to manage session data.

Note

Prior to JEUS v7.0, central session server was used in general. Due to problems with centralized management of the system, only distributed session servers are used in JEUS v7.0 and later.

2.2. Basic Concepts

Distributed session servers provide session clustering with enhanced scalability and safety. They enhance performance in a large scale clustered environment.

Distributed session servers have the same basic functionality as the central session server. In a clustered environment with many servlet engines, they allow sessions to persist even if a sequence of requests from the same client is not handled by the same servlet engine.

Distributed session servers mean that the managing agents of the sessions are distributed which provides high degree of scalability.

The following is a summary of distributed session server's characteristics.

  • It is possible to persist sessions in a clustered environment composed of many servlet engines.

  • Even if the servlet engine fails while processing a request, other servlet engines can continue to process the request without losing the session.

  • Scaling is easy because of the distributed protocol.

2.3. Server Structure

Distributed session servers use a distributed structure in which the servers that manage session objects are distributed to each servlet engine (web engine) or EJB engine.

When using distributed servers, a separate distributed session server exist in each engine of the cluster, and they provide continuous services by communicating with other distributed session servers.

The following diagram shows the session clustering structure with four web engines.

[Figure 2.1] Distributed Session Servers - Structure

Distributed Session Servers - Structure

The arrows in the previous structure map represent possible socket connections between the distributed session servers. Instead of having all sockets always be connected to each other, they connect and maintain the connection only when they need to communicate with other engines in order to maintain a session.

The following diagram shows the internal structure of a distributed session server, which is a subcomponent of the web engine.

[Figure 2.2] Distributed Session Servers - Internal Structure

Distributed Session Servers - Internal Structure


  • Session Manager

    • A module that oversees session management of the engine. It retrieves and manages both local and remote sessions.

    • The local web engine uses getSession to obtain session objects from the session manager.

      To get a session, the web engine first tries to get a cached session from the memory, then a local storage session via getLocalStorageSession, and then a remote session via getRemoteSession.

    • If cached sessions are not used before the passivation timeout, they are saved to a file using passivateLocal and removed from the memory.

    • If a remote backup exists, modified sessions are backed up using the backupSession method to the distributed session server that is designated as the backup server in the remote web engine.

      The 'Backup Level' setting is used to determine if a session has been modified. A session is considered modified when a session operation, such as setAttribute, removeAttribute, and setMaxInactivateInterval, is called while the 'Backup Level' is set to "all", the 'Backup Level' is set to "get" and a getter or setter method is called, or the 'Backup Level' is set to "set" and a setter method is called. For details about this configuration, refer to "2.10.3. Distributed Session Server Configuration Details".

    • When a remote web engine sends a migrate request, the session is returned from a cached session or the local storage in that order. The session in the local storage is deleted transferring the session ownership to the remote session server.

  • Backup Store

    • Backup Store manages the backup session objects that are periodically sent from another engine's distributed session server. This backup session object provides a replacement session if a failure occurs in the engine that contains the original session.

    • It receives the backup sessions from the remote web engine which is designated as a backup, and then saves and manages the backup session using backupSession and getBackupSession methods.

    • If the cached session is not used before the passivation timeout, it is saved using the passivateBackup method and then removed from the cache.

    • When the conditions are met for locally modified session objects, they are backed up to the distributed session server. Once the request is complete, the modified session objects are immediately backed up so that failover can be performed in case of a system failure.

    • If a migrate request is sent to the backup store from a remote web engine, the session is returned from the cache or local storage in that order.

  • Dynamic Remote Web Engine

    • Dynamic Remote Web Engine is a module that acts as a mediator when a specific operation is performed on a session in the remote web engine.

      This engine operates by considering the dynamic nature of the environment. It selects an appropriate backup every time a server is added or removed. This is one of the major changes in JEUS that is not related to environment configuration. The connection to the remote engine is verified through SCF instead of constant pinging to avoid sending repeated error messages for an ongoing error situation.

      Note

      Previous versions of JEUS only recognizes the backup engine that is fixed in the configuration file. Now, it is designed to allow dynamic changes to the remote engine.

  • Session Packet Handler

    • The module that initially handles and distributes a session operation request from remote engines.

2.4. Server Process

By default, distributed session servers use session routing. Session routing attaches the name of a specific session server to the session ID so that it knows which server contains the session data. Performance is enhanced when session routing is used.

Web servers that support session routing route requests to the web engine that contains the required session object. Session routing works in the same way for distributed session servers. For additional information, refer to "1.3.2. Session Tracking in Clustered Environments".

A session key is used for distributed session servers that use session routing.

The following example shows a session key being used in a web engine.

<SessionID>.<primary-engine-name>
   Example) XXX.domain1/server1

ValueDescription
XXXSession ID. The actual session ID is a random string that is longer in length.
domain1/server1Routing information. A servlet engine named domain1 is used.

Each engine is assigned a session routing ID for session routing that identifies the web engine when it connects to the web server. The session routing ID is automatically created according to its configuration. For the three web engines in [Figure 2.3], it is assumed that the session routing ID and back up server's session routing ID are assigned as follows:

  • Web engine (server1)

    • Session routing ID: domain1/server1

    • Session routing ID of the backup server: domain1/server2

  • Web engine (server2)

    • Session routing ID: domain1/server2

    • Session routing ID of the backup server: domain1/server3

  • Web engine (server3)

    • Session routing ID: domain1/server3

    • Session routing ID of the backup server: domain1/server1

The following diagram shows the failover structure of session tracking that uses the session routing ID assigned to each distributed session server.

[Figure 2.3] Distributed Session Servers - Failover Structure

Distributed Session Servers - Failover Structure


The following describes the failover structure in [Figure 2.3].

  1. The web server checks the session routing ID and attempts to send the request to web engine server1, but server1 has failed.

  2. The web server arbitrarily selects a different web engine and sends the request. In this example, server3 is selected.

    server3, which received the request from the web server, checks the session routing ID and determines that server1 contains the session object for the request, and that the backup exists in server2.

  3. server3, which is a distributed session server, attempts to retrieve the session object by connecting to server1, but the request fails due to the failure of server1.

  4. Because the request failed, server3 attempts to connect to the backup server, server2. Server2 returns the backup of the requested session object to server3.

  5. Server3, which has successfully retrieved the session object, processes the client request and sends the response message to the client. A new session key is created and sent, the client's session key is modified, and future requests are forwarded to server3. When a new session key is created, only the session routing ID is changed.

Web servers cannot provide session routing in situations where the request cannot be sent because the web engine has failed or there is no connection to the target web engine.

The following describes [Figure 2.3] for distributed session servers where session routing is not used.

  1. Without session routing, the session ID does not exist. The web server tries to send a request to an arbitrary web engine. In this example, web engine server1 is selected.

  2. The web server detects that server1 has failed and selects another web engine, server3, and sends the request again.

  3. Because server3 does not know the routing information of the session, it sends a request to the currently connected distributed session server, server1, but the attempt fails.

  4. The distributed session server sends the request to server2, and server2 returns the session.

  5. Server3, which received the session, sends the unmodified session key to the client. As a result, the next request may not be sent to server3 that contains the session.

    Note

    For explanation purposes, the routing information was written out as 'domain1/server1' but, this information is encoded during operation.

2.5. Duplicate Login Prevention

This section describes duplicate login prevention function that is newly added to distributed session servers.

Distributed session servers provide duplicate login prevention function that include the basic duplicate login management functions provided by applications.

Duplicate login prevention of distributed session servers prevents duplicate login using a single application ID. When the same ID is used to log into two different sessions, the existing session is removed to prevent duplicate login.

To prevent duplicate login, the login manager is configured similar to the existing central session server. A server that stores the login information is specified among the servers in the cluster, and a secondary server is configured to prepare for failure.

Duplicate login prevention can be configured for each application and login information is managed per application. The <use-jeus-login-manager> setting must be set to true in jeus-web-dd.xml.

[Figure 2.4] How to Detect Duplicate Login

How to Detect Duplicate Login

The following is description of [Figure 2.4].

  1. Client A using SessionA tries to log into Web EngineA with the ID, UserA.

  2. Web EngineA registers the login information in the Login Manager.

  3. The Login Manager sends ACK for the login to Web EngineA.

  4. Web EngineA sends a response to Client A.

  5. Client B that is using SessionB tries to log into Web EngineB with the ID UserA.

  6. Web EngineB registers login information in the Login Manager.

  7. The Login Manager detects a duplicate login.

  8. The Login Manager tells Web EngineA to discard the existing session SessionA and Web EngineA deletes the session.

  9. The Login Manager sends ACK for the login to Web EngineB.

  10. Web EngineB sends a response to Client B.

Note

Since login event occurs in an application, methods for sending a login event from the JEUS Login Manager are limited. Jeus Login Manager recognizes a login event when the setAttribute is executed with the "JEUS_LOGIN_KEY". This value can be changed to "jeus.application.login.key" in jeus-web-dd.xml. Logout can be executed by using removeAttribute with the same key. Invalidated sessions are logged out automatically.

2.6. Failback

This section describes failback for distributed session servers.

Failback is a basic function for session servers. It allows for a service to continuously operate even during a failure situation. That is, although a failure occurs in a server, a session is not lost and continuously provides a service because the session’s backup is dumped to another session.

Failback provided by JEUS is for not only one failure but also consecutive failures, such as multiple servers' consecutive restart, and recovery of a server with a failure. The following explains this with a scenario that two servers restart consecutively.

The following figure shows the scenario when failback is not supported.

[Figure 2.5] If Failback Is not Supported

If Failback Is not Supported

If Server1 restarts, session A that belongs to the Server1 exists only in Server2 as backup. If Server2 restarts later, its backup will be removed, which means that the session A is removed from the entire system. If there is a request for the session A, an existing session cannot be used and a new session will be created. This is because session backup is not processed in previous distributed session servers.

The following figure shows the scenario when failback is supported.

[Figure 2.6] If Failback Is Supported

If Failback Is Supported

When Server1 restarts, DumpToBackup for session B is the same as in the case that failback is not supported. Additionally, session A in Server1 is recovered by performing failback with backup of session A in Server2. Even after Server2 restarts later, all sessions are maintained.

Note

Even though failback is not supported, a session is maintained if there is an access to the session when a server failure occurs (failover). This is possible because a backup session exists. The accessed session is backed up again to another server (DumpToBackup), it can operate normally. For this, some web servers try to maintain all sessions by accessing them.

Failback is basically executed based on the request-response method.

When server A is used as a backup server for server B, failback starts if the server A detects that the server B restarts.

  1. Server A checks whether server B restarts and to have backup of server B's sessions.

  2. If the server A confirms that it has the backup of the server B's sessions, it sends a request to the server B whether the server B will be failed back.

  3. The server B sends a response to the server A for failover.

  4. The server A transfers backup of the server B's sessions to the server B.

Note

If OOM occurs, failback is not recommended. If too many sessions are backed up, failback may cause OOM continuously. Failback is supported for rolling patches because servers need to be restarted consecutively without a session disconnection.

2.7. Maintaining Sessions for Multiple Requests

This section describes how to process multiple requests that use sessions.

A session is an object used for a request. Session specifications do not guarantee session manipulation in another JVM or thread. The manipulation must be guaranteed by an application, which is not recommended.

If an application needs to send concurrent requests, the requests must be either sent to different sessions or must not use a session. This is required for a normal operation. However, some recent applications are implemented for multiple requests using a shared session.

The following issues may occur when multiple requests are processed using sessions.

  1. Multiple sessions can be created at the same time. Since only one of them is maintained using a cookie, memory is wasted.

    This issue occurs when requests are sent to different JVMs or processed at the same time. Since a new session is created by default if there is no available session, concurrent requests result in creating multiple sessions. The sessions are stored in cookies of a user browser. Since the cookies are managed within one scope, the last session information overwrites all the other session information. Therefore, the other sessions cannot be accessed and removed after a timeout period.

  2. A session may not be maintained according to a method for maintaining the session in multiple JVMs. This issue is related to sticky session routing and occurs only when requests are sent to multiple servers or web engines. When multiple requests are sent to multiple JVMs at the same time, sessions may be lost according to a session maintaining method.

  3. Multiple sessions may not be updated if they are tried to be updated at the same time.

    This issue occurs only when requests are sent to multiple servers or web engines like in the above issue. Since one request must be sent to update one session, updating multiple sessions has the similar issue that occurs when creating multiple sessions.

The above three issues can occur in any environment as well as JEUS. JEUS performs migration to efficiently use local sessions, which may result in the occurrence of the second issue.

[Figure 2.7] When a Session is Lost

When a Session is Lost

As described above, no issue occurs when concurrent requests are sent to the same server or web engine. However, if an application sends concurrent requests to multiple servers or web engines, sessions are lost as in the above figure. To prevent this, migration, which is used to efficiently use local sessions, can be disabled.

The following figure shows how to disable migration.

[Figure 2.8] Disabling Migration

Disabling Migration

Although concurrent requests are sent to multiple servers, sessions are not migrated and copied for local manipulation. Manipulation results are updated in a server with ownership of each session. Disabling migration prevents losing sessions and has no issue when used to simply check session values. However, since the issues 1 and 3 still exist, disabling migration is not recommended.

Note

Since a session is a temporary object used to save and manage simple information, it must not be used like a database which exists in all systems. Use a session only to refer to an object value. It is not recommended to use a structure or configuration in which multiple requests are sent to multiple servers concurrently.

2.8. Session Cluster Modes

This section describes JEUS session cluster modes.

Session clustering is used to share sessions. Sessions must be shared within the same scope and must not be shared in different scopes. A session scope is determined according to a cluster mode.

JEUS supports the following three session cluster modes.

2.8.1. Default Session Cluster Mode

JEUS supports the default session cluster mode by default.

When servers are clustered, this mode is supported automatically and session data can be shared and used by the servers. Since this mode complies with servlet's basic session scope specifications, each application can manage a session independently and basic session clustering functions, such as failback and load balancing, are supported. The default scope is an application. Clustered servers can be a scope by using the Shared option provided by a web engine session manager.

2.8.2. Domain-wide Session Cluster Mode

In the domain-wide session cluster mode, all applications deployed in servers within a domain are regarded as a scope.

The default session cluster mode is restricted (targets to be deployed in a server) by a cluster structure because the mode depends on the cluster. In JEUS v6.0, different applications are deployed in each container and all containers' sessions can be shared. The following sample scenario describes more details.

  • There are two nodes and each node has two containers.

  • A different application is deployed in each container. That is, a total of four applications exist.

  • Sessions in the same node can be shared using the Shared option. Sessions in the other node can be shared using a central session server.

  • As a result, all sessions in the four containers can be shared.

The above scenario does not match the server cluster concept. Since all applications must be shared in a cluster, an application is forcibly deployed in all servers in the cluster. In a reliable environment, forcibly deployed applications may waste resources. However, they prevent the occurrence of a service not being available because a deployed application only physically exists in a specific server even though the server is included in a cluster. Therefore, a server must not be clustered to deploy a different application in each server.

The DOMAIN_WIDE mode is used to use a session cluster without a server cluster. The mode does not comply with domain structure specifications and is supported for user convenience. Note the following restrictions.

  • The mode is not related to EJB and only affects web applications.

  • If a server cluster as well as the mode are configured, the server cluster configurations will be ignored.

  • If the mode is set in domain.xml of a domain, it is applied to all servers in the domain. Some servers in the domain cannot be specified as a target of the mode.

  • Since the Shared option is set to 'true', sessions of all applications in all servers are forcibly shared.

Note

The domain-wide session cluster mode overrides server clusters.

2.8.3. Specially-defined-scope Session Cluster Mode

In the specially-defined-scope session cluster mode, specific applications are grouped and their sessions are shared regardless of a server cluster. This mode is used when multiple application groups exist while the basic session cluster or domain-wide session cluster mode is used when only one application group exists (in most cases).

If there are multiple application groups, sessions of applications included in a specially-defined scope across selected groups are shared. The session cluster has a different scope from distributed session servers, but it operates in the same way as the servers. Through the specially-defined-scope session cluster mode, sessions can be shared between server clusters and multiple scopes can be configured for a single server.

The following example describes the specially-defined-scope session cluster mode.

[Figure 2.9] Example of a Specially-defined-scope Session Cluster Configuration

Example of a Specially-defined-scope Session Cluster Configuration


  • server1 and server2 are included in a server cluster named Server Cluster1.

  • server3 and server4 are included in a server cluster named Server Cluster2.

  • The same applications must be deployed in all servers in a JEUS server cluster.

    • Applications A and C are deployed in both server1 and server2.

    • Applications B and D are deployed in both server3 and server4.

  • Sessions of applications A and B are shared only in each server cluster through distributed session server clustering.

  • Sessions of applications C and D can be shared across the clusters through specially-defined-scope session clustering of distributed session servers. That is, sessions of the applications can be maintained and managed in all servers: server1, server2, server3, and server4.

Specially-defined-scope session clustering allows various application configurations, and are not restricted by specific clusters.

Note

To share a session between applications, a common URL to be used by the applications is necessary due to a restriction in browsers and cookies, not JEUS. Applications using session clustering must have a common URL, and the URL must be set in a session cookie path.

2.9. Basic Configuration for a Session Cluster

This section describes the basic configuration of a session cluster.

A session cluster is used to share sessions. In addition to the cluster, to share sessions, a distributed session server operates in a web engine and supports related functions. The operations and functions can be configured using WebAdmin.

The following describes how to configure basic session cluster information applied to an entire domain by using WebAdmin.

Select [Session] from the left menu of WebAdmin to display a session cluster configuration page.

The following shows a page for basic configurations applied to an entire domain.

[Figure 2.10] Basic Configuration for a Session Cluster

Basic Configuration for a Session Cluster

The Session screen is divided into Session Cluster and Specific Scope Cluster areas. The Session Cluster area is classified into configurations applied to an entire domain and common cluster configuration.

  • Session Cluster

    ItemDescription
    Cluster Mode

    Session cluster mode.

    • DEFAULT: support a session cluster only when there is a server cluster. A session cluster in application units is supported by default. To use the SPECIFIC_SCOPE session cluster mode, use this value. (Default value)

    • DOMAIN_WIDE: support a session cluster where sessions for all applications in all servers in a domain are shared.

    Each session cluster mode has a different scope, but uses the same distributed session server configuration options. For information about how to configure clustering methods and distributed session servers for each mode, refer to "2.10. Configuration for Each Session Cluster Mode".

    Session Manager Provider

    Implementation to be used as a session manager. An entire package name or a reserve word (RUNTIME or JEUS) can be set.

    • RUNTIME: use an implementation that is not a JEUS provider, if one exists. (Default value)

    • JEUS: use a JEUS implementation.

    Exclude Das in Cluster

    Option to exclude DAS from a session cluster. This has an effect only on the domain-wide session cluster mode.

    • true: DAS operates as a standalone server even though the DAS is included in a cluster.

    • false: DAS operates as a cluster member like other servers if the DAS is included in a cluster. (Default value)

    Properties Properties are applied to all clusters and session servers in a domain. A pair of a key and a value can be set.
    Sticky Encoding Rule

    Encoding rule to be applied to sticky routing target information. Currently, the following two rules can be set.

    • BASE64: encode information by using the BASE64 rule in order to not expose the engine or domain information through a session ID. (Default value)

    • RAW: do not encode information. This value is used for debugging because it is difficult to determine an engine that sent a request by using encoded information or when there is no security issue even though an engine name has been exposed.

2.10. Configuration for Each Session Cluster Mode

This section describes where and how a session cluster and a distributed session server can be configured for each session cluster mode.

2.10.1. Session Clustering for Each Session Cluster Mode

The following describes how to configure a session cluster for each session cluster mode.

Default Session Cluster Mode

The following is the process of configuring a server cluster to use the default session cluster mode.

  1. Select [Clusters] from the left menu of WebAdmin to display the Clusters screen.

  2. Click [LOCK & EDIT] to modify configurations.

  3. To add a cluster, click [ADD]. Or, to modify a cluster, select a cluster from the displayed cluster list.

    [Figure 2.11] Clustering - Cluster List

    Clustering - Cluster List

  4. Select servers from 'Servers' to be included in a cluster, and then click [OK].

    [Figure 2.12] Clustering - Selecting Servers to be Clustered

    Clustering - Selecting Servers to be Clustered

  5. To dynamically apply the configuration, click [Activate Changes].

  6. If the configuration is applied, the following message will be displayed.

    [Figure 2.13] Clustering - Result

    Clustering - Result

    Note

    The clustering configuration is dynamically applied to distributed session servers. However, applying the configuration to application-scope session servers may require restarting the servers according to deployed applications.

Domain-wide Session Cluster Mode

The following is the process for using the domain-wide session cluster mode.

  1. Select [Session] from the left menu of WebAdmin to display the Session screen.

  2. Click [LOCK & EDIT] to modify configurations.

  3. Select 'DOMAIN_WIDE' in 'Cluster Mode'.

    [Figure 2.14] Domain-wide Session Cluster Mode

    Domain-wide Session Cluster Mode

  4. To apply the configuration, click [Activate Changes].

  5. If the configuration is applied, a result message will be displayed. Since the configuration is not applied dynamically, the server must restart to actually apply the configuration.

Specially-defined-scope Session Cluster Mode

The specially-defined-scope session cluster mode can be regarded as a detailed mode of the default session cluster mode. To use this mode, configure the default session cluster mode in detail.

The following is the process for using the specially-defined-scope session cluster mode.

  1. Select [Session] from the left menu of WebAdmin to display the Session screen.

    [Figure 2.15] Selecting a Session

    Selecting a Session


  2. To add a cluster, click [ADD] at the bottom of the screen. In the displayed Session Cluster Config page, which is the same as the page in the Clusters screen, configure a session cluster.

    [Figure 2.16] Adding a Session Cluster

    Adding a Session Cluster


  3. To apply the configuration, click [Activate Changes].

  4. To deploy an application in this mode, configure a session cluster in <target-session-cluster> of jeus-web-dd.xml.

Note

Since a session cluster depends on applications, a session cluster must be selected and configured in jeus-web-dd.xml.

2.10.2. Distributed Session Server Configuration Screens

A distributed session server can be configured in the following three screens in WebAdmin.

Common Cluster Config

Select [Session] from the left menu of WebAdmin to display the Session screen.

[Figure 2.17] Selecting a Session

Selecting a Session

Under the figure [Figure 2.10], the following part is located. For information about each item, refer to "2.10.3. Distributed Session Server Configuration Details".

[Figure 2.18] Configuring a Distributed Session Server - Common Cluster Config

Configuring a Distributed Session Server - Common Cluster Config

Configurations in Common Cluster Config are applied or not applied according to the value in Cluster Mode (described in "2.9. Basic Configuration for a Session Cluster").

ClassificationDescription
The default session cluster mode (DEFAULT)Configurations in Common Cluster Config are used when there is no configuration for a distributed session server based on a server cluster. If there is no server cluster or there are configurations for a server cluster, these configurations will be ignored.
The domain-wide session cluster mode (DOMAIN_WIDE)Configurations in Common Cluster Config are used as configurations for a distributed session server that are applied to an entire domain.
The specially-defined-scope session cluster mode (SPECIFIC_SCOPE)Configurations in Common Cluster Config are used when there is no configuration for the specially-defined-scope session cluster mode. If there are configurations for a cluster in the mode, these configurations will be ignored.

Cluster Session Cluster Config

Select [Clusters] from the left menu of WebAdmin to display a cluster list.

[Figure 2.19] Clustering - Cluster List

Clustering - Cluster List

Select a cluster and then click the [Session Cluster Config] tab to configure the distributed session server.

[Figure 2.20] Configuring a Distributed Session Server - Session Cluster Config

Configuring a Distributed Session Server - Session Cluster Config

The configurations have an effect only on the default session cluster mode. If these configurations are not specified, configurations in Common Cluster Config are used for one or more session clusters. Different configurations can be used for each server cluster. For more information about the items on this screen, refer to "2.10.3. Distributed Session Server Configuration Details".

Specific Scope Session Cluster Config

Select [Clusters] from the left menu of WebAdmin to display a list of session clusters with a specially defined scope under the figure [Figure 2.10].

[Figure 2.21] List of Clusters with a Specially Defined Scope

List of Clusters with a Specially Defined Scope

Select a cluster name to display the configurations for the distributed session server.

[Figure 2.22] Configuring a Distributed Session Server - Specific Scope Cluster

Configuring a Distributed Session Server - Specific Scope Cluster

The configurations have an effect only on the specially-defined-scope session cluster mode. If these configurations are not specified, configurations in Common Cluster Config are used for one or more session clusters. Different configurations can be used for each scope. For more information about the items in this screen, refer to "2.10.3. Distributed Session Server Configuration Details".

2.10.3. Distributed Session Server Configuration Details

The following describes screens and items in the screens for configuring a distributed session server.

[Figure 2.23] Configuring a Distributed Session Server

Configuring a Distributed Session Server

  • Basic Information

    ItemDescription
    Reserved Thread Num

    Number of threads in the system thread pool.

    Only recommended for use if a service requires preallocated threads.

    Connection TimeoutTimeout value for opening a connection between session servers in the web engine.
    Read TimeoutRead timeout value for communication between session servers in the web engine. After sending data, this is the maximum amount of time to wait for a response.
    Allow Fail BackOption to use JEUS failback.
    Backup Level

    Session standard used when backing up a session to a remote web container or a local database file.

    • access: Updates each session attribute and backs up specific attributes that calls setAttribute, putValue, removeAttribute, removeValue, getAttribute, and getValue. (Default value)

    • set: When the session's setAttribute, putValue, removeAttribute, or removeValue method is called, the session is considered modified and the session object is backed up.

    • get: When the session's setAttribute, putValue, removeAttribute, removeValue, getAttribute, or getValue method is called, it is considered modified and the session object is backed up.

    • all: Backs up all sessions. When the session's HttpServletRequest.getSession() is called, it is considered modified and the session object is backed up.

    Backup Unit Size

    Maximum number of transferred sessions to be backed up at the same time.

    Backup Queue Size

    Size of a queue that saves sessions that are not transferred normally to be backed up due to network delay.

    If there is no backup in a distributed session server, a session may be lost in a failure situation. Therefore, if the queue is full, a request is delayed so that a flow control can be performed without an issue.

    Ignore Flow ControlOption to allow a service to continue even if a backup queue is full. This is used to ignore session loss in order to continue a service.
    Prevent MigrationOption to use to perform migration to maintain sessions. If set, sessions will be maintained more reliably, but performance will decrease because requests will be continuously sent to a server with the first session.
    Failover DelayAmount of time to wait for recovery when an engine fails. This is the timeout for the other engines besides the failed one to reconnect to the cluster.
    Restart DelayWhen an engine shuts down normally, this is the timeout for the other engines to reconnect to the cluster. This setting enhances the performance for a restart which is the most frequent case of shutting down a web engine.
    PropertiesProperties applied to a session cluster. A pair of a key and a value can be set.

  • Jeus Login Manager

    Configures the primary and a secondary servers of Jeus Login Manager that performs duplicate login prevention. Configures a server where JEUS login manager saves the login information to prevent duplicate login at the cluster level.

    ItemDescription
    PrimaryPrimary server of JEUS login manager.
    SecondarySecondary server of JEUS login manager.

  • Passivation

    Backs up modified session objects to a file. If the <shared> option is set to true, the backup is executed for each server. Otherwise, it is executed for each application.

    The following describes each property.

    ItemDescription
    File Path

    Absolute path of a file where sessions are backed up.

    This depends on the value set in <shared> in jeus-web-dd.xml and domain.xml as follows:

    • true: "$(SERVER_HOME)/.workspace/session/distributed/(server_name)"

    • false: "$(SERVER_HOME)/.workspace/session/distributed/(context_name)"

    Single Folder File Limit

    Number of session files allowed in one folder. A session uses a single file. If the limit is too small, too many unnecessary folders may be created. If the limit is 10,000 or more, file input and output performance may be affected depending on the operating system.

    Min Hole

    Number of file I/Os after which packing is performed for the DB file to prevent its size from growing unnecessarily big over time.

    Packing RateRatio of the number of session objects to the number of file I/Os after which packing is performed for the DB file to prevent its size from growing unnecessarily big over time.
    Ratio Ratio of the number of sessions to passivate. The specified ratio of memory is maintained when passivation is enabled. This is not applicable when passivation is enabled due to a timeout.
    Trigger
    • Timeout: The amount of time an unused session exists before it is saved in a file. If set to -1 or 0, passivation is not enabled. If set to a value greater than 0, the session objects that have not been used for the specified amount of time will be passivated and stored in a file. (Unit: milliseconds, default value: -1)

    • Count Threshold: The number of sessions allowed in memory. If the number of sessions in memory exceeds this number, a part of the sessions will be downloaded into a file. This function is performed by monitoring threads at a specific interval. If set to -1 or 0, this function is not enabled.

    • Memory Threshold: The size of memory allowed for sessions. If the size of memory occupied by sessions exceeds this number, a part of the sessions will be downloaded into a file using serialization. This function is performed by monitoring threads at a specific interval. The unit is in bytes. If set to -1 or 0, this function is not enabled.