Skip to content

feat: split Redis into dedicated session and event instances#210

Merged
harshitsaamu merged 1 commit into
mainfrom
feat/dual-redis-split
Mar 18, 2026
Merged

feat: split Redis into dedicated session and event instances#210
harshitsaamu merged 1 commit into
mainfrom
feat/dual-redis-split

Conversation

@harshitsaamu

Copy link
Copy Markdown
Collaborator

Introduces REDIS_SESSION_URL and REDIS_EVENT_URL env vars to route high-traffic session and event buffer operations to dedicated Redis instances, reducing load on the general Redis.

  • SessionBuffer now uses getRedisSession() (REDIS_SESSION_URL)
  • EventBuffer and GroupMQ now use getRedisEvent() (REDIS_EVENT_URL)
  • BaseBuffer accepts an optional redis client so locks and counters follow the same instance as the buffer data
  • Graceful shutdown closes all client connections including new ones
  • Both new vars fall back to REDIS_URL when not set, so existing single-Redis deployments require no config changes

Introduces REDIS_SESSION_URL and REDIS_EVENT_URL env vars to route
high-traffic session and event buffer operations to dedicated Redis
instances, reducing load on the general Redis.

- SessionBuffer now uses getRedisSession() (REDIS_SESSION_URL)
- EventBuffer and GroupMQ now use getRedisEvent() (REDIS_EVENT_URL)
- BaseBuffer accepts an optional redis client so locks and counters
  follow the same instance as the buffer data
- Graceful shutdown closes all client connections including new ones
- Both new vars fall back to REDIS_URL when not set, so existing
  single-Redis deployments require no config changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@harshitsaamu harshitsaamu merged commit b958648 into main Mar 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant