Configuring the Session Store Feature (SRC CLI)
You can configure three things for the session store feature:
- Configuring Session Store Parameters for a Device Driver
- Configuring Global Session Store Parameters
- Reducing the Size of Objects for the Session Store Feature
Configuring Session Store Parameters for a Device Driver
Use the following configuration statements to configure session store parameters within a device driver configuration:
To configure session store parameters within a device driver configuration:
- From configuration mode, access the configuration statement
that configures the session store for your device driver. In this
sample procedure, the session store for a Junos device driver is configured
in the se-region group.user@host# edit shared sae group se-region configuration driver junos session-store
- (Optional) Specify the maximum age that a queue of buffered
store operations (such as adding a session to the store or removing
a session from the store) can reach before the queue is written to
a session store file.[edit shared sae group se-region configuration driver junos session-store] user@host# set maximum-queue-age maximum-queue-age
- (Optional) Specify the number of buffered store operations
that are queued before the queue is written to a session store file.[edit shared sae group se-region configuration driver junos session-store] user@host# set maximum-queued-operations maximum-queued-operations
- (Optional) Specify the maximum size that a queue of buffered
store operations can reach before the queue is written to a session
store file.[edit shared sae group se-region configuration driver junos session-store] user@host# set maximum-queue-size maximum-queue-size
- (Optional) Specify the maximum size of session store files.[edit shared sae group se-region configuration driver junos session-store] user@host# set maximum-file-size maximum-file-size
- (Optional) Specify the percentage of space in all session
store files that is used by live sessions.[edit shared sae group se-region configuration driver junos session-store] user@host# set minimum-disk-space-usage minimum-disk-space-usage
- (Optional) Specify the number of sessions that are rotated
from the oldest file to the newest file at the same time that the
oldest session store file is rotated.[edit shared sae group se-region configuration driver junos session-store] user@host# set rotation-batch-size rotation-batch-size
- (Optional) Specify the maximum size of a single subscriber
or service session.[edit shared sae group se-region configuration driver junos session-store] user@host# set maximum-session-size maximum-session-size
- (Optional) Specify the size of the buffer that is used
to load all of a session store’s files from disk at startup.[edit shared sae group se-region configuration driver junos session-store] user@host# set disk-load-buffer-size disk-load-buffer-size
- (Optional) Specify the size of the buffer that holds messages
or message segments that are waiting to be sent to passive session
stores.[edit shared sae group se-region configuration driver junos session-store] user@host# set network-buffer-size network-buffer-size
- (Optional) Specify the time interval between attempts
by the active session store to connect to missing passive session
stores.[edit shared sae group se-region configuration driver junos session-store] user@host# set retry-interval retry-interval
- (Optional) Specify the amount of time that a session store
waits before closing when it is blocked from reading or writing a
message.[edit shared sae group se-region configuration driver junos session-store] user@host# set communications-timeout communications-timeout
- (Optional) Specify the time that an active session store
waits for a passive session store or a passive session store waits
for an active session store to load its data from disk before it closes
the connection to the session store.[edit shared sae group se-region configuration driver junos session-store] user@host# set load-timeout load-timeout
- (Optional) Specify the time that a passive session store
waits for activity from the active session store before it closes
the connection to the active session store.[edit shared sae group se-region configuration driver junos session-store] user@host# set idle-timeout idle-timeout
- (Optional) Specify when the active session store closes
the connection to a passive session store because of a backlog of
messages waiting to be sent.[edit shared sae group se-region configuration driver junos session-store] user@host# set maximum-backlog-ratio maximum-backlog-ratio [edit shared sae group se-region configuration driver junos session-store] user@host# set minimum-backlog minimum-backlog
- (Optional) Verify your configuration.
[edit shared sae group se-region configuration driver junos session-store] user@host# show maximum-queue-age 5000; maximum-queued-operations 50; maximum-queue-size 51050; maximum-file-size 25000000; minimum-disk-space-usage 25; rotation-batch-size 50; maximum-session-size 10000; disk-load-buffer-size 1000000; network-buffer-size 51050; retry-interval 5000; communications-timeout 60000; load-timeout 420000; idle-timeout 3600000; maximum-backlog-ratio 1.5; minimum-backlog 5000000;
Configuring Global Session Store Parameters
This topic describes how to configure global session store parameters that are shared by all session store instances (active or passive) on the SAE. You can also configure session store parameters within a device driver configuration.
Use the following configuration statements to configure global session store parameters.
To configure global session store parameters:
- From configuration mode, access the configuration statement
that configures the global session store parameters. In this sample
procedure, the global session store is configured in the se-region
group.user@host# edit shared sae group se-region configuration driver session-store
- (Optional) Specify the expiry age of the dormant session
store file. The service activation engine (SAE) deletes the session
store file if it is not modified for the configured period. The value
range is 0–2,147,483,647 milliseconds. By default, the value
is set to 604,800,000 milliseconds—that is, 7 days.[edit shared sae group se-region configuration driver session-store] user@host# set file-expiry-age file-expiry-age
- (Optional) Specify the frequency at which the server monitors
the age of the session store file. The value range is 1000–2,147,483,647
milliseconds. By default, the value is set to 3,600,000 milliseconds—that
is, 1 hour.[edit shared sae group se-region configuration driver session-store] user@host# set file-expiry-check-interval file-expiry-check-interval
- (Optional) Specify the IP address or hostname that the
session store infrastructure on this SAE uses to listen for incoming
TCP connections from active session stores.[edit shared sae group se-region configuration driver session-store] user@host# set ip-address ip-address
- (Optional) Specify the TCP port number on which the session
store infrastructure on this SAE listens for incoming connections
from active session stores.[edit shared sae group se-region configuration driver session-store] user@host# set port port
- (Optional) Specify the root directory in which the session
store creates files.[edit shared sae group se-region configuration driver session-store] user@host# set root-directory root-directory
- (Optional) Verify your configuration.
[edit shared sae group se-region configuration driver session-store] user@host# show file-expiry-age 604800000; file-expiry-check-interval 3600000; ip-address 10.10.70.0; port 8820; root-directory var/sessionStore;
![]() | Note: For the set file-expiry-age and set file-expiry-age-check-interval parameters, we recommend that you configure a value that is nearer to the default value. You must restart the SAE for the configuration changes to take effect. |
Reducing the Size of Objects for the Session Store Feature
You can use serialized data compression to reduce the size of sessions objects that the SAE sends across the network for the session store feature. Enabling this property reduces the size of objects, but increases the CPU load on the SAE.
Use the following configuration statement to specify whether or not session objects are compressed.
To specify whether or not session objects are compressed:
- From configuration mode, access the sae configuration.
In this sample procedure, data compression is configured in the se-region
group.user@host# edit shared sae group se-region configuration
- Enable reducing the size of session objects (subscriber
and service sessions) that the SAE sends across the network for the
session store feature.[edit shared sae group se-region configuration]user@host# set compress-session-data
- (Optional) Verify your configuration.
[edit shared sae group se-region configuration] user@host# show compress-session-data compress-session-data;