Skip to main content
Version: 3.7.x.x LTS

Remote session cache

By default, nevisProxy and nevisAuth use a local session cache that stores user sessions within the memory. The term "remote session cache" refers to a database that is used by multiple instances allowing them to share sessions.

nevisAdmin supports the database types provided with the nevisAppliance.

nevisAdmin does not initialize the database. For setup instructions, see the technical documentation of nevisAppliance or the Nevis components.

MySQL Cluster / NDB

Deprecated

The use of MySQL Cluster / NDB is deprecated and not recommended anymore. Use a MariaDB master-master setup instead. For details, see MariaDB Master-Master.

The following steps are required to use MySQL Cluster / NDB as remote session cache:

  1. In the navigation pane of the Infrastructure tab, go to the server that hosts the nevisProxy / nevisAuth instances. Configure a MySQL cluster instance as well as a service object (including its port) – see no.1 and no.2 in the figure below.

  2. In the Add New Database panel of the service object view, define the database name as well as the user name and password needed to access the database (no.3). Click Add to add the database to the service.

    MySQL Cluster service view
  3. Open both the nevisProxy and nevisAuth instance views and set the cache type by selecting the database "remoteDB" in the Cache type field of the Instance Settings panel:

    Set the remote cache database for the instance

Since nevisProxy stores the application server's host names (and also nevisAuth service names) within the user's session data to provide stickiness for the services used within a session, also ensure that every nevisProxy has these services configured allowing the proxies to access them if required.

nevisProxy connections

You also have to make sure that all nevisProxy instances sharing sessions between each other have a similar configuration (similar web.xml and navajo.xml).

MariaDB Master-Master

nevisProxy

Enable the dynamic session management engine as described in the chapter: Enable the Dynamic Session Engine. Container session management is deprecated and cannot be used in combination with a MariaDB master-master setup.

Change the servlet that nevisAdmin has generated to store user sessions. See the chapter: Setting up a fail-safe session store using data replication with MariaDB, in the nevisProxy technical documentation for the servlet class and required parameters.

To allow multiple proxy services to share a database, you have to define an application ID (application-id). Proceed as follows:

  1. In the navigation pane of the Infrastructure tab, select the relevant nevisProxy service (Zone > Server > Instance > Service).
  2. Open the panel Advanced settings for nevisProxy service>Custom Context elements in web.xml. In this panel, you can add or overwrite context-param elements in the generated web.xml.
  3. Click Add to add a new line.
  4. Enter the property name "application-id" with a specific value.
  5. Click Update when done.
  6. Repeat these steps for all nevisProxy services using the same database.

nevisAuth

Proceed as follows to connect to a MariaDB database:

  1. In the navigation pane of the Infrastructure tab, select the relevant nevisAuth instance (Zone > Server > Instance).
  2. Go to Session Cache and select <custom> from the drop-down menu.
  3. Open the panel SessionCache Properties. In this panel, you can add or overwrite properties for the SessionCache element in the generated esauth4.xml.
  4. Click Add to add as many new lines as required.
  5. Enter the properties as described in the technical documentation of nevisAuth. All required properties have to be configured - nevisAdmin does not provide any default values.
  6. Click Update when done.