Configuring in-memory HTTP session replication

EAServer can distribute HTTP session data using in-memory replication rather than database storage. This feature can improve performance by avoiding the overhead of writing to the database. This mechanism uses the mirror-pair replication model described in “Requirements for in-memory stateful failover” in Chapter 29, “Configuring Persistence Mechanisms,” in the EAServer Programmer’s Guide.

StepsEnabling in-memory replication for a Web application

These steps must be performed in EAServer Manager, while connected to the primary server for your EAServer cluster:

  1. Select the Distributed checkbox on the General tab in the Web Application Properties dialog box.

  2. Install the Web application to one or more logical servers that are part of the cluster.

  3. Configure mirror pairs for the cluster as described in “Cluster configuration for in-memory failover” in Chapter 29, “Configuring Persistence Mechanisms,” in the EAServer Programmer’s Guide.

  4. On the All Properties tab, set the com.sybase.jaguar.webapplication.distribute.type property to “inmemory”.

  5. Synchronize the cluster.

StepsChanging the cache size

The default cache size and entry time out values are unlimited. To change these settings:

  1. In the master server installation for your cluster, create the directory ObjectCache in the Repository directory your EAServer installation if it does not exist.

  2. In this directory, create a text file named HttpSessionCache.props if it does not exist.

  3. Edit HttpSessionCache.props in a text editor, and enter the following lines:

    com.sybase.jaguar.objectcache.name=HttpSessionCache
    com.sybase.jaguar.objectcache.size=size
    com.sybase.jaguar.objectcache.timeout=timeout
    com.sybase.jaguar.objectcache.sync=mirror
    

    Where timeout is the timeout value, in seconds, and size is the size in megabytes, kilobytes, or bytes with the syntax shown in the following table:

    Syntax

    To indicate

    nM or nm

    n megabytes, for example:

    512M
    

    nK or nk

    n kilobytes, for example:

    1024K
    

    n

    n bytes, for example:

    536870912
    
  4. Synchronize the cluster to apply the changes to other member servers.