> - Downloads
> - Configuring the Session Store Feature
> - Related Topics
> - Creating Grouped Configurations for the SAE (SRC CLI)
> - Storing Subscriber and Service Session Data

> # Configuring the Session Store Feature

> You can configure three things for the session store feature:

> 1. Configuring Session Store Parameters for a Device Driver
> 2. Configuring Global Session Store Parameters
> 3. 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:

> `
> shared sae configuration driver ( aaa | junos | junose | pcmm | simulated | third-party ) session-store {
>   maximum-queue-age maximum-queue-age ;
>   maximum-queued-operations maximum-queued-operations ;
>   maximum-queue-size maximum-queue-size ;
>   maximum-file-size maximum-file-size ;
>   minimum-disk-space-usage minimum-disk-space-usage ;
>   rotation-batch-size rotation-batch-size ;
>   maximum-session-size maximum-session-size ;
>   disk-load-buffer-size disk-load-buffer-size ;
>   network-buffer-size network-buffer-size ;
>   retry-interval retry-interval ;
>   communications-timeout communications-timeout ;
>   load-timeout load-timeout ;
>   idle-timeout idle-timeout ;
>   maximum-backlog-ratio maximum-backlog-ratio ;
>   minimum-backlog minimum-backlog ;
> }
> `

> To configure session store parameters within a device driver configuration:

> 1. 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
>    `
> 2. (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
>    `
> 3. (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
>    `
> 4. (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
>    `
> 5. (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
>    `
> 6. (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
>    `
> 7. (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
>    `
> 8. (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
>    `
> 9. (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
>    `
> 10. (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
>     `
> 11. (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
>     `
> 12. (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
>     `
> 13. (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
>     `
> 14. (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
>     `
> 15. (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
>     `
> 16. (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. See Configuring the Session Store Feature.

> Use the following configuration statements to configure global session store parameters.

> `
> shared sae configuration driver session-store {
>   ip-address ip-address ;
>   port port ;
>   root-directory root-directory ;
> }
> `

> To configure global session store parameters:

> 1. 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
>    `
> 2. (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
>    `
> 3. (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
>    `
> 4. (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
>    `
> 5. (Optional) Verify your configuration.

>        [edit shared sae group se-region configuration driver session-store]
>        user@host# show
>        ip-address 10.10.70.0;
>        port 8820;
>        root-directory var/sessionStore;

> ## 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.

> `
> shared sae configuration {
>   compress-session-data;
> }
> `

> To specify whether or not session objects are compressed:

> 1. 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
>    `
> 2. 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
>    `
> 3. (Optional) Verify your configuration.

>        [edit shared sae group se-region configuration]
>        user@host# show compress-session-data
>        compress-session-data;

> #### Published: 2009-09-15

> Copyright © 2009, Juniper Networks, Inc. All rights reserved. Trademark Notice.