Redis User Session Storage
This module moves Drupal's session storage from the database to Redis. This can improve performance and scalability for busy websites by reducing database traffic.
Drupal normally saves logged-in (and anonymous) session data in the sessions database table. On busy sites that can mean a lot of read/write traffic to your database. The Redis Session module changes that: after you enable it and configure Redis, session data is stored in Redis instead, using the same Redis connection as the Redis module. You do not get a new “session admin screen” in the UI—the module replaces the low-level session handler so Drupal keeps working as usual, with storage moved to Redis.
Features
- Redis session storage — Session payloads are written to Redis with a TTL aligned with PHP’s session.gc_maxlifetime.
- Same shape as core — Field layout matches core’s session handler (uid, hostname, session, timestamp) for predictable behavior on Drupal 8/9.
- Optional single-session mode — Via settings.php, you can end the previous session when a user logs in again (see Post-Installation).
- Status check — Reports → Status includes a line confirming whether a Redis client could be obtained.
When to use it: High-traffic sites, many concurrent sessions, or architectures where you want session I/O off the primary database. Why: Performance and scalability; Redis is a common choice next to MySQL/PostgreSQL.
Post-Installation
- Configure $settings['redis.connection'] in settings.php (host, port, password, database index base, etc.) as described in the Redis module documentation.
- Enable the Redis module, then enable Redis Session.
- Rebuild caches (e.g. Drush cr or Performance → Clear caches).
- There is no configuration form in this release; behavior is automatic once Redis is configured and both modules are enabled.
- Expectation: Changing session backend or key layout can log users out once; plan a maintenance window if needed.
- If several sites share one Redis instance, use different base (DB index) or isolation practices so keys do not collide.
Additional Requirements
- Redis module (required dependency).
- A running Redis server reachable from PHP.
- PhpRedis and/or Predis as supported by your Redis module setup (per that module’s README).
- Correct redis.connection (and any Redis-module-specific settings) in settings.php.