# Using "In-Memory" Session Storage

# Session Storage Method

For the Exago web app to function, it must store session information representing the user’s effective configuration. By default, we don’t store an entire user’s effective config in the IIS session because the amount of data to store could be quite large, so we use a process to derive the effective config that involves storing only a small “diff” between the user’s effective config and the “base” config (taken from WebReports.xml) for each user’s active session. This often work well, but for large configuration files, the process to create the diff can incur a lot of processing overhead and lead to poor app responsiveness slow report execution. So, there is an alternate method of storing the session information that Exago uses: store the entire effective config in the session without the need to perform a diff or several other potentially non-performant processes. Both session storage methods are outlined below:

- Store only diff in session
  - Smaller session footprint per-user
  - Performance penalty incurred from diff/patch process and re-instantiating internal objects for every server request
  - Can be used with any IIS session state type (In-Process, State Server, SQL Server, Custom)
- Store entire effective config in session
  - Larger session footprint per-user
  - Much less processing overhead for every server request
  - Can only be used with In-Process IIS sessions. This means this method will not work with web farms.

# How to Choose

Because of the better performance, storing the entire config in memory is always preferable to storing just the diff if your server configuration allows. However as noted above, this method will not work with web farms and additionaly can use much more memory per-session than the diff method depending on the size of each user’s effective config.

# How to Configure

In the appSettings.config file in the root of the Exago web app installation directory, use the “sessionStorage” key with value “InMemory” to store the entire config in session memory, or “Diff” to use the slower method that only stores the diff between the base and effective configs.

> Example: <add key="sessionStorage" value="InMemory"></add>