Purpose of Redis
Redis is an in-memory data structure store, and is used as a database, cache, and message broker. Redis functions as an in-memory cache for Cherwell Server Farms.
By connecting every web server to the same Redis, the applications can share state and collaborate. When a server performs an operation, it saves the state of the current User or application to Redis. In a scenario where a User is bounced from one server to the another, each server can pick up from where the previous server left off by retrieving the latest state from Redis.
For a Cherwell Application Server, the cost of synchronizing with Redis
is minimal because the Application Server exchanges a limited amount of
information with Redis. For a Cherwell Web Server, IIS holds state for each
User in form of session, and it can reach the size of a few MB (3-5MB is the
typical size). For every web request going from the Cherwell web application to
the server, there is an exchange of session state twice with Redis:
- When the request starts, in order to retrieve session from Redis.
- When the request ends, in order to save session to Redis.
Important: When Redis is hosted within a virtual machine, it
is critical that memory is never oversubscribed.